An Adaptive Algorithm for Splitting Large Sets of Strings and Its Application to Efficient External Sorting

Total Page:16

File Type:pdf, Size:1020Kb

An Adaptive Algorithm for Splitting Large Sets of Strings and Its Application to Efficient External Sorting An Adaptive Algorithm for Splitting Large Sets of Strings and Its Application to Efficient External Sorting Tatsuya Asaiy Seishi Okamotoy Hiroki Arimuraz y Knowledge Research Center, Fujitsu Laboratories Ltd. 4–1–1 Kamikodanaka, Nakahara-ku, Kawasaki 211–8588, Japan Email: [email protected] Email: [email protected] z Graduate School of Information Science and Technology, Hokkaido University Kita 14–jo, Nishi 9–chome, Sapporo 060–0814, Japan Email: [email protected] Abstract Growth Internal memory Internal memory parameter ααα In this paper, we study the problem of sorting a large STEP1: BuildDietTrie T Sorted Bucket collection of strings in external memory. Based on Bucket adaptive construction of a summary data structure, S called adaptive synopsis trie, we present a practi- Sorted Bucket Bucket cal string sorting algorithm DistStrSort, which is Sorted Synopsis Trie TαS suitable to sorting string collections of large size in String Output List Input String Input List Sorted Bucket external memory, and also suitable for more com- Bucket plex string processing problems in text and semi- STEP2: SplitDietTrie STEP3: SortBucket STEP4: Merge structured databases such as counting, aggregation, and statistics. Case analyses of the algorithm and ex- Figure 1: The architecture of an external sorting al- periments on real datasets show the efficiency of our gorithm DistStrSort using adaptive construction algorithm in realistic setting. of a synopsis trie Keywords: external string sorting, trie sort, semi- structured database, text database, data splitting struction algorithm for synopsis tries for a large col- 1 Introduction lection of strings with the idea of adaptive growth. Based on this technique, we present an external Sorting strings is a fundamental task of string pro- string sorting algorithm DistStrSort. In Fig. 1, we cessing, which is not only sorting the objects in as- show an architecture of our external sorting. This sociated ordering, but also used as a basis of more algorithm first adaptively construct a small synopsis sophisticated processing such as grouping, count- trie as a model of string distribution by a single scan ing, and aggregation. With a recent emergence of of the input data, splits input strings into a collec- massive amount of semi-structured data (Abiteboul tion of buckets using the synopsis trie as a splitter, et al. 2000), such as plain texts, Web pages, or then sort the strings in each bucket in main memory, XML documents, it is often the case that we would and finally merge the sorted buckets into an output like to sort a large collection of strings that do not collection. fit into main memory. Moreover, there are poten- By an analysis, we show that if both of the size of tial demands for flexible methods tailored for semi- the synopsis trie and the maximum size of the buckets structured data beyond basic sorting facilities such are small enough to fit into main memory of size M, as statistics computation, counting, and aggregation then our algorithm DistStrSort correctly solves the over various objects including texts, data, codes, external string sorting problem in O(N) time within and streams (Abiteboul et al. 2005, Stonebraker et main memory M using 3N sequential read, N ran- al. 2005). dom write, and N sequential write in the external In this paper, we study efficient methods for sort- memory, where N is the total size of an input string ing strings in external memory. We present a new list S. Thus, this algorithm of O(N) time complex- approach to sorting a large collection of strings in ex- ity is attractive compared with a popular merge sort- ternal memory. The main idea of our method is to based external string sort algorithm of O(N log N) generalize distribution sort algorithms for collections time complexity. Experiments on real datasets show of strings by the extensive use of trie data structure. the effectiveness of our algorithm. To implement this idea, we introduce a synopsis data As an advantage, this algorithm is suitable structure for strings, called a synopsis trie, for ap- to implement complex data manipulation opera- proximate distribution, and develop an adaptive con- tions (Ramakrishnan and Gehrke 2000) such as group-by aggregation, statistics calculation, and func- 2.1 Strings tional join for texts. Let Σ = fA; B; A1;A2;:::g be an alphabet of letters, with which a total order ·Σ on Σ is associated. In 1.1 Related works particular, we assume that our alphabet is a set of In what follows, we denote by K = jSj and N = jjSjj integers in a small range, i.e., Σ = f0;:::;C ¡ 1g be the cardinality and the total size of an input string for some integer C ¸ 0, which is a constant or at list S 2 (Σ¤)¤. most O(N) for the total input size N. This is the A straightforward extension of quick sort al- case for ASCII alphabet f0;:::; 255g or DNA alpha- gorithm solves the string sorting problem in bet fA; T; C; Gg. O(LK log K) time in main memory, where L is the We denote by Σ¤ the set of all finite strings on Σ ¤ maximum length of the input strings and N = and by " the empty string. Let s = a1 ¢ ¢ ¢ an 2 Σ O(LK). This algorithm is efficient if L = O(1), but be a string on Σ. For 1 · i · j · n, we denote by inefficient if L is large. jsj = n the length of s, by s[i] = ai the i-th letter, Arge et al. presented an algorithm that solves and by s[i::j] = ai ¢ ¢ ¢ aj the substring from i-th to the string sorting problem in O(K log K + N) time j-th letters. If s = pq for some p; q 2 Σ¤ then we say in main memory (Arge et al. 1997). The String B- that p is a prefix of s and denote p v s. tree is an efficient dynamic indexing data structure We define the lexicographic order ·lex on strings ¤ for strings (Ferragina and Grossi 1999). This data of Σ by extending the total order ·Σ on letters in structure also has almost optimal performance for ex- the standard way. ternal string sorting in theory, while the performance degenerates in practice because of many random ac- 2.2 String sorting problem cess to external memory. For strings s ; : : : ; s 2 Σ¤, we distinguish an or- Sinha and Zobel presented a trie-based string 1 m dered list (s ; : : : ; s ), an unordered list (or multi- sorting algorithm, called the burst sort, and show 1 m set) ffs ; : : : ; s gg, and a set fs ; : : : ; s g (of unique that the algorithm outperforms many of previous 1 m 1 m strings) each other. The notations 2 and = are de- string sorting algorithms on real datasets (Sinha and fined accordingly. We use the intentional notation Zobel 2003). However, their algorithm is an inter- ( s j P (s) ) or f s j P (s) g. For lists of strings S ;S , nal sorting algorithm, and furthermore, the main aim 1 2 we denote by S S (S © S , resp.) the concatenation of this paper is proposal of an adaptive strategy for 1 2 1 2 of S ;S as ordered lists (as unordered lists, resp.). realizing an efficient external string sorting. 1 2 An input to our algorithm is a string list of size Although there are a number of studies on sort- K ¸ 0 that is just an ordered list S = (s ; : : : ; s ) 2 ing the suffixes of a single input string (Bentley and 1 K (Σ¤)¤ of possibly identical strings, where s 2 Σ¤ is a Sedgewick 1997, Manber and Myers 1993, Manzini i strings on Σ for every 1 · i · K. We denote by jSj = and Ferragina 2002, Sadakane 1999), they are rather PK irrelevant to this work since they are mainly incore K the cardinality of S and jjSjj = N = i=1 jsij the algorithms and utilize the repetition structure of suf- total size of S. We denote the set of all unique strings fixes of a string. in S by uniq(S) = f si j i = 1;:::;K g. A string list The adaptive construction of a trie for a stream of S = (s1; : : : ; sn) is sorted if si ·lex si+1 holds for letters has been studied since 90’s in time-series mod- every i = 1; : : : ; n ¡ 1. eling (Laird, Saul 1994), data compression (Moffat Definition 1 The string sorting problem (STR- 1990), and bioinformatics (Ron, Singer, Tishby 1996). SORT) is, given a string list S = (s1; : : : ; sK ) 2 However, the application of adaptive trie construction (Σ¤)¤, to compute the sorted list ¼(S) = to external sorting seems new and an interesting di- ¤ ¤ (s¼(1); : : : ; s¼(K)) 2 (Σ ) for some permutation ¼ : rection in text and semi-structured data processing. f1;:::;Kg ! f1;:::;Kg of its indices. Recently, (Stonebraker et al. 2005) showed the use- fulness of distributed stream processing as a massive We can extend our framework for more compli- data application of new type. cated string processing problems as follows. 1.2 Organization Definition 2 The string counting problem (STR- COUNT) is, given a string list S = (s1; : : : ; sK ) 2 This paper is organized as follows. In Section 2, we (Σ¤)¤, to compute the histogram h : uniq(S) ! N prepare basic notions and definitions on string sorting such that h(s) is the number of occurrences of the and related string processing problems. In Section 3, unique string s. we present our external string sorting algorithm based on adaptive construction of a synopsis trie. In Section Let (∆; ±) be a pair of a collection ∆ of values and 4, we report experiments on real datasets, and finally, a corresponding associative operation ± : ∆2 ! ∆.
Recommended publications
  • 15-122: Principles of Imperative Computation, Fall 2014 Lab 11: Strings in C
    15-122: Principles of Imperative Computation, Fall 2014 Lab 11: Strings in C Tom Cortina(tcortina@cs) and Rob Simmons(rjsimmon@cs) Monday, November 10, 2014 For this lab, you will show your TA your answers once you complete your activities. Autolab is not used for this lab. SETUP: Make a directory lab11 in your private 15122 directory and copy the required lab files to your lab11 directory: cd private/15122 mkdir lab11 cp /afs/andrew.cmu.edu/usr9/tcortina/public/15122-f14/*.c lab11 1 Storing and using strings using C Load the file lab11ex1.c into a text editor. Read through the file and write down what you think the output will be before you run the program. (The ASCII value of 'a' is 97.) Then compile and run the program. Be sure to use all of the required flags for the C compiler. Answer the following questions on paper: Exercise 1. When word is initially printed out character by character, why does only one character get printed? Exercise 2. Change the program so word[3] = 'd'. Recompile and rerun. Explain the change in the output. Run valgrind on your program. How do the messages from valgrind correspond to the change we made? Exercise 3. Change word[3] back. Uncomment the code that treats the four character array word as a 32-bit integer. Compile and run again. Based on the answer, how are bytes of an integer stored on the computer where you are running your code? 2 Arrays of strings Load the file lab11ex2.c into a text editor.
    [Show full text]
  • Unibasic 9.3 Reference Guide
    Unibasic - Dynamic Concepts Wiki 6/19/17, 1244 PM Unibasic From Dynamic Concepts Wiki Contents 1 UniBasic 2 About this Guide 2.1 Conventions 3 Installation & Configuration 3.1 Configuring Unix for UniBasic 3.1.1 Number of Processes 3.1.2 Number of Open Files 3.1.3 Number of Open i-nodes 3.1.4 Number of Locks 3.1.5 Message Queues 3.2 Unix Accounting & Protection System 3.3 Creating a Unix Account for UniBasic 3.4 UniBasic Security & Licensing 3.4.1 Software Licensing 3.4.2 Hardware Licensing 3.5 Loading the Installation File 3.5.1 Loading the UniBasic Installation File 3.5.2 Loading the UniBasic Development File 3.6 ubinstall - Installing UniBasic Packages 3.6.1 Errors During Installation 3.7 Configuring a UniBasic Environment 3.7.1 Directories and Paths 3.7.2 Filenames and Pathnames 3.7.3 Organizing Logical Units and Packnames 3.7.4 Environment Variables 3.7.5 Setting up .profile for Multiple Users 3.8 Command Line Interpreter 3.9 Launching UniBasic From Unix 3.10 Terminating a UniBasic Process 3.11 Licensing a New Installation 3.12 Changing the SSN Activation Key 3.13 Launching UniBasic Ports at Startup 3.14 Configuring Printer Drivers 3.15 Configuring Serial Printers 3.16 Configuring Terminal Drivers 3.17 Creating a Customized Installation Media 4 Introduction To UniBasic 4.1 Data 4.1.1 Numeric Data 4.1.1.1 Numeric Precision 4.1.1.2 Special Notes on %3 and %6 Numerics https://engineering.dynamic.com/mediawiki/index.php?title=Unibasic&printable=yes Page 1 of 397 Unibasic - Dynamic Concepts Wiki 6/19/17, 1244 PM 4.1.1.3 Integers Stored in Floating-Point
    [Show full text]
  • IBM Education Assistance for Z/OS V2R1
    IBM Education Assistance for z/OS V2R1 Item: ASCII Unicode Option Element/Component: UNIX Shells and Utilities (S&U) Material is current as of June 2013 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option Agenda ■ Trademarks ■ Presentation Objectives ■ Overview ■ Usage & Invocation ■ Migration & Coexistence Considerations ■ Presentation Summary ■ Appendix Page 2 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Version Trademarks ■ See url http://www.ibm.com/legal/copytrade.shtml for a list of trademarks. Page 3 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Presentation Objectives ■ Introduce the features and benefits of the new z/OS UNIX Shells and Utilities (S&U) support for working with ASCII/Unicode files. Page 4 of 19 © 2013 IBM Corporation Filename: zOS V2R1 USS S&U ASCII Unicode Option IBM Presentation Template Full Version Overview ■ Problem Statement –As a z/OS UNIX Shells & Utilities user, I want the ability to control the text conversion of input files used by the S&U commands. –As a z/OS UNIX Shells & Utilities user, I want the ability to run tagged shell scripts (tcsh scripts and SBCS sh scripts) under different SBCS locales. ■ Solution –Add –W filecodeset=codeset,pgmcodeset=codeset option on several S&U commands to enable text conversion – consistent with support added to vi and ex in V1R13. –Add –B option on several S&U commands to disable automatic text conversion – consistent with other commands that already have this override support. –Add new _TEXT_CONV environment variable to enable or disable text conversion.
    [Show full text]
  • Bidirectional Programming Languages
    University of Pennsylvania ScholarlyCommons Publicly Accessible Penn Dissertations Winter 2009 Bidirectional Programming Languages John Nathan Foster University of Pennsylvania, [email protected] Follow this and additional works at: https://repository.upenn.edu/edissertations Part of the Databases and Information Systems Commons, and the Programming Languages and Compilers Commons Recommended Citation Foster, John Nathan, "Bidirectional Programming Languages" (2009). Publicly Accessible Penn Dissertations. 56. https://repository.upenn.edu/edissertations/56 This paper is posted at ScholarlyCommons. https://repository.upenn.edu/edissertations/56 For more information, please contact [email protected]. Bidirectional Programming Languages Abstract The need to edit source data through a view arises in a host of applications across many different areas of computing. Unfortunately, few existing systems provide support for updatable views. In practice, when they are needed, updatable views are usually implemented using two separate programs: one that computes the view from the source and another that handles updates. This rudimentary design is tedious for programmers, difficult to reason about, and a nightmare to maintain. This dissertation presents bidirectional programming languages, which provide an elegant and effective mechanism for describing updatable views. Unlike programs written in an ordinary language, which only work in one direction, programs in a bidirectional language can be run both forwards and backwards: from left to right, they describe functions that map sources to views, and from right to left, they describe functions that map updated views back to updated sources. Besides eliminating redundancy, these languages can be designed to ensure correctness, guaranteeing by construction that the two functions work well together. Starting from the foundations, we define a general semantic space of well-behaved bidirectional transformations called lenses.
    [Show full text]
  • Reference Manual for the Icon Programming Language Version 5 (( Implementation for Limx)*
    Reference Manual for the Icon Programming Language Version 5 (( Implementation for liMX)* Can A. Contain. Ralph £ Grixwoltl, and Stephen B. Watnplcr "RSI-4a December 1981, Corrected July 1982 Department of Computer Science The University of Arizona Tucson, Arizona 85721 This work was supported by the National Science Foundation under Grant MCS79-03890. Copyright © 1981 by Ralph E. Griswold All rights reserved. No part of this work may be reproduced, transmitted, or stored in any form or by any means without the prior written consent of the copyright owner. CONTENTS Chapter i Introduction 1.1 Background I 1.2 Scope ol the Manual 2 1.3 An Overview of Icon 2 1.4 Syntax Notation 2 1.5 Organization ol the Manual 3 Chapter 2 Basic Concepts and Operations 2.1 Types 4 2.2 Expressions 4 2.2.1 Variables and Assignment 4 2.2.2 Keywords 5 2.2.3 Functions 5 2.2.4 Operators 6 2.3 Evaluation of Expressions 6 2.3.1 Results 6 2.3.2 Success and Failure 7 2.4 Basic Control Structures 7 2.5 Compound Expressions 9 2.6 Loop Control 9 2.7 Procedures 9 Chapter 3 Generators and Expression Evaluation 3.1 Generators 11 3.2 Goal-Directed Evaluation 12 }.?> Evaluation of Expres.sions 13 3.4 I he Extent ol Backtracking 14 3.5 I he Reversal ol Effects 14 Chapter 4 Numbers and Arithmetic Operations 4.1 Integers 15 4.1.1 literal Integers 15 4.1.2 Integer Arithmetic 15 4.1.3 Integer Comparison 16 4.2 Real Numbers 17 4.2.1 literal Real Numbers 17 4.2.2 Real Arithmetic 17 4.2.3 Comparison of Real Numbers IS 4.3 Mixed-Mode Arithmetic IX 4.4 Arithmetic Type Conversion 19
    [Show full text]
  • Software II: Principles of Programming Languages
    Software II: Principles of Programming Languages Lecture 6 – Data Types Some Basic Definitions • A data type defines a collection of data objects and a set of predefined operations on those objects • A descriptor is the collection of the attributes of a variable • An object represents an instance of a user- defined (abstract data) type • One design issue for all data types: What operations are defined and how are they specified? Primitive Data Types • Almost all programming languages provide a set of primitive data types • Primitive data types: Those not defined in terms of other data types • Some primitive data types are merely reflections of the hardware • Others require only a little non-hardware support for their implementation The Integer Data Type • Almost always an exact reflection of the hardware so the mapping is trivial • There may be as many as eight different integer types in a language • Java’s signed integer sizes: byte , short , int , long The Floating Point Data Type • Model real numbers, but only as approximations • Languages for scientific use support at least two floating-point types (e.g., float and double ; sometimes more • Usually exactly like the hardware, but not always • IEEE Floating-Point Standard 754 Complex Data Type • Some languages support a complex type, e.g., C99, Fortran, and Python • Each value consists of two floats, the real part and the imaginary part • Literal form real component – (in Fortran: (7, 3) imaginary – (in Python): (7 + 3j) component The Decimal Data Type • For business applications (money)
    [Show full text]
  • Standard TECO (Text Editor and Corrector)
    Standard TECO TextEditor and Corrector for the VAX, PDP-11, PDP-10, and PDP-8 May 1990 This manual was updated for the online version only in May 1990. User’s Guide and Language Reference Manual TECO-32 Version 40 TECO-11 Version 40 TECO-10 Version 3 TECO-8 Version 7 This manual describes the TECO Text Editor and COrrector. It includes a description for the novice user and an in-depth discussion of all available commands for more advanced users. General permission to copy or modify, but not for profit, is hereby granted, provided that the copyright notice is included and reference made to the fact that reproduction privileges were granted by the TECO SIG. © Digital Equipment Corporation 1979, 1985, 1990 TECO SIG. All Rights Reserved. This document was prepared using DECdocument, Version 3.3-1b. Contents Preface ............................................................ xvii Introduction ........................................................ xix Preface to the May 1985 edition ...................................... xxiii Preface to the May 1990 edition ...................................... xxv 1 Basics of TECO 1.1 Using TECO ................................................ 1–1 1.2 Data Structure Fundamentals . ................................ 1–2 1.3 File Selection Commands ...................................... 1–3 1.3.1 Simplified File Selection .................................... 1–3 1.3.2 Input File Specification (ER command) . ....................... 1–4 1.3.3 Output File Specification (EW command) ...................... 1–4 1.3.4 Closing Files (EX command) ................................ 1–5 1.4 Input and Output Commands . ................................ 1–5 1.5 Pointer Positioning Commands . ................................ 1–5 1.6 Type-Out Commands . ........................................ 1–6 1.6.1 Immediate Inspection Commands [not in TECO-10] .............. 1–7 1.7 Text Modification Commands . ................................ 1–7 1.8 Search Commands .
    [Show full text]
  • Rc the Plan 9 Shell
    Rc ߞ The Plan 9 Shell Tom Duff [email protected]−labs.com ABSTRACT Rc is a command interpreter for Plan 9 that provides similar facilities to UNIXߣs Bourne shell, with some small additions and less idiosyncratic syntax. This paper uses numerous examples to describe rcߣs features, and contrasts rc with the Bourne shell, a model that many readers will be familiar with. 1. Introduction Rc is similar in spirit but different in detail from UNIXߣs Bourne shell. This paper describes rcߣs principal features with many small examples and a few larger ones. It assumes familiarity with the Bourne shell. 2. Simple commands For the simplest uses rc has syntax familiar to Bourne-shell users. All of the fol­ lowing behave as expected: date cat /lib/news/build who >user.names who >>user.names wc <file echo [a−f]*.c who | wc who; date vc *.c & mk && v.out /*/bin/fb/* rm −r junk || echo rm failed! 3. Quotation An argument that contains a space or one of rcߣs other syntax characters must be enclosed in apostrophes (’): rm ’odd file name’ An apostrophe in a quoted argument must be doubled: echo ’How’’s your father?’ 4. Patterns An unquoted argument that contains any of the characters *?[is a pattern to be matched against file names. A * character matches any sequence of characters, ? matches any single character, and [class] matches any character in the class, unless the first character of class is ~, in which case the class is complemented. The class may ­ 2 ­ also contain pairs of characters separated by −, standing for all characters lexically between the two.
    [Show full text]
  • IBM ILOG CPLEX Optimization Studio OPL Language Reference Manual
    IBM IBM ILOG CPLEX Optimization Studio OPL Language Reference Manual Version 12 Release 7 Copyright notice Describes general use restrictions and trademarks related to this document and the software described in this document. © Copyright IBM Corp. 1987, 2017 US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Trademarks IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Other company, product, or service names may be trademarks or service marks of others. © Copyright IBM Corporation 1987, 2017. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Figures ............... v Limitations on constraints ........ 59 Formal parameters ...........
    [Show full text]
  • Just Go for It: the Story of Dance-Mat.Js
    Just go for it: The story of dance-mat.js Ramón Huidobro @hola_soy_milk ramonh.dev/dance-mat-js.pdf CW: Sick late 90’s beats I’m Ramón. Freelance software developer, Mozilla tech speaker. Kids’ coding instructor and football coach. I’m Ramón. Freelance software developer and kids’ coding instructor. @SenorHuidobro Dance Dance Revolution DDR The music. Good gravy, the music. const MPR121 = require('node-picap'); const mpr121 = new MPR121('0x5C'); mpr121.setTouchThreshold(40); mpr121.setReleaseThreshold(20); // Process touches mpr121.on('data', (data) => { try { // SEND DATA TO PC }); } catch(e) { console.log("ERROR: ", e); } }); != https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt Linux USB gadget configured through configfs https://randomnerdtutorials.com/rasp berry-pi-zero-usb-keyboard-hid/ 1. Enable Raspberry Pi OTG (USB on the go) 2. Add boot script to enable Keyboard HID device on the configfs pi@raspberrypi:~ $ echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt pi@raspberrypi:~ $ echo "dwc2" | sudo tee -a /etc/modules pi@raspberrypi:~ $ sudo echo "libcomposite" | sudo tee -a /etc/modules 1. Enable Raspberry Pi OTG (USB on the go) 2. Add boot script to enable Keyboard HID device on the configfs #!/bin/bash cd /sys/kernel/config/usb_gadget/ mkdir -p ddrusb cd ddrusb echo 0x1d6b > idVendor # Linux Foundation echo 0x0104 > idProduct # Multifunction Composite Gadget echo 0x0100 > bcdDevice # v1.0.0 echo 0x0200 > bcdUSB # USB2 mkdir -p strings/0x409 echo "fedcba9876543210" > strings/0x409/serialnumber echo "Ramon Huidobro" >
    [Show full text]
  • Numeric and String Variables
    Chapter II-7 II-7Numeric and String Variables Overview.......................................................................................................................................................... 94 Creating Global Variables.............................................................................................................................. 94 Uses For Global Variables.............................................................................................................................. 94 Variable Names ............................................................................................................................................... 94 System Variables ............................................................................................................................................. 95 User Variables ................................................................................................................................................. 95 Special User Variables ............................................................................................................................ 95 Numeric Variables................................................................................................................................... 96 String Variables........................................................................................................................................ 97 Local and Parameter Variables in Procedures ...................................................................................
    [Show full text]
  • Ed: a Context Editor for the Cp/M Disk System User's
    Post Office Box 579, Pacific Grove, California 93950, (408) 373-3403 ED: A CONTEXT EDITOR FOR THE CP/M DISK SYSTEM USER'S MANUAL COPYRIGHT © 1976, 1978 DIGIT AL RESEARCH r Copyright © 1976, 1978 by Digital Research. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or trans­ lated into any language or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise, without the prior written permission of Digital Research, Post Office Box 579, Pacific Grove, California 93950. Disclaimer Digital Research makes no representations or warranties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Further, Digital Research reserves the right to revise this publication and to make changes from time to time in the content hereof without obligation of Digital Research to notify any person of such revision or changes. Table of Contents 1. ED TUTORIAL • · · · • • · • • 1 l~l Introduction to ED • . 1 1.2 ED Operation .•. 1 1.3 Text Transfer Functions 1 1.4 Memory Buffer Organization. 5 1.5 Memory Buffer Operation..•. 5 1.6 Command Strings 7 1.7 Text Search and Alteration. • • 8 1.8 Source Libraries . • • • . • • 11 1.9 Repetitive Command Execution •• • • 12 2. ED"ERROR CONDITIONS •• . • 13 3. CONTROL CHARACTERS AND COMMANDS . 14 ii ED USER'S MANUAL 1. ED TUTORIAL 1.1. Introduction to ED. ED is the context editor for CP/M, and is used to create and alter CP/M source files.
    [Show full text]