text
stringlengths
3.08k
12.5k
#include <iostream> #include <cstdio> #include <cctype> #include <algorithm> struct InputOutputStream { enum { SIZE = 1024 * 1024 }; char ibuf[SIZE], obuf[SIZE], *s, *t, *oh; InputOutputStream() : s(), t(), oh(obuf) {} ~InputOutputStream() { fwrite(obuf, 1, oh - obuf, stdout); } char read() { ...
#include "gcp/pgutil/Trans.h" #include "gcp/util/Exception.h" #include <cmath> #include <iostream> #include <stdio.h> using namespace std; using namespace gcp::util; #define MIN(a,b) (((a) < (b)) ? (a) : (b)) #define MAX(a,b) (((a) > (b)) ? (a) : (b)) /**...............................................................
#include <am/hash/fnv.hpp> #include <am/hash/murmur.hpp> #include <cstring> #include <string> #include <vector> #include <map> #include <iostream> #include <iomanip> // FIXME: seeds are currently narrowed to HL32 using func_vector_type = std::vector< void (*)( std::string const&, am::hash::common_hash_type<am...
#include <algorithm> #include <array> #include <iostream> #include <iterator> #include <string> #include <tuple> #include <vector> struct Screen { std::array<std::string, 10> patterns; std::array<std::string, 4> digits; }; std::istream &operator>>(std::istream &input, Screen &s) { if (!input.good()) { retur...
#include "selfdrive/ui/qt/widgets/controls.h" #include <cmath> #include <cstdlib> #include <QPainter> #include <QStyleOption> QFrame *horizontal_line(QWidget *parent) { QFrame *line = new QFrame(parent); line->setFrameShape(QFrame::StyledPanel); line->setStyleSheet(R"( margin-left: 40px; margin-right: 4...
/* * SocialLedge.com - Copyright (C) 2013 * * This file is part of free software framework for embedded processors. * You can use it and/or distribute it as long as this copyright header * remains unmodified. The code is free for personal use and requires * permission to use in a commer...
#include <test/unit/math/test_ad.hpp> TEST(ProbDistributionsWishartCholesky, matvar) { auto f = [](const auto& L_Y, const auto& dof, const auto& L_S) { return stan::math::wishart_cholesky_lpdf(L_Y, dof, L_S); }; double dof = 3.4; Eigen::MatrixXd L_Y11(1, 1); L_Y11 << 1; Eigen::MatrixXd L_S11(1, 1); ...
#include "de_web_plugin.h" #include "de_web_plugin_private.h" #include "thermostat_ui_configuration.h" /*! Handle packets related to the ZCL Thermostat UI Configration cluster. \param ind the APS level data indication containing the ZCL packet \param zclFrame the actual ZCL frame which holds the Thermostat clu...
/* MfxVTK Open Mesh Effect plug-in Copyright (c) 2020 <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, merg...
/* Copyright 2021 <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, distribute, sublicense, ...
#include <node.h> #include <string> #include <unistd.h> #include <sys/ioctl.h> #include <sys/fcntl.h> #include <linux/i2c-dev.h> #include <cmath> #include "tsl2561.h" using namespace v8; using namespace std; Persistent<Function> Tsl2561::constructor; Tsl2561::Tsl2561(char* device, int addr) { fd = open(device, O_R...
/* * Copyright (c) 2019 Opticks Team. All Rights Reserved. * * This file is part of Opticks * (see https://bitbucket.org/simoncblyth/opticks). * * 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 ...
// SPDX-License-Identifier: BSD-3-Clause // Copyright (c) 2002 Ramshankar (aka Teknomancer). // Copyright (c) 2011 <NAME>. // All rights reserved. #include "PrefsViewMisc.h" #include "AppConstants.h" #include "ArchiverMgr.h" #include "BitmapPool.h" #include "MsgConstants.h" #include "Preferences.h" #include "PrefsFiel...
#include "DataPoolParameterWrapper.h" //for returncodes #include "../parameters/HasParametersIF.h" #include "DataSet.h" #include "PoolRawAccess.h" DataPoolParameterWrapper::DataPoolParameterWrapper() : type(Type::UNKNOWN_TYPE), rows(0), columns(0), poolId( PoolVariableIF::NO_PARAMETER) { } DataPoolParameterW...
#include <iostream> #include <cstdio> #include <cstring> #include <cassert> #include <cctype> #include <algorithm> using namespace std; typedef long long lint; #define cout cerr #define ni (next_num<int>()) template<class T>inline T next_num(){ T i=0;char c; while(!isdigit(c=getchar())&&c!='-'); bool neg=c=='-'; ne...
/** * Copyright (c) 2020 Janky <<EMAIL>> * All right 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 cond...
/*This file is part of the FEBio source code and is licensed under the MIT license listed below. See Copyright-FEBio.txt for details. Copyright (c) 2019 University of Utah, The Trustees of Columbia University in the City of New York, and others. Permission is hereby granted, free of charge, to any person obtaining ...
/** * @author <NAME> * @file test_trie.cc Test harness for trie.h * * * COMMENTS: * * Technologies langagieres interactives / Interactive Language Technologies * Inst. de technologie de l'information / Institute for Information Technology * Conseil national de recherches Canada / National Research Council Can...
#include <string> #include <iostream> #include <vector> #include <assimp/Importer.hpp> #include <assimp/scene.h> #include <assimp/postprocess.h> #include "model.h" glm::vec3 convertVector3(aiVector3D aiVec3); scratch::Model::Model(unsigned int id, const std::string &path) { _id = id; _modelPath = path; ...
#include <cstdio> #include <vector> #include <algorithm> #include <utility> #include <string.h> #include <msgpack.hpp> #include <msgpack/fbuffer.hpp> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdlib.h> #include <time.h> using namespace std; void GenTestData() { FILE *fp; msgpack::s...
//========================================================================= // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
/** * Copyright 2018 <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 w...
/******************************************************************** Copyright (c) 2010-2015, Regents of the University of Colorado 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 s...
#include <iostream> #include <cstdio> #include <cmath> #include <string> #define f(x,y,z) 10*x+sin(x+y)-1 #define g(x,y,z) 8*y-pow(cos(z-y),2)-1 #define h(x,y,z) 12*z+sin(z)-1 #define diff_f_x(x,y,z) 10+cos(x+y) #define diff_f_y(x,y,z) cos(x+y) #define diff_f_z(x,y,z) 0 #define diff_g_x(x,y,z) 0 #define diff_g_y(x,y...
/* -------------------------------------------------------------------------- CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-20 <NAME> CppAD is distributed under the terms of the Eclipse Public License Version 2.0. This Source Code may also be made available under the following Secondary Lice...
/** * @file main.cpp * @author <NAME> * @brief Provides the core logic * @version 0.1 * @date 2021-04-12 */ #include <Arduino.h> #include "HardwareConfiguration.h" #include "NetworkConfiguration.h" #include "LoRaWan_APP.h" // LoRa WAN #include <Adafruit_Sensor.h> // Sensor base #include <DHT.h> // Temp & humidi...
// // NativeAudioPlugin.cpp // // Created by asus4 on 2013/05/08. // Copyright (c) 2013 <NAME>. // #include "UnityNativeAudio.h" #define RT_FORMAT RTAUDIO_SINT16 struct UserData { unsigned long bufferBytes; unsigned int channels; }; static RtAudio *audio = 0; static UserData data; static MY_TYPE *audioB...
#include "chromecontroller.h" #include "aglsocketwrapper.h" #include "constants.h" #include <QTimer> #include <QDebug> #include <QJsonDocument> ChromeController::ChromeController(const QUrl &bindingUrl, QObject *parent) : QObject(parent) , m_aglSocket(new AglSocketWrapper(this)) { //Alexa voice agent subscr...
#include <iostream> #include "RenderHelp.h" // 定义顶点结构 struct VertexAttrib { Vec3f pos; Vec2f uv; Vec3f color; Vec3f normal; }; // 顶点着色器输入 VertexAttrib vs_input[3]; // 模型 VertexAttrib mesh[] = { { { 1, -1, 1, }, { 0, 0 }, { 1.0f, 0.2f, 0.2f }, }, { { -1, -1, 1, }, { 0, 1 }, { 0.2f, 1.0f, 0.2f }, },...
//------------------------------------------------------------------------------ // exampleapp.cc // (C) 2015-2020 Individual contributors, see AUTHORS file //------------------------------------------------------------------------------ #include "config.h" #include "exampleapp.h" #include <cstring> #include "render/Me...
/* iOwlT: Sound Geolocalization System MFCC algorithm MFCC algorithm for pre-processing sound data */ #include <algorithm> #include <iostream> #include <fstream> #include "mfcc.cc" // A simple option parser char* getCmdOption(char **begin, char **end, const std::string &value) { char **iter = std::find(begin, en...
#include "mysocket.h" #include <QCoreApplication> #include <QProgressDialog> MySocket::MySocket(int sockId) { this->sockId = sockId; this->buffer.reserve(4096*10); this->command.reserve(4096); // this->sock.open(QIODevice::ReadWrite); this->sock.setSocketDescriptor(sockId); qDebug() << "buffer...
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "muGadget.h" using namespace cv; /** Function Headers */ void onMouse(int Event,int x,int y,int flag,void* param); void transMatToMu(Mat &src, muImage_t* rst); int setROI(muRect_t &Sample); void disDct(muSeq_t *MuObject, ...
/* <orly/csv_to_bin/field.test.cc> Unit test for <orly/csv_to_bin/field.h>. Copyright 2010-2014 OrlyAtomics, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.ap...
/********************************************************/ /* Name : <NAME> */ /* RollNo : 111601008 */ /* FileName : main.cpp */ /* Objective : Topological sorting */ /********************************************************/ #include<iostream> #include <stdio.h> #include <stdlib....
/* * Copyright (c) 2021 <NAME> https://gaztin.com/ * * 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 any purpose, includin...
#include <aes_128.h> #include <aes_ila.h> #include <ilang/vtarget-out/vtarget_gen.h> /// the function to parse commandline arguments VerilogVerificationTargetGenerator::vtg_config_t HandleArguments(int argc, char **argv); /// To verify the exact AES128 ILA void verifyAES128(Ila& model, VerilogVerificationTargetGenera...
#include "LoRaWan_APP.h" #include "Arduino.h" /* * set LoraWan_RGB to Active,the RGB active in loraWan * RGB red means sending; * RGB purple means joined done; * RGB blue means RxWindow1; * RGB yellow means RxWindow2; * RGB green means received done; */ /* OTAA para*/ uint8_t devEui[] = { 0x22, 0x32, 0x33, 0x0...
#include <string> #include <sstream> #include <iostream> #include <time.h> #include <stdio.h> #include "aircotec.h" #include "igc.h" using namespace std; #define BAUDRATE 57600 #define FLAG_FIX 0x1 #define FLAG_FIX3D 0x2 /* Maximum timeout in seconds for readline, during download */ #define DOWN_TIMEOUT 2 /* Re...
#include <fstream> #include <string> #include <sstream> #include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <memory> #include <cstring> #include <unordered_map> using namespace std; void print_title() { string stuff(25, '-'); cout << "\033[1;33m"; cout << stuff <<"Advent o...
#include "ENetClient2.h" #include "Events.h" #include "utils.hpp" #include "Includes/Logger.h" void ENetClient2::Kill(ENetClient2* client) { //LOG("Killing ENetClient..."); client->destroy(); client = NULL; //LOG("ENetClient successfully killed!"); } void ENetClient2::SetDataOnConnect(const int id, C...
#include <SimVisData.hpp> #include <string> #include <fstream> #include <sstream> SimVisDataPtr SimVisData::loadFromFile(const char* filepath) { SimVisDataPtr simVisDataPtr = nullptr; std::vector<nvmath::vec3f> verts; std::vector<int> cellInds; std::vector<float> attributeList; std::ifstream in(f...
/* mtrr.cpp Copyright (c) 03 <NAME> (yann) 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, distr...
//==================================================================================================================================================== // Copyright 2020 Lake Orion Robotics FIRST Team 302 // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated ...
#include <stdio.h> #include <vector> #include <system_error> #include <iostream> #include <fstream> #include <sstream> #include <unordered_map> #include <iomanip> #include "kslicer.h" class SetterVisitor : public clang::RecursiveASTVisitor<SetterVisitor> { public: SetterVisitor(const clang::CompilerInstance& a...
// Importamos o header referente a lib FS_File_Record #include "FS_File_Record.h" String fileName; // Nome do arquivo int sizeOfRecord = 5; // Default 3 (somando \r\n o tamanho será 5) File pFile; // Ponteiro do arquivo // Construtor que seta somente o nome do arquivo, deixando o tamanho de registro default 3 ...
#include "macofflinegl.h" #include <traster.h> #include <tconvert.h> #include "tthread.h" namespace { #if defined(powerpc) void rightRotateBits(UCHAR *buf, int bufferSize) { UINT *buffer = (UINT *)buf; register UINT app; for (int i = 0; i < bufferSize; i++, buffer++) { app = *buffer; *buffer = ap...
/* * extract_reads.cpp * TopHat * * Created by <NAME> on 9/25/08. * Copyright 2008 <NAME>. All rights reserved. * */ #include <stdio.h> #include <iostream> #include <set> #include <algorithm> #include <string> #include <cstring> #include <cassert> #include "reads.h" #include "common.h" using namespace std;...
// Copyright (c) 2019 <NAME> // This code is licensed under MIT license (see LICENSE for details) #include "JoSIM/Input.hpp" #include <fstream> #include <iostream> using namespace JoSIM; std::vector<std::string> Input::read_file(const std::string &fileName){ std::string line; std::fstream ifile(file...
// SPDX-License-Identifier: BSD-2-Clause // This code is part of the sfizz library and is licensed under a BSD 2-clause // license. You should have receive a LICENSE.md file along with the code. // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz /* Note(jpc): implementation status - [x]...
/* psynths_echo.cpp. This file is part of the SunVox engine. Copyright (C) 2002 - 2008 <NAME> <<EMAIL>> */ #include "psynth.h" //Unique names for objects in your synth: #define SYNTH_DATA psynth_echo_data #define SYNTH_HANDLER psynth_echo //And unique parameters: #define SYNTH_INPUTS 2 #define SYNT...
// // RAT CHASES ITS CHEESE // // You are given an N*M grid. Each cell (i,j) in the grid is either blocked, or empty. The rat can move from a position towards left, right, up or down on the grid. // // Initially rat is on the position (1,1). It wants to reach position (N,M) where it's cheese is waiting for. There exits...
#include <string> #include <iostream> #include "NumberWithUnits.hpp" #include <cmath> #include <fstream> #include <sstream> const double EPS = 0.001; using namespace std; namespace ariel { static map<string, map<string,double> > my_table; NumberWithUnits::NumberWithUnits(double amount, const...
#include <eosio.tedp/eosio.tedp.hpp> // tf 1mil // econdevfunds 500k // rex 1mil // wps 1mil // bpay 1760000 // total 5260000 * 12 momths / 365 days = 172931.5068 per day (63.12mil per year) // rounding up to ensure contract always can have a surplus beyond the total max of all payouts // const uint64_t max_drawdown_a...
#include "OrientedBoxCollider.h" #include "BoxCollider.h" #include "Matter.h" #include "Log.h" #include "VMath.h" #include "VGL.h" OrientedBoxCollider::OrientedBoxCollider() { m_nType = COLLIDER_ORIENTED_BOX; m_arHalfExtents[0] = 1.0f; m_arHalfExtents[1] = 1.0f; m_arHalfExtents[2] = 1.0f; m_arRotat...
/* ChibiOS - Copyright (C) 2006..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 la...
#include "mex.h" #include <array> #include <cmath> #include <complex> #include <fstream> #include <iostream> #include <math.h> #include <string> // for string class #include <time.h> #include <vector> //#define EIGEN_USE_MKL_ALL #include <Eigen/Core> #include <Eigen/Dense> #include <Eigen/LU> #include <Eigen/SVD> #inc...
/* eglinfo EGL information utility Copyright (c) 2013 <NAME> 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 any purpose, including ...
#include "stm32f10x.h" #include "Configuration.h" #include "TaskManager.h" #include "USART.h" #include "I2C.h" #include "Timer.h" #include "ADC.h" #include "PWM.h" #include "flash.h" #include "InputCapture_TIM.h" #include "InputCapture_EXIT.h" #include "LED.h" #include "ESP8266.h" #include <string.h> /*状态*/ #define S...
/***********************************************************/ /* L3 Link Prediction */ /* */ /* <NAME> */ /***********************************************************/ #include <ma...
// 实现一个反汇编器 #include <iostream> #include <cstring> #include <sstream> #include <vector> #include <map> using namespace std; // 枚举类型的二进制指令集 enum BinIns { binHalt, binIn, binOut, binAdd, binSub, binMul, binDiv, binDup, binLd, binSt, binLdc, binJlt, binJle, binJgt, ...
#include "search.h" #include <tuple> #include <chrono> #include "open_container.h" Search::Search() { //set defaults here } Search::~Search() {} double Search::get_heuristic(Point from, Point to, const EnvironmentOptions &options) const { if (options.metrictype == CN_SP_MT_DIAG) { return...
#include "Algorithms.h" #include "Normal.h" #include "Plane.h" #include "CameraTypes.h" #include "Logger.h" #include <pcl/common/transforms.h> pcl::PointXYZ algos::deproject_pixel_to_point(float x_pixel, float y_pixel, float z,...
// coding: utf-8 // ---------------------------------------------------------------------------- /* Copyright (c) 2009, Roboterclub Aachen e.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: ...
// This file is a part of the IncludeOS unikernel - www.includeos.org // // Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences // 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 obta...
#include "FPSCamera.h" FPSCamera::FPSCamera(Display* window, glm::vec3& position, float fov, float aspect, float near, float far) : Camera(window, fov, aspect, near, far) { m_position = position; m_up = glm::vec3(0.0f, 1.0f, 0.0f); m_direction = glm::vec3(0.0f, 0.0f, 1.0f); m_target = glm::vec3(0.0f, 0.0f, -1.0f);...
// // Copyright (c) 2018 <NAME> (<EMAIL>). All rights reserved. // Licensed under the MIT license. See LICENSE file in project root for details. // // Full problem description available at: // https://engineeringnotepad.wordpress.com/2018/05/22/algorithm-greedy-cake-thief/ // #include <iostream> #include <queue> #inc...
/******************************Module*Header*******************************\ * Module Name: stretch.hxx * * This defines the structures and flags used by EngStretchBlt * * Created: 16-Feb-1993 15:10:06 * Author: <NAME> [donalds] * * Copyright (c) 1993-1999 Microsoft Corporation \*******************************...
// Copyright 2019 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 "components/omnibox/browser/on_device_head_model.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/path_serv...
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * * Copyright 2016 Mozilla Foundation * * 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...
/*========================================================================* * * * Distributed by Whiteley Research Inc., Sunnyvale, California, USA * * http://wrcad.com * * Copyright (...
//Copyright [2014] [<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 writing, software /...
#include "face_detector.h" #include "face_recognizer.h" #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <float.h> #include <iostream> #include <map> #include <stdlib.h> #include <utility> void face_register(easyface::FaceDetector *detector, easy...
#include<bits/stdc++.h> // g++ -std=c++17 -Wl,-stack_size -Wl,0x10000000 main.cpp #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define EPS 1e-6 #define ll long long int #define ld long double #define fi first #define se second #define all(v) v.begin(),v.e...
#include <string> #include "../types/pixel_format.hpp" #include "../types/point.hpp" #include "../types/rect.hpp" #include "font.hpp" #include "surface.hpp" using namespace blit; namespace blit { /** * TODO: Document this function * * \param message * \param font * \param p * \param variable ...
#pragma once #include <cxcore.h> #include <vector> #include <string> #include <iostream> using namespace std; // max inline int max(int a, int b) { if (a > b) return a; return b; } // square of x #ifndef SQ #define SQ(x) ((x)*(x)) #endif // SQ // abs #define ABS(x) ((x)<0?-(x):(x)) // ALM Stopping Criteria enu...
/* * Scene_Debug_David.cpp * enigma * * Created by Rockford on 14/06/11. * Copyright 2011 Casual Games France. All rights reserved. * */ #include "MyGame.h" #include "EScene.h" #include "Scene_Debug_David.h" #include "ESceneDirector.h" #include "GlobalBank.h" #include "EWatchDog.h" #include "ThreadLoader.h"...
// //Copyright (c) 2016, <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 and the f...
#include "idls/account.h" #include <fstream> #include <iostream> CORBA::Boolean finished = FALSE; class AccountImpl; typedef std::map<PortableServer::Servant, AccountImpl *, std::less<PortableServer::Servant> > ServantMap; ServantMap svmap; class AccountImpl : virtual public POA_Account { public: Account...
/* * Copyright 2000-2001, <NAME>, <EMAIL>. * Distributed under the terms of the MIT License. */ #include "constants.h" #include "ConfigView.h" #include "MCheckBox.h" #include "MTextControl.h" #include "MSplitter.h" #include "VGroup.h" #include "HGroup.h" #include "MPopup.h" #include "MButton.h" #include <MenuItem....
#include <gtest/gtest.h> #include "integer.h" TEST(Arithmetic, divide){ integer big_pos = integer("fedbca9876543210", 16); integer small_pos = integer("ffff", 16); integer res_pos = integer("fedcc9753fc9", 16); integer big_neg = -big_pos; integer small_neg = -small_pos; i...
/* MIT License Copyright (c) 2009 <NAME> This file is part of gcore. 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, mo...
// copyright (c) 2009-2010 <NAME> // copyright (c) 2009-2014 the dzcoin core developers // distributed under the mit software license, see the accompanying // file copying or http://www.opensource.org/licenses/mit-license.php. #include "pow.h" #include "arith_uint256.h" #include "chain.h" #include "primitives/block....
/* * Copyright 2020 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wr...
#pragma GCC optimize(3) #include <cstdio> #include <cctype> #include <cstring> #include <vector> #include <algorithm> #include <unordered_map> using namespace std; #define BUFSIZE 65536 size_t _pos = BUFSIZE; char _buf[BUFSIZE]; void _getc(char &c) { if (_pos == BUFSIZE) { _pos = 0; fread(_buf, 1, BUFSIZE, st...
// Copyright (C) 2018, for GeekerClub authors. // Author: <NAME> (<EMAIL>) // // Description: // #include "rsfs/sdk/sdk.h" #include <signal.h> #include <iomanip> #include <iostream> #include <string> #include <vector> #include "toft/base/scoped_ptr.h" #include "toft/base/string_ext.h" #include "toft/base/string_num...
/***************************************************************************** Copyright (c) 2005 - 2009, The Board of Trustees of the University of Illinois. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
/************************************************************** * * 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 y...
#include "outerproduct.hpp" std::vector<Ciphertext> OuterProductV1(Evaluator & eval, std::vector<Ciphertext>& vec1, std::vector<Ciphertext>& vec2) { // Outer-product, product of the form : // [x_1,] // [x_2,] * [...
#include <iostream> #include <fstream> #include <algorithm> #include "sampler.h" #include "BurstyBTM.h" #include "doc.h" void BurstyBTM::run(string docs_pt, string model_dir) { cout << "load docs: " << docs_pt << endl; load_docs(docs_pt); cout << "Begin iteration" << endl; int it = 1; for (; it < n_iter + ...
#include <Python.h> #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #include <numpy/arrayobject.h> #include <math.h> #include <arpa/inet.h> #include "LOOKUP_COSINE.h" #include "LOOKUP_SINE.h" #include "Quanergy_Packet_Structures.h" const double M8_VERTICAL_ANGLES[] = { -0.318505, -0.2692, -0.218009, -0.16519...
// DRUNKWATER TEMPLATE(add description and prototypes) // Question Title and Description on leetcode.com // Function Declaration and Function Prototypes on leetcode.com //514. Freedom Trail //In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring",...
// Copyright 2018 <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...
#include <cstdio> #include <cassert> #include <utility> #include <functional> //numbers up to 2^MAXLOGX-1 const int MAXLOGX=20; template<int k> struct Trie{ Trie<k-1>* chd[2]; int cnt; int lazy; int has[2]; int get_cnt(){ assert(this!=NULL); return cnt; } int get_has(int d){ assert(this!=NUL...
// The MIT License (MIT) // // Copyright (c) 2016 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, ...
//===-- PIC16MemSelOpt.cpp - PIC16 banksel optimizer --------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===--------------------------------------------------------...
/* * FliteVoiceSpark.cpp * * Created on: 17/10/2012 * Author: guille */ /// @file FliteVoiceSpark.cpp /// @brief FliteVoiceSpark class implementation. #include "stdAfx.h" #include "FliteVoiceSpark.h" #include <sstream> #include <signal.h> #ifdef _WIN32 #else extern "C" Component *createComponent( cha...
// Copyright (c) Open Enclave SDK contributors. // Licensed under the MIT License. #include "enclave.h" #include "enclave_calls.hpp" #include <string> #include <grpcpp/grpcpp.h> #include "secretsharing.grpc.pb.h" using grpc::Channel; using grpc::ClientContext; using grpc::Status; using secretsharing::AttestationReq...
#include <ncurses.h> #include <string> #include <cstdlib> #include "board.hpp" int curx, cury, oldx, oldy, maxx, maxy; int drawspot(board bor, int x, int y){ int ch = bor.imgat(x, y); switch (ch) { case HIDDEN: ch = '_'; mvaddch(y + 1, x, ch); break; case ...
/* * File: program.cpp * ----------------- * This file is a stub implementation of the program.h interface * in which none of the methods do anything beyond returning a * value of the correct type. Your job is to fill in the bodies * of each of these methods with an implementation that satisfies * the performan...