Unicorn Documentation Release 1.0.0

Total Page:16

File Type:pdf, Size:1020Kb

Unicorn Documentation Release 1.0.0 unicorn Documentation Release 1.0.0 Philipp Bräutigam, Steffen Brand January 25, 2017 Contents 1 User Guide 3 1.1 Requirements...............................................3 1.2 Installation................................................3 1.3 ConvertibleValue and Unit........................................3 1.3.1 Unit...............................................3 1.3.2 ConvertibleValue........................................4 1.4 Converters................................................4 1.4.1 Converting...........................................4 1.4.2 Mathematical operations....................................5 1.4.3 Nesting.............................................5 1.4.4 Adding your own units.....................................6 1.4.5 Extending converters......................................6 1.4.6 Converter Registry.......................................8 1.4.7 Converter Implementations...................................9 1.5 Contribute................................................ 14 1.6 License.................................................. 15 i ii unicorn Documentation, Release 1.0.0 A framework agnostic library to convert between several units. Contents 1 unicorn Documentation, Release 1.0.0 2 Contents CHAPTER 1 User Guide 1.1 Requirements • PHP 7.0 or higher • BCMath extension installed and enabled 1.2 Installation The recommended way to install Unicorn is using Composer. Run the following command in your project directory: composer require xynnn/unicorn This requires you to have Composer installed globally, as explained in the installation chapter of the Composer docu- mentation. 1.3 ConvertibleValue and Unit This section will provide you general information on Unit and how to use the ConvertibleValue, which is unicorns general data transfer object. 1.3.1 Unit It consists of three properties: • name: the full name of the unit, f.e. centimeter • abbreviation: the abbreviation of the unit, f.e cm • factor: the factor to normalize this unit to the converters base unit It is important to understand how the factor is used in the internal process. Especially, if you want to add your own units to a converter. The factor is used to normalize a value or convert a value. Let’s say you want to normalize 1 kilometer to meter, as meter is the base unit of the LengthConverter. The 1 meter is 0.001 kilometer, so the factor of the unit kilometer is 0.001. This example is taken directly from the LengthConverter constructor, where the Unit kilometer is already set up. 3 unicorn Documentation, Release 1.0.0 <?php new Unit('kilometer', 'km', '0.001'); All converters already provide a number of units ready to use as static variables. Have a look at the corresponding converters documentation to see which units are already provided. <?php $converter= new LengthConverter(); $converter::$kilometer; // the unit "meter" already set up and ready to use 1.3.2 ConvertibleValue A ConvertibleValue is the general data transfer object of Unicorn. Before you start converting or performing mathematical operations, you have to wrap your data in a ConvertibleValue. It consists of two properties: • value: the actual value • unit: the unit in which the value is represented If you want to represent 1000 meters as a ConvertibleValue, it will look like this: <?php $converter= new LengthConverter(); new ConvertibleValue('1000', $converter::$meter); The value is supposed to be a string representation, since it allows endless decimals, while float is limited to 14 decimals. Since php loves type juggling and is able to cast almost anything to string, you might use int or float as well. <?php $converter= new LengthConverter(); new ConvertibleValue(1000.12345678901234, $converter::$meter); 1.4 Converters This section will provide you general information on how to use converters. 1.4.1 Converting To convert a ConvertibleValue to another Unit, you have to call the convert method. The method works as follows: convert X of Unit Y to Unit Z. The convert method returns a ConvertibleValue, that you can use for further operations. Let’s have a look at the convert methods signature: <?php /** * @param ConvertibleValue $from * @param Unit $to * @return ConvertibleValue */ public function convert(ConvertibleValue $from, Unit $to): ConvertibleValue; Here is a quick example that shows how to convert 110 centimeters to meters: 4 Chapter 1. User Guide unicorn Documentation, Release 1.0.0 <?php $converter= new LengthConverter(); $result= $converter->convert( new ConvertibleValue('110', $converter::$centimeter), $converter::$meter); $result->getValue(); // '1.10...' with 999 decimals $result->getFloatValue(); // 1.1 $result->getUnit()->getAbbreviation(); // 'm' $result->getUnit()->getName(); // 'meter' 1.4.2 Mathematical operations Most converters extend the AbstractMathematicalConverter, which provides some basic mathematical op- erations. These are examples for adding and subtracting values, even if they are provided in different units. Mathe- matical operations keep the Unit of the first ConvertibleValue. <?php $converter= new LengthConverter(); // addition $resultAdd= $converter->add( new ConvertibleValue('1', $converter::$meter), new ConvertibleValue('200', $converter::$centimeter) ); $resultAdd->getValue(); // '3.0' with 999 decimals $resultAdd->getFloatValue(); // 3 $resultAdd->getUnit()->getAbbreviation(); // 'm' $resultAdd->getUnit()->getName(); // 'meter' // subtraction $resultSub= $converter->sub( new ConvertibleValue('500', $converter::$centimeter), new ConvertibleValue('3', $converter::$meter) ); $resultSub->getValue(); // '800.0' with 999 decimals $resultSub->getFloatValue(); // 800 $resultSub->getUnit()->getAbbreviation(); // 'cm' $resultSub->getUnit()->getName(); // 'centimeter' 1.4.3 Nesting Feel free to nest mathematical operations and conversions as you like, as they all work on ConvertibleValue, which is the return type of all operations. <?php $converter= new LengthConverter(); try { $result= $converter->convert( $converter->add( $converter->add( new ConvertibleValue('10000', $converter::$nanometer), new ConvertibleValue('10', $converter::$micrometer) 1.4. Converters 5 unicorn Documentation, Release 1.0.0 ), new ConvertibleValue('30000', $converter::$nanometer) ), $converter::$micrometer ); } catch (UnsupportedUnitException $e){ // Unit might not be present in the converters units array } catch (InvalidArgumentException $e){ // Something is wrong with the provided ConvertibleValue or Unit } 1.4.4 Adding your own units All converters already provide a lot of units that you can use for conversions. However, if you are missing a Unit, you can add it to the converter and start using it. To add a Unit to the converter, just use the addUnit or setUnits method. Make sure to read about Unit_, before you start adding your own units. <?php $converter= new LengthConverter(); $myUnit= new Unit('myUnit', 'mu', '5'); $converter->addUnit($myUnit); try { $result= $converter->convert( new ConvertibleValue('1', $converter::$meter), $myUnit); $result->getValue(); // '5.0' with 999 decimals $result->getFloatValue(); // 5 $result->getUnit()->getAbbreviation(); // 'mu' $result->getUnit()->getName(); // 'myUnit' } catch (UnsupportedUnitException $e){ // Unit might not be present in the converters units array } catch (InvalidArgumentException $e){ // Something is wrong with the provided ConvertibleValue or Unit } Note: Not all converters are factor-based converters. Some converters, like the TemperatureConverter, convert based on formulas, so they don’t provide a addUnit oder setUnits method. If you want to add your own units, you need to extend the converter. See Extending converters for further information. 1.4.5 Extending converters Not all converters are factor-based converters. Some converters, like the TemperatureConverter, convert based on formulas, so they don’t provide a addUnit oder setUnits method. If you want to add your own units, you need to extend the converter. This example shows you how to extend the TemperatureConverter and how you add your own unit myUnit. The steps are: • Extend the TemperatureConverter • Add your own Unit as static member variable myUnit • Call the parent constructor and afterwards initialize your own unit myUnit and add it to the units array. • Override the getName method and return your own name mytemperature 6 Chapter 1. User Guide unicorn Documentation, Release 1.0.0 • Override the normalize method and add a case for your own unit myUnit • Override the convertTo method and add a case for your own unit myUnit <?php namespace Xynnn\Unicorn\Converter; use Xynnn\Unicorn\Model\Unit; use Xynnn\Unicorn\Model\ConvertibleValue; class MyOwnTemperatureConverter extends TemperatureConverter { /** * @var Unit $myUnit Static instance for conversions */ public static $myUnit; /** * LengthConverter constructor. */ public function __construct() { parent::__construct(); $this->units[]= self::$myUnit= new Unit('MyUnit ', 'mu'); } /** * @return string Name of the converter */ public function getName(): string { return 'unicorn.converter.mytemperature'; } /** * @param ConvertibleValue $cv The Convertible to be normalized */ protected function normalize(ConvertibleValue $cv) { switch ($cv->getUnit()) { case self::$fahrenheit: $value= bcdiv(bcmul(bcsub($cv->getValue(), '32', self::MAX_DECIMALS), '5', self::MAX_DECIMALS), '9', self::MAX_DECIMALS); break; case self::$kelvin: $value= bcsub($cv->getValue(), '273.15', self::MAX_DECIMALS); break; case self::$myUnit: $value=1 * 1; // add your own formula break; default: $value= $cv->getValue(); } 1.4.
Recommended publications
  • Broadband/IP/Cloud Computing
    Broadband/IP/Cloud Computing Presentation to the Colorado Telecommunications Association www.cellstream.com (c) 2011 CellStream, Inc. 1 www.cellstream.com (c) 2011 CellStream, Inc. 2 www.cellstream.com (c) 2011 CellStream, Inc. 3 www.cellstream.com (c) 2011 CellStream, Inc. 4 www.cellstream.com (c) 2011 CellStream, Inc. 5 Past vs. Present The Past – 20th Century The Present – 21st Century • Peer-to-Peer with broadcast • Many-to-Many with multicast • Mix of Analog and Digital • All media is digital – single • Producers supply transport Consumers • All media is connected • Peer-to-Peer is 1:1 • Many-to-Many is M:N o Traditional Telephone • Producers and Consumers • Broadcast is 1:N do both o Newspaper o CNN takes reports from Twitter o TV/Radio o End users send pictures and reports www.cellstream.com (c) 2011 CellStream, Inc. 6 Where are we in Phone Evolution? PHONE 1.0 PHONE 2.0 PHONE 3.0 Soft phone Your Phone Number Your Phone Number Your Phone Number represents where you represents you represents an IP Address – are (e.g. 972-747- regardless of where you independent of location 0300 is home, 214- are. and appliance you are 405-3708 is work) using (e.g. IP Phone, Cell Phone, PDA, Computer, Television, etc.) www.cellstream.com (c) 2011 CellStream, Inc. 7 Phone 3.X • Examples of Phone 3.0 are Skype, Google Talk, others on a PC. • Phone 3.1 – Skype on an iTouch • Phone 3.2 – Android OS from Google – a phone Centric OS that runs on cellular appliances • Phone 3.3 – Android OS from Google that runs on a Phone Appliance www.cellstream.com (c) 2011 CellStream, Inc.
    [Show full text]
  • Etir Code Lists
    eTIR Code Lists Code lists CL01 Equipment size and type description code (UN/EDIFACT 8155) Code specifying the size and type of equipment. 1 Dime coated tank A tank coated with dime. 2 Epoxy coated tank A tank coated with epoxy. 6 Pressurized tank A tank capable of holding pressurized goods. 7 Refrigerated tank A tank capable of keeping goods refrigerated. 9 Stainless steel tank A tank made of stainless steel. 10 Nonworking reefer container 40 ft A 40 foot refrigerated container that is not actively controlling temperature of the product. 12 Europallet 80 x 120 cm. 13 Scandinavian pallet 100 x 120 cm. 14 Trailer Non self-propelled vehicle designed for the carriage of cargo so that it can be towed by a motor vehicle. 15 Nonworking reefer container 20 ft A 20 foot refrigerated container that is not actively controlling temperature of the product. 16 Exchangeable pallet Standard pallet exchangeable following international convention. 17 Semi-trailer Non self propelled vehicle without front wheels designed for the carriage of cargo and provided with a kingpin. 18 Tank container 20 feet A tank container with a length of 20 feet. 19 Tank container 30 feet A tank container with a length of 30 feet. 20 Tank container 40 feet A tank container with a length of 40 feet. 21 Container IC 20 feet A container owned by InterContainer, a European railway subsidiary, with a length of 20 feet. 22 Container IC 30 feet A container owned by InterContainer, a European railway subsidiary, with a length of 30 feet. 23 Container IC 40 feet A container owned by InterContainer, a European railway subsidiary, with a length of 40 feet.
    [Show full text]
  • Z/OS, Language Environment, and UNIX How They Work Together
    The Trainer’s Friend, Inc. 256-B S. Monaco Parkway Telephone: (800) 993-8716 Denver, Colorado 80224 (303) 393-8716 U.S.A. Fax: (303) 393-8718 E-mail: [email protected] Internet: www.trainersfriend.com z/OS, Language Environment, and UNIX How They Work Together The following terms that may appear in these materials are trademarks or registered trademarks: Trademarks of the International Business Machines Corporation: AD/Cycle, AIX, AIX/ESA, Application System/400, AS/400, BookManager, CICS, CICS/ESA, COBOL/370, COBOL for MVS and VM, COBOL for OS/390 & VM, Common User Access, CORBA, CUA, DATABASE 2, DB2, DB2 Universal Database, DFSMS, DFSMSds, DFSORT, DOS/VSE, Enterprise System/3090, ES/3090, 3090, ESA/370, ESA/390, Hiperbatch, Hiperspace, IBM, IBMLink, IMS, IMS/ESA, Language Environment, MQSeries, MVS, MVS/ESA, MVS/XA, MVS/DFP, NetView, NetView/PC, Object Management Group, Operating System/400, OS/400, PR/SM, OpenEdition MVS, Operating System/2, OS/2, OS/390, OS/390 UNIX, OS/400, QMF, RACF, RS/6000, SOMobjects, SOMobjects Application Class Library, System/370, System/390, Systems Application Architecture, SAA, System Object Model, TSO, VisualAge, VisualLift, VTAM, VM/XA, VM/XA SP, WebSphere, z/OS, z/VM, z/Architecture, zSeries Trademarks of Microsoft Corp.: Microsoft, Windows, Windows NT, Windows ’95, Windows ’98, Windows 2000, Windows SE, Windows XP Trademark of Chicago-Soft, Ltd: MVS/QuickRef Trademark of Phoenix Software International: (E)JES Registered Trademarks of Institute of Electrical and Electronic Engineers: IEEE, POSIX Registered Trademark of The Open Group: UNIX Trademark of Sun Microsystems, Inc.: Java Registered Trademark of Linus Torvalds: LINUX Registered Trademark of Unicode, Inc.: Unicode Preface This document came about as a result of writing my first course for UNIX on the IBM mainframe.
    [Show full text]
  • Breaking Through the Myths to Reality: a Future-Proof View Of
    Breaking Through the Myths to Reality A Future-Proof View of Fiber Optic Inspection and Cleaning Dear Viewer: As presented at BICSI® in February- 2018, this seminar has video and animations that Edward J. Forrest, Jr. are not available as a .pdf file. If you would like the RMS(RaceMarketingServices) original version, please contact BICSI or the author. Bringing Ideas Together Caution: This Presentation is going to be controversial! IT IS BASED ON 2,500 YEARS OF SCIENCE AND PRODUCT DEVELOPMENT 2 Fact OR FICTION of Fiber Optic Cleaning and Inspection This seminarWE WILL mayDISCUSS contradictAND currentDEFINE: trends ➢ There➢ Cleaningand are what OTHER you’ve is notWAYS been important…BESIDES taught. VIDEO ➢ ➢➢“Automatic99.9%Debris➢ ➢ExistingA “Reagent FiberonS Detection” CIENTIFICthe standards, Optic surface Grade” ConnectorR isEALITY of such“good Isopropanola fiber… as enough”.is optic a is IECconnector“Pass 61300Let’sanI NSPECTIONanythingeffective- Fail”separate- 3surface-35, is is bettereasy are Factsfiberto is “Best determine thantwoto from optic understand nothing!-dimensional Practice”Fiction cleaner What we’veTwoif the ( ALL-Dimensional connector) been taught/bought/soldand is Structure“clean” over the last 30+Myth yearsfrom may“diameter”. Scientific not be the same Reality thing! 3 Fact OR FICTION of Fiber Optic Cleaning and Inspection ➢ A Fiber Optic Connector is a Two-Dimensional Structure ➢ 99.9% “Reagent Grade” Isopropanol is an effective fiber optic cleaner ➢ Cleaning is not important… anything is better than nothing! ➢ There are OTHER WAYS BESIDES VIDEO INSPECTION to determine if the connector is “clean” ➢ Debris on the surface of a fiber optic connector surface is two-dimensional “diameter”. ➢ “Automatic Detection” is “good enough”.
    [Show full text]
  • File Organization and Management Com 214 Pdf
    File organization and management com 214 pdf Continue 1 1 UNESCO-NIGERIA TECHNICAL - VOCATIONAL EDUCATION REVITALISATION PROJECT-PHASE II NATIONAL DIPLOMA IN COMPUTER TECHNOLOGY FILE Organization AND MANAGEMENT YEAR II- SE MESTER I THEORY Version 1: December 2 2 Content Table WEEK 1 File Concepts... 6 Bit:... 7 Binary figure... 8 Representation... 9 Transmission... 9 Storage... 9 Storage unit... 9 Abbreviation and symbol More than one bit, trit, dontcare, what? RfC on trivial bits Alternative Words WEEK 2 WEEK 3 Identification and File File System Aspects of File Systems File Names Metadata Hierarchical File Systems Means Secure Access WEEK 6 Types of File Systems Disk File Systems File Systems File Systems Transactional Systems File Systems Network File Systems Special Purpose File Systems 3 3 File Systems and Operating Systems Flat File Systems File Systems according to Unix-like Operating Systems File Systems according to Plan 9 from Bell Files under Microsoft Windows WEEK 7 File Storage Backup Files Purpose Storage Primary Storage Secondary Storage Third Storage Out Storage Features Storage Volatility Volatility UncertaintyAbility Availability Availability Performance Key Storage Technology Semiconductor Magnetic Paper Unusual Related Technology Connecting Network Connection Robotic Processing Robotic Processing File Processing Activity 4 4 Technology Execution Program interrupts secure mode and memory control mode Virtual Memory Operating Systems Linux and UNIX Microsoft Windows Mac OS X Special File Systems Journalized File Systems Graphic User Interfaces History Mainframes Microcomputers Microsoft Windows Plan Unix and Unix-like operating systems Mac OS X Real-time Operating Systems Built-in Core Development Hobby Systems Pre-Emptification 5 5 WEEK 1 THIS WEEK SPECIFIC LEARNING OUTCOMES To understand: The concept of the file in the computing concept, field, character, byte and bits in relation to File 5 6 6 Concept Files In this section, we will deal with the concepts of the file and their relationship.
    [Show full text]
  • IBM-IS-DCI-UR-Newsletter.Pdf
    Monthly Newsletter Mar 2016 Monthly Journal on Technology Know-How of IBM’s Technology space Tech Updates on Mainframe Platform “Mainframe“ the IBM Dictionary Of Computing defines "mainframe" as "a large computer, in particular one to which other computers can be connected so that they can share facilities the mainframe provides (for example, a System/370 computing system to which personal computers are attached so that they can upload and download programs and data). The term “Mainframe “ usually refers to hardware only, namely, main storage, execution circuitry and peripheral units“ level, as opposed to trying to do it all from the System z platform. Did you know that mainframes and all other computers have two types of physical storage: Internal and external. Physical storage located on the mainframe processor itself. This is called processor storage, real storage or central storage; think of it as memory for the mainframe. Physical storage external to the mainframe, including storage on direct access devices, such as disk drives and tape drives. This storage is called paging storage or auxiliary storage. The primary difference between the two kinds of storage relates to the way in which it is accessed, as follows: Central storage is accessed synchronously with the processor. That is, the processor must wait while data is retrieved from central storage. Auxiliary storage is accessed asynchronously. The processor accesses auxiliary storage through an input/output (I/O) request, which is scheduled to run amid other work requests in the system. During an I/O request, the processor is free to execute other, unrelated work.
    [Show full text]
  • The 2016 SNIA Dictionary
    A glossary of storage networking data, and information management terminology SNIA acknowledges and thanks its Voting Member Companies: Cisco Cryptsoft DDN Dell EMC Evaluator Group Fujitsu Hitachi HP Huawei IBM Intel Lenovo Macrosan Micron Microsoft NetApp Oracle Pure Storage Qlogic Samsung Toshiba Voting members as of 5.23.16 Storage Networking Industry Association Your Connection Is Here Welcome to the Storage Networking Industry Association (SNIA). Our mission is to lead the storage industry worldwide in developing and promoting standards, technologies, and educational services to empower organizations in the management of information. Made up of member companies spanning the global storage market, the SNIA connects the IT industry with end-to-end storage and information management solutions. From vendors, to channel partners, to end users, SNIA members are dedicated to providing the industry with a high level of knowledge exchange and thought leadership. An important part of our work is to deliver vendor-neutral and technology-agnostic information to the storage and data management industry to drive the advancement of IT technologies, standards, and education programs for all IT professionals. For more information visit: www.snia.org The Storage Networking Industry Association 4360 ArrowsWest Drive Colorado Springs, Colorado 80907, U.S.A. +1 719-694-1380 The 2016 SNIA Dictionary A glossary of storage networking, data, and information management terminology by the Storage Networking Industry Association The SNIA Dictionary contains terms and definitions related to storage and other information technologies, and is the storage networking industry's most comprehensive attempt to date to arrive at a common body of terminology for the technologies it represents.
    [Show full text]
  • Chapter 1: Data Storage
    Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns 1.5 The Binary System 1.6 Storing Integers 1.7 Storing Fractions 1.8 Data Compression 1.9 Communication Errors 1 Computer == 0 and 1 ? Hmm…every movie says so…. Chapter 2 2 Why I can’t see any 0 and 1 when opening up a computer?? Chapter 2 3 What’s really in the computer With the help of an oscilloscope (示波器) Chapter 2 4 HIGH Bits LOW Bit Binary Digit The basic unit of information in a computer A symbol whose meaning depends on the application at hand. Numeric value (1 or 0) Boolean value (true or false) Voltage (high or low) For TTL, high=5V, low=0V 5 More bits? kilobit (kbit) 103 210 megabit (Mbit) 106 220 gigabit (Gbit) 109 230 terabit (Tbit) 1012 240 petabit (Pbit) 1015 250 exabit (Ebit) 1018 260 zettabit (Zbit) 1021 270 6 Bit Patterns All data stored in a computer are represented by patterns of bits: Numbers Text characters Images Sound Anything else… 7 Now you know what’s a ‘bit’, and then? How to ‘compute’ bits? How to ‘implement’ it ? How to ‘store’ bit in a computer? Chapter 2 8 How to do computation on Bits? Chapter 2 9 Boolean Operations Boolean operation any operation that manipulates one or more true/false values (e.g. 0=true, 1=false) Can be used to operate on bits Specific operations AND OR XOR NOT 10 AND, OR, XOR 11 Implement the Boolean operation on a computer Chapter 2 12 Gates Gates devices that produce the outputs of Boolean operations when given
    [Show full text]
  • ESPPADOM Delivery Date: 30/03/2012 Comité Technique Statut: Travail Version: 00.02
    EDISANTE ESPPADOM_Delivery Date: 30/03/2012 Comité Technique Statut: Travail Version: 00.02 ESPPADOM_Delivery Modèle des données structurées Date: 30/03/2012 Statut: Travail Version: 00.02 EDISANTE ESPPADOM_Delivery Date: 30/03/2012 Comité Technique Statut: Travail Version: 00.02 ESPPADOM_Delivery: Modèle des données structurées Mention légale Clause de cession de droit de reproduction. L'auteur de ce document est : EDISANTE Comité Technique Le présent document est la propriété de l'auteur. Par la présente, l'auteur cède à titre gracieux à l’utilisateur du présent document, un droit de reproduction non exclusif dans le seul but de l’intégrer dans une application informatique. Cette cession est valable sur supports papier, magnétique, optique, électronique, numérique, et plus généralement sur tout autre support de fixation connu à la date de la reproduction, et permettant à l’utilisateur de créer l’application visée au paragraphe précédent. Cette cession est consentie pour l’ensemble du territoire national, et pour la durée de protection prévue par le code de la propriété intellectuelle. L’utilisateur fera son affaire personnelle de tout dommage qu’il causerait à un tiers et qui trouverait son origine dans une violation des termes de la présente cession. Toute atteinte aux droits d’auteur constitue un délit et est passible des sanctions indiquées aux articles L.335-1 et suivants du Code de propriété intellectuelle. EDISANTE ESPPADOM_Delivery Date: 30/03/2012 Comité Technique Statut: Travail Version: 00.02 Table des matières Documentation
    [Show full text]
  • Engilab Units 2018 V2.2
    EngiLab Units 2021 v3.1 (v3.1.7864) User Manual www.engilab.com This page intentionally left blank. EngiLab Units 2021 v3.1 User Manual (c) 2021 EngiLab PC All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the written permission of the publisher. Products that are referred to in this document may be either trademarks and/or registered trademarks of the respective owners. The publisher and the author make no claim to these trademarks. While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibility for errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or indirectly by this document. "There are two possible outcomes: if the result confirms the Publisher hypothesis, then you've made a measurement. If the result is EngiLab PC contrary to the hypothesis, then you've made a discovery." Document type Enrico Fermi User Manual Program name EngiLab Units Program version v3.1.7864 Document version v1.0 Document release date July 13, 2021 This page intentionally left blank. Table of Contents V Table of Contents Chapter 1 Introduction to EngiLab Units 1 1 Overview ..................................................................................................................................
    [Show full text]
  • Attacks on Quantum Key Distribution Protocols That Employ Non
    Attacks on quantum key distribution protocols that employ non‐ITS authentication Christoph Pacher, Aysajan Abidin, Thomas Lorünser, Momtchil Peev, Rupert Ursin, Anton Zeilinger and Jan-Åke Larsson The self-archived postprint version of this journal article is available at Linköping University Institutional Repository (DiVA): http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-91260 N.B.: When citing this work, cite the original publication. The original publication is available at www.springerlink.com: Pacher, C., Abidin, A., Lorünser, T., Peev, M., Ursin, R., Zeilinger, A., Larsson, J., (2016), Attacks on quantum key distribution protocols that employ non-ITS authentication, Quantum Information Processing, 15(1), 327-362. https://doi.org/10.1007/s11128-015-1160-4 Original publication available at: https://doi.org/10.1007/s11128-015-1160-4 Copyright: Springer Verlag (Germany) http://www.springerlink.com/?MUD=MP Attacks on quantum key distribution protocols that employ non-ITS authentication C Pacher1 · A Abidin2 · T Lor¨unser1 · M Peev1 · R Ursin3 · A Zeilinger3;4 · J-A˚ Larsson2 the date of receipt and acceptance should be inserted later Abstract We demonstrate how adversaries with large computing resources can break Quantum Key Distribution (QKD) protocols which employ a par- ticular message authentication code suggested previously. This authentication code, featuring low key consumption, is not Information-Theoretically Secure (ITS) since for each message the eavesdropper has intercepted she is able to send a different message from a set of messages that she can calculate by finding collisions of a cryptographic hash function. However, when this authentication code was introduced it was shown to prevent straightforward Man-In-The- Middle (MITM) attacks against QKD protocols.
    [Show full text]
  • Data Storage
    Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns 1.5 The Binary System 1.6 Storing Integers 1.7 Storing Fractions 1.8 Data Compression 1.9 Communication Errors 1 HIGH Bits LOW Bit Binary Digit A symbol whose meaning depends on the application at hand. Numeric value (1 or 0) Boolean value (true or false) Voltage (high or low) For TTL, high=5V, low=0V 2 More bits? kilobit (kbit) 103 210 megabit (Mbit) 106 220 gigabit (Gbit) 109 230 terabit (Tbit) 1012 240 petabit (Pbit) 1015 250 exabit (Ebit) 1018 260 zettabit (Zbit) 1021 270 3 Bit Patterns All data stored in a computer are represented by patterns of bits: Numbers Text characters Images Sound Anything else… 4 Boolean Operations Boolean operation any operation that manipulates one or more true/false values Can be used to operate on bits Specific operations AND OR XOR NOT 5 AND, OR, XOR 6 Gates Gates devices that produce the outputs of Boolean operations when given the operations‟ input values Often implemented as electronic circuits Provide the building blocks from which computers are constructed 7 AND, OR, XOR, NOT Gates Chapter 2 8 INPUT OUTPUT A B A NAND B NAND 0 0 1 0 1 1 1 0 1 NOR 1 1 0 XNOR 9 10 Store the bit What do we mean by „storing‟ the data? Bits in the computer at the i th second = Bits in the computer at the (i + 1) th second For example If the current state of the bit is „1‟, it should be still „1‟ at the next second 11 Flip-Flops Flip-Flop a circuit built from gates that can store one bit of data Two input lines One input line sets its stored value to 1 Another input line sets its stored value to 0 When both input lines are 0, the most recently stored value is preserved 12 Flip-Flops Illustrated X Y Z X Z 0 0 -- 0 1 0 Flip-Flop 1 0 1 Y 1 1 * 13 A Simple Flip-Flop Circuit 14 Setting to 1 – Step a.
    [Show full text]