4 Pages

emacs-intro

Course: STA 290, Fall 2008
School: Duke
Rating:
 
 
 
 
 

Word Count: 1593

Document Preview

290: Stat Introduction to Unix and Emacs Objectives 1. To introduce basic emacs commands 2. To introduce some basic unix commands Notation The notation C-g means to hold down the Control key and hit the g key, while M-a means to invoke the Meta key (either hold down the Alt key, or press and release the Esc key, depending on your keyboard - I use the latter) and hit the a key. Reminders If something starts to go...

Register Now

Unformatted Document Excerpt

Coursehero >> North Carolina >> Duke >> STA 290

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
290: Stat Introduction to Unix and Emacs Objectives 1. To introduce basic emacs commands 2. To introduce some basic unix commands Notation The notation C-g means to hold down the Control key and hit the g key, while M-a means to invoke the Meta key (either hold down the Alt key, or press and release the Esc key, depending on your keyboard - I use the latter) and hit the a key. Reminders If something starts to go horribly wrong, use C-g to cancel the current command (infrequently, you may need to use it several times). You can also undo commands successively with either C-x u or C- (thats Control-underscore). Recall that C-x C-c will quit emacs, and C-z will suspend it, shrinking the window into an icon. The help menus in emacs are triggered with C-h and are quite extensive. Introduction to Emacs Start up Emacs by typing at the unix command prompt: emacs & Note that the ampersand runs the process in the background, so that you can continue to use the unix shell window while emacs is running. If you forgot the ampersand, at the unix prompt type C-z, then enter bg to put emacs in the background. Now type the following into your emacs window: Your name (on the rst line), your department on the second line, followed by a blank line, for example: Merlise Clyde Institute of Statistics and Decision Sciences Cursor Movement Now well walk through a variety of cursor movement commands. Try the following to get accustomed to moving the cursor without using the arrows or the mouse. Hit M-< to move to the beginning of the buer. C-f moves you forward one character, C-b moves you back. M-f moves you forward one word, M-b moves you back one word. C-n moves you down to the next line, C-p moves you up to the previous line. C-e moves you to the end of the line, C-a moves you to the beginning of the line. If your document scrolled over more than one screen, you can use C-v to scroll down and M-v to scroll up. 1 Files and Buers Suppose you now want to save this unnamed le (or if it already had a name, supposed you wanted to rename it). To write a le to disk, use C-x C-w and then type in the name of the le, myname.txt and hit enter, as in: C-x C-w merlise.txt Now well update the le. Move to the last line of the le, and add the following information to your le: previous applied and theoretical statistics courses that you have taken at Duke and/or other institutions (please name), experience with S-Plus or R, experience with LaTeX, familiarity with Unix. (Depending on how your defaults are set up, emacs may or may not automatically insert line breaks when you type too close to the right hand margin. If it does not, you can get it to x your paragraph By typing M-q. The technical term for this is auto-ll.) Now save your updated le by typing C-x C-s. This is the standard way of saving your le. Emacs does have an auto-save feature, but you should get into the habit of saving your work very frequently as you work, just in case something bad should happen. Without closing emacs, open a new le (the previous le, myname.txt, will still be open, but in a dierent buer) by typing C-x C-f lab1hw.txt Tell me a little bit about what type of applications interest you or topics that you would like to learn about in this course. Save this le with C-x C-s. Since myname.txt is still in another buer, we can still access it. To switch to another buer, type in C-x b and it will ask you which buer you wish to switch to. The default will be myname.txt, so you can just hit enter (otherwise you can type in the name of the buer you want). In this way, you can have many les open in the same emacs process, and just switch between them as need be. You can also have more than one displayed at the same time. Split the screen by typing C-x 2 You will now have two buers, each half the size of the emacs window, each containing the same le. Switch one of them to lab1hw.txt using C-x b. Now you have easy access to both les. To move the cursor between the buers, use C-x o. To go back to a single window (just the window containing the use cursor) C-x 1. You can close a le with C-x k (this kills the buer), but leave the two les open, as well continue to use them in the next section. Cut, Copy, and Paste Bring myname.txt to the front of your emacs window (if it isnt already, use C-x b to switch buers, or C-x C-f to open it from the disk if youve closed it). Suppose we want to move the two sentences name and department to the le lab1hw.txt. Move your cursor to the rst letter of the rst sentence and then type Control-space. This sets the mark at that character. Now move past the end of the second sentence and type C-w. This cuts the marked section. (If you miss, you 2 can use C- to undo.) If we just wanted to delete this part, we have done so and can just move on, but we want to move it, so we need to paste it back in. Switch to the lab1hw.txt buer, move to the beginning of the document (M-< is the shortcut) and type in C-y (yank is the mnemonic) to paste in the text. Move to the end of the le (M->) and paste another copy with C-y. This is just to practice a dierent deletion technique. Move your cursor back to the beginning of the section that was just pasted in and use C-k to kill all the text on the same line to the right of the cursor. Use C-k repeatedly until all the freshly pasted text has been removed. Finally, you should know that M-w will copy text to the kill buer (like C-w) but without deleting it, so that you can paste it elsewhere without removing the original. You can either save your work with C-x C-s, or kill all the recent changes by killing the buer C-x k and entering yes when it asks for conrmation of closing without saving. Were done with emacs for now, so you can close it with C-x C-c. Basic Unix Commands Back in your unix shell window, type ls After hitting enter, you will get a list of all the les in the current directory. You may have started in your root directory (), which probably isnt where you want these les. Make a new directory for this class by typing mkdir sta290 Now move the new le into this directory, rst use mv myname.txt sta290/. Note that the period at the end says to keep the name of the le the same. For the second le, use tab-completion so that you dont have to type in the whole le name, i.e., instead of typing in mv lab1hw.txt sta290/., type in (without hitting enter) mv la and hit the tab key so that unix will ll in the rest of the name (or as much as it can if there are m...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Pace - D - 891
A Pervasive Computing Solution To Asset, Problem And Knowledge ManagementAuthor:Suman Kalia Dr. Charles Tappert Dr. Allen Stix Dr. Fred GrossmanIntroductionInformation is the new currency of the global economy. We increasingly rely on the elec
UCSD - CSE - 151
This Is a Publication of The American Association for Artificial IntelligenceThis electronic document has been retrieved from the American Association for Artificial Intelligence 445 Burgess Drive Menlo Park, California 94025 (415) 328-3123 (415) 3
Texas Tech - CS - 5352
THE ADVANCED COMPUTING SYSTEMS ASSOCIATIONThe following paper was originally published in theProceedings of the FREENIX Track:1999 USENIX Annual Technical ConferenceMonterey, California, USA, June 611, 1999Soft Updates: A Technique for Elimin
Texas Tech - CS - 5384
%!PS-Adobe-2.0 %Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %Title: this2.dvi %Pages: 4 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: CMR17 CMR12 CMBX12 CMTI12 CMMI12 CMSY10 CMR8 CMMI8 %DocumentPaperSizes: Letter %EndCom
Texas Tech - CS - 5384
%!PS-Adobe-2.0 %Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %Title: this3.dvi %Pages: 4 %PageOrder: Ascend %BoundingBox: 0 0 612 792 %DocumentFonts: CMR17 CMR12 CMBX12 CMMI12 CMSY10 CMTT12 CMTI12 %DocumentPaperSizes: Letter %EndComment
Texas Tech - CS - 5375
Low Power Cache Design M.Bilal Paracha Hisham Chowdhury Ali Raza AcknowlegementsChingLong Su and Alvin M Despain from University of Southern California,&quot;Cache Design Tradeoffs for Power and Performance
Texas Tech - CS - 5381
Symbol TablesSymbol TablesSymbol table, dictionary.nSet of items with keys. INSERT a new item. SEARCH for an existing item with a given key.nnApplications.These lecture slides have been adapted from:nOnline phone book looks up names
Texas Tech - CS - 5331
The Marriage of J2EETM and JiniTM TechnologiesBruce Cohen Software Architect Brokat Technologies871, The Marriage of J2EE and Jini TechnologyIntroduction Goal of this presentation Give my answers to the questions: &quot;Are the J2EETM and JiniTM t
Texas Tech - CS - 5381
7ZR *UHDW 6RUWLQJ $OJRULWKPV/HFWXUH 4XLFNVRUW 0HUJHVRUW7ZR JUHDW VRUWLQJ DOJRULWKPVs)XOO VFLHQWLILF XQGHUVWDQGLQJ RI WKHLU SURSHUWLHV KDV HQDEOHG XV WR KDPPHU WKHP LQWR SUDFWLFDO V\VWHP VRUWV 2FFXSLHV D SURPLQHQW SODFH LQ ZRUOGV FRPSXWDWLRQD
Texas Tech - CS - 5381
Symbol TablesSymbol TablesSymbol table, dictionary.nSet of items with keys. INSERT a new item. SEARCH for an existing item with a given key.nnApplications.These lecture slides have been adapted from:nOnline phone book looks up names
Texas Tech - CS - 5352
ProcessesCS 217Operating System Supports virtual machinesPromises each process the illusion of having whole machine to itself Provides services:Protection Scheduling Memory management File systems Synchronization etc.User ProcessUs
Texas Tech - CS - 5352
Chapter 5: ThreadsSingle and Multithreaded ProcessesOverview Multithreading Models Threading Issues Pthreads Solaris 2 Threads Windows 2000 Threads Linux Threads Java ThreadsOperating System Concepts5.1Silberschatz, Galvin and Gagne 2002O
Texas Tech - CS - 5353
Symbol Table ImplementationsSymbol table will be used to answer two questions:1.Given a declaration of a name, is there already a declaration of the same name in the current scopei.e., is it multiply declared?2.Given a use of a name, to whic
Texas Tech - CS - 5353
Lexical AnalysisRegular Expressions Nondeterministic Finite Automata (NFA) Deterministic Finite Automata (DFA) Implementation Of DFAKey Differences for a Scanner and RE RecognizerGiven a single string, automata and regular expressions retuned a B
Texas Tech - CS - 5353
Top-Down ParsingTop-down parsing methodsRecursive descent Predictive parsingImplementation of parsers Two approachesTop-down easier to understand and program manually Bottom-up more powerful, used by most parser generatorsReading: Section 4.
Texas Tech - CS - 5331
What is `Object-Oriented Programming'? (1991 revised version)Bjarne Stroustrup AT&amp;T Bell Laboratories Murray Hill, New Jersey 07974ABSTRACT `Object-Oriented Programming' and `Data Abstraction' have become very common terms. Unfortunately, few peop
Texas Tech - CS - 5353
Where are we? We have talked aboutIntermediate RepresentationsFebruary 19, 2001 CS 132: Compiler Design Reading in concrete syntax Generating abstract syntax Analyzing and annotating the abstract syntax Typechecking Escaping variables Wha
UMBC - P - 192
Expansion Coefficients at Room Temperature Linear Expansion (10-5/K) Solids Aluminum Brass Copper Glass Pyrex Glass Iron(soft) Lead Platinum Quartz Silver Steel Tungsten Concrete Liquids Benzene Ethyl Alcohol Gasoline Mercury Water (&gt;10C) Gases Air
UMBC - P - 192
Physics 192 Tutorial Circuits1. In the circuit shown, find the total resistance. 27 12 V 100 500 2. Find the total resistance of: 100 220 1000 220 4700 20 V3. Find the total resistance for: 270 20 V 1 k 100 10 k4.7 k100 k4. For
UMBC - P - 192
Physics 192 Tutorial Circuits 2 Kirchhoff's Laws 1. In the circuit shown, find the current in each resistor. 87 12 V 120 4V2. Find the current in each resistor: 220 20 V 520 12 V840 3. For the circuit below, calculate the current flowing
UMBC - P - 151
Physics 151: Vector Mathematicsr 1) The vector A is: v A) greater than A in magnitude r C) in the direction opposite to Av B) less than A in magnitude r D) perpendicular to A2) Select the list which contains only vector quantities? A) distance,
UMBC - P - 151
Physics 151: General Kinematics1) A particle moves along the x axis from x1 to x2. Of the following values of the initial and final co-ordinates, which results in a displacement that is in the negative direction? A) x1 = 4 m , x2 = 6 m B) x1 = -4 m
UMBC - P - 151
Answers to Text Problems Chapter 1 Kinematics Page I 13, 14 1. 2. 3. 4. 5. 7. 11. 12. 13. 19 25. 27. 31. 10 km east 43.8 km at 77 N of E 41.4 km/h or 11.5 m/s 7.1 km/h west or 1.98 m/s west 3.6 km/h at 70 N of W 5.1 m/s at 33.5 E of N 4.1 km at 13 N
George Mason - PHYSICS - 261
The Eects of Mass, Length, and Amplitude on the Period of a Simple PendulumPhil Rubin September 26, 2004Abstract The eects of bob mass, length, and amplitude on the period of a simple pendulum are investigated. Mass is found to have no eect on the
UMBC - CPATEL - 640
Advanced VLSI DesignCombinational Logic DesignCMPE 640Ratioed Logic One method to reduce the circuit complexity of static CMOS. Here, the logic function is built in the PDN and used in combination with a simple load device. Resistive load In1 I
UMBC - CPATEL - 640
Advanced VLSI DesignCombinational Logic DesignCMPE 640Pass Gate Logic An alternative to implementing complex logic is to realize it using a logic network of pass transistors (switches). Regeneration is performed via a buffer.Switch NetworkW
UMBC - CPATEL - 640
Advanced VLSI DesignSequential Logic DesignCMPE 640Concepts In sequential logic, the outputs depend not only on the inputs, but also on the preceding input values. it has memory. Memory can be implemented in 2 ways: Positive feedback or regener
UMBC - CPATEL - 640
Advanced VLSI DesignSequential Logic DesignCMPE 640Smaller Static Flip-Flops Positive feedback is not the only means to implement a memory function. A capacitor can act as a memory element as well. In this case, a periodic refresh is required (
UMBC - CPATEL - 640
Spring 2009: CMPE 640 Project Specification Project Specification: Cache Design(Please refer to the webpage for any changes to this specification over the next couple of weeks). Assigned: Apr 10th Due: Last Day of ClassDescription:Design a virtua
UMBC - CPATEL - 641
CMPE 641: Reading AssignmentRead the following papers. The papers are located in the class_locker under std_cells/papers 1. K. Scott and K. Keutzer, &quot;Improving Cell Libraries for Synthesis&quot; 2. N. Minh Duc and T. Sakurai, &quot;Compact yet High-Performanc
UMBC - CPATEL - 315
Principles of VLSI DesignInterconnect and Wire EngineeringCMPE 413Interconnect Analysis of interconnect is becoming as important as transistors in modern processes. Modern processes use 6-10 metal layers Layer T (nm) W (nm) S (nm) AR Layer stac
UMBC - CPATEL - 315
CMPE 315 Lab LAB Assignment #5 for CMPE 315Assigned: Friday, Mar 13th Due: Monday, Mar 30thDescription: Import VHDL code from Lab1, perform layout and run LVS. Import the vhdl code that you wrote for the 4-bit ALU circuit in Lab 1 to generate
UMBC - CPATEL - 315
Spring 2009: CMPE 315 Project Specification Project Specification: Cache Design(Please refer to the webpage for any changes to this specification over the next couple of weeks). Assigned: Apr 3rd Due: May 8th (Last lab session) Code Submission: In t
UMBC - CPATEL - 313
STUDENT NAME:-In-class lab #2CMSC313 Fall 2003 In Class Lab #2 Introducing the JK Flip-FlopObjectives Review the operation of a JK flip-flop circuit. Implement a clocked JK flip-flop using 74 series gates. Verify the truth table using this circu
UMBC - CPATEL - 313
CMSC 313, Computer Organization &amp; Assembly Language ProgrammingFall 2003Course DescriptionInstructor: Office: Office Hours: Telephone: Email: Chintan Patel ITE 322 Mon &amp; Wed 10:00am11:30am 455-3963 cpatel2@csee.umbc.eduThe TAs office hours wil
UMBC - CPATEL - 313
A-3Appendix A - Digital LogicThe Basic Properties of Boolean AlgebraPrinciple of duality: The dual of a Boolean function is gotten by replacing AND with OR and OR with AND, constant 1s by 0s, and 0s by 1sPostulatesTheoremsA, B, etc. are L
UMBC - CPATEL - 313
B-3Appendix B - Reduction of Digital LogicReduction (Simplification) of Boolean ExpressionsPrinciples of Computer Architecture by M. Murdocca and V. Heuring 1999 M. Murdoc c a and V. He uringB-4Appendix B - Reduction of Digital LogicRed
UMBC - CPATEL - 313
3-5Chapter 3 - ArithmeticConstructing Larger Adders A 16-bit adder can be made up of a cascade of four 4-bit ripplecarry adders. Circuit gets slower as it gets bigger.Principles of Computer Architecture by M. Murdocca and V. Heuring 1999
UMBC - CPATEL - 313
A-3Appendix A - Digital LogicClassical Model of a Finite State Machine An FSM is composed of a combinational logic unit and delay elements (called flip-flops) in a feedback path, which maintains state information. This particular FSM is based on
UMBC - CPATEL - 313
y G y 8I fyyy Ip ~d48f Vydh$yy~y)Yy~yVy4 4Td4y)d9om VidyV4y~yQ ydT| S4 4yV h I9 ECu hSx xk 98igh 8vr ICqvy 8f T9pEu x99E|u99iS99'Y4vIpv j g k le y kfzfw hw e kgw vj f
UMBC - CPATEL - 313
t 9(7V17dy}(dtl q Y c7j9ms i v Al7VjVVR7&quot;i9j V9i x g u H7 x g u fV17 1 V97i y e h e y i 7 i yh l g yih e yh y 97g $q Vj9 i(FV7TFAi qFg F9171}R V RFVi( afkj7 V (9i$F9 i(7QRie RR a x g u H7R x g u v9f x g
UMBC - CPATEL - 313
CMSC 313, Computer Organization &amp; Assembly Language ProgrammingFall 2003Project 4: C FunctionsDue: Tue 10/14/03, Section 0101 (Chang) &amp; Section 0301 (Macneil) Wed 10/15/03, Section 0201 (Patel &amp; Bourner) Objective The objective of this programmi
Yale - CS - 112
Java Software SolutionsLewis and Loftuspresentation slides forJava Software SolutionsFoundations of Program Designby John Lewis and William LoftusPublished by Addison-WesleyJava Software SolutionsLewis and LoftusFocus of the course P
Yale - CS - 112
Java Software SolutionsLewis and LoftusSoftware Concepts - Introduction Now we can begin to examine the basic ideas behind writing programs Chapter 2 focuses on: the structure of a Java application basic program elements preparing and ex
Yale - CS - 112
Java Software SolutionsLewis and LoftusProgram Elements - Introduction We can now examine the core elements of programming Chapter 3 focuses on: data types variable declaration and use operators and expressions decisions and loops input a
Yale - CS - 112
Java Software SolutionsLewis and LoftusInheritance - Introduction Another fundamental object-oriented technique is called inheritance, which, when used correctly, supports reuse and enhances software designs Chapter 8 focuses on: the conc
Yale - CS - 112
Java Software SolutionsLewis and LoftusThe Software Development Process-In The quality of the software we create is a d the process we follow to develop it Chapter 11 focuses on: software life cycle development models prototypes robot
Yale - CS - 112
Java Software SolutionsLewis and LoftusRecursion-Introduction Recursion is a fundamental programming techn can provide an elegant solution certain kind Chapter 12 focuses on: thinking in a recursive manner programming in a recursive ma
Yale - CS - 112
Java Software SolutionsLewis and LoftusSorting and Searching-Introduction Two common programming tasks are sorting a l items and searching for an item in a list Chapter 13 focuses on: Selection Sort Insertion Sort A generic sort for
Yale - CS - 112
Java Software SolutionsLewis and LoftusSoftware Development Process II-Int We now extend the process established in Cha include more object-oriented issues Chapter 15 focuses on: evolutionary development object-oriented design and imple
Yale - CS - 112
Java Software SolutionsLewis and LoftusData Structures-Introduction Lets explore some advanced techniques for o and managing information Chapter 16 focuses on: dynamic structures Abstract Data Types (ADTs) linked lists queues stacks
Clemson - UNIT - 108
Stanford - CS - 156
CS156: The Calculus of ComputationZohar Manna Winter 2008Chapter 11: ArraysPage 1 of 55Arrays I: Quantier-free Fragment of TASignature: A : {[], , =} wherea[i] binary function read array a at index i (read(a,i) a i v ternary function
Milwaukee School of Engineering - CE - 1910
MSOE EECS Department: Dr. Durant CE1910: Wk. 5 Lab Grading ChecklistName: _ Item Completed Score Checking Progress 7-seg decoder VHDL, documented 7-seg simulation, including your name in footer (File|Page Setup), with illustration showing that all c
Laurentian - DAY - 3601
Integrating Art and Social Studies Billie Hogan Student PresentationWhat is integration? &quot;The arts are taught integratively with other courses when hey are used to convey the learning objectives; however, they are not reduced to mere means for teac
NMT - EE - 308
DOCUMENT NUMBER S12SPIV3/DSPI Block Guide V03.06Original Release Date: 21 JAN 2000 Revised: 04 FEB 2003Motorola, Inc.Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, repres
UCSD - VLSICAD - 110
Can Recursive Bisection Alone Produce Routable Placements?Andrew E. Caldwell, Andrew B. Kahng and Igor L. Markov UCLA Computer Science Dept., Los Angeles, CA 90095-1596 fcaldwell,abk,imarkovg@cs.ucla.eduAbstract This work focuses on congestion-d
New Mexico - CS - 534
SAN FRANCISCO JULY 22-26Volume 19, Number 3, 1985An I m a g e S y n t h e s i z e rKen PerlinCourant Institute of Mathematical Sciences New York UniversityAbstractWe introduce the concept of a Pixel Stream Editor. This forms the basis for a
New Mexico - CS - 530
The 2D Fourier Transform The analysis and synthesis formulas for the 2D continuous Fourier transform are as follows: Analysis F(u, v) = Synthesis f (x, y) =Z Z Zf (x, y)e j2(ux+vy)dx dy ZF(u, v)e j2(ux+vy)du dvSeparability of 2
Clemson - BUSINESS - 072408
Skip to page navigation|Skip navigation|Acrobat Reader|Flash Player|Text Version A-Z Index Calendar Map Webcams Phonebook Search: http:/www.clemson.edu/Page Not Found!Requesting page: /404Error.phpThe Web page you have requested is not cur
Clemson - BUSINESS - 0708
Skip to page navigation|Skip navigation|Acrobat Reader|Flash Player|Text Version A-Z Index Calendar Map Webcams Phonebook Search: http:/www.clemson.edu/Page Not Found!Requesting page: /404Error.phpThe Web page you have requested is not cur