Vim documentation: usr_04
main help file*usr_04.txt* For Vim version 7.2. Last change: 2006 Jun 21 VIM USER MANUAL - by Bram Moolenaar Making small changes This chapter shows you several ways of making corrections and moving text around.  And using a count: "4x" deletes four characters. The "dw" command deletes a word. You may recognize the "w" command as the move word command. In fact, the "d" command may be followed by any motion command, and it deletes from the current location to the place where the cursor winds up. The "4w" command, for example, moves the cursor over four words. The d4w command deletes four words. To err is human. To really foul up you need a computer. ------------------> d4w To err is human. you need a computer. Vim only deletes up to the position where the motion takes the cursor. That's because Vim knows that you probably don't want to delete the first character of a word. If you use the "e" command to move to the end of a word, Vim guesses that you do want to include that last character: To err is human. you need a computer. --------> d2e To err is human. a computer. Whether the character under the cursor is included depends on the command you used to move to that character. The reference manual calls this "exclusive" when the character isn't included and "inclusive" when it is. The "$" command moves to the end of a line. The "d$" command deletes from the cursor to the end of the line. This is an inclusive motion, thus the last character of the line is included in the delete operation: To err is human. a computer. ------------> d$ To err is human There is a pattern here: operator-motion. You first type an operator command. For example, "d" is the delete operator. Then you type a motion command like "4l" or "w". This way you can operate on any text you can move over.
*04.2* Changing text Another operator is "c", change. It acts just like the "d" operator, except it leaves you in Insert mode. For example, "cw" changes a word. Or more specifically, it deletes a word and then puts you in Insert mode. To err is human -------> c2wbe<Esc> To be human This "c2wbe<Esc>" contains these bits: c the change operator 2w move two words (they are deleted and Insert mode started) be insert this text <Esc> back to Normal mode If you have paid attention, you will have noticed something strange: The space before "human" isn't deleted. There is a saying that for every problem there is an answer that is simple, clear, and wrong. That is the case with the example used here for the "cw" command. The c operator works just like the d operator, with one exception: "cw". It actually works like "ce", change to end of word. Thus the space after the word isn't included. This is an exception that dates back to the old Vi. Since many people are used to it now, the inconsistency has remained in Vim. MORE CHANGES Like "dd" deletes a whole line, "cc" changes a whole line. It keeps the existing indent (leading white space) though. Just like "d$" deletes until the end of the line, "c$" changes until the end of the line. It's like doing "d$" to delete the text and then "a" to start Insert mode and append new text. SHORTCUTS Some operator-motion commands are used so often that they have been given a single letter command: x stands for dl (delete character under the cursor) X stands for dh (delete character left of the cursor) D stands for d$ (delete to end of the line) C stands for c$ (change to end of the line) s stands for cl (change one character) S stands for cc (change a whole line) WHERE TO PUT THE COUNT The commands "3dw" and "d3w" delete three words. If you want to get really picky about things, the first command, "3dw", deletes one word three times; the command "d3w" deletes three words once. This is a difference without a distinction. You can actually put in two counts, however. For example, "3d2w" deletes two words, repeated three times, for a total of six words. REPLACING WITH ONE CHARACTER The "r" command is not an operator. It waits for you to type a character, and will replace the character under the cursor with it. You could do the same with "cl" or with the "s" command, but with "r" you don't have to press <Esc> there is somerhing grong here rT rt rw There is something wrong here Using a count with "r" causes that many characters to be replaced with the same character. Example: There is something wrong here 5rx There is something xxxxx here To replace a character with a line break use "r<Enter>". This deletes one character and inserts a line break. Using a count here only applies to the number of characters deleted: "4r<Enter>" replaces four characters with one line break.
*04.3* Repeating a change The "." command is one of the most simple yet powerful commands in Vim. It repeats the last change. For instance, suppose you are editing an HTML file and want to delete all the <B> tags. You position the cursor on the first < and delete the <B> with the command "df>".  command. The "." command executes the last change command (in this case, "df>"). To delete another tag, position the cursor on the < and use the "." command. To <B>generate</B> a table of <B>contents f< find first < ---> df> delete to > --> f< find next < ---------> . repeat df> ---> f< find next < -------------> . repeat df> --> The "." command works for all changes you make, except for the "u" (undo), CTRL-R (redo) and commands that start with a colon (:). Another example: You want to change the word "four" to "five". It appears several times in your text. You can do this quickly with this sequence of commands: /four<Enter> find the first string "four" cwfive<Esc> change the word to "five" n find the next "four" . repeat the change to "five' n find the next "four" . repeat the change etc.
*04.4* Visual mode To delete simple items the operator-motion changes work quite well. But often it's not so easy to decide which command will move over the text you want to change. Then you can use Visual mode. You start Visual mode by pressing "v". You move the cursor over the text you want to work on. While you do this, the text is highlighted. Finally type the operator command. For example, to delete from halfway one word to halfway another word: This is an examination sample of visual mode ----------> velllld This is an example of visual mode When doing this you don't really have to count how many times you have to press "l" to end up in the right position. You can immediately see what text will be deleted when you press "d". If at any time you decide you don't want to do anything with the highlighted text, just press <Esc> and Visual mode will stop without doing anything. SELECTING LINES If you want to work on whole lines, use "V" to start Visual mode. You will see right away that the whole line is highlighted, without moving around. When you move left or right nothing changes. When you move up or down the selection is extended whole lines at a time. For example, select three lines with "Vjj": +------------------------+ | text more text | >> | more text more text | | selected lines >> | text text text | | Vjj >> | text more | V | more text more | +------------------------+ SELECTING BLOCKS If you want to work on a rectangular block of characters, use CTRL-V to start Visual mode. This is very useful when working on tables. name Q1 Q2 Q3 pierre 123 455 234 john 0 90 39 steve 392 63 334 To delete the middle "Q2" column, move the cursor to the "Q" of "Q2". Press CTRL-V to start blockwise Visual mode. Now move the cursor three lines down with "3j" and to the next word with "w". You can see the first character of the last column is included. To exclude it, use "h". Now press "d" and the middle column is gone. GOING TO THE OTHER SIDE If you have selected some text in Visual mode, and discover that you need to change the other end of the selection, use the "o" command (Hint: o for other end). The cursor will go to the other end, and you can move the cursor to change where the selection starts. Pressing "o" again brings you back to the other end. When using blockwise selection, you have four corners. "o" only takes you to one of the other corners, diagonally. Use "O" to move to the other corner in the same line. Note that "o" and "O" in Visual mode work very different from Normal mode, where they open a new line below or above the cursor.
*04.5* Moving text When you delete something with the "d", "x", or another command, the text is saved. You can paste it back by using the p command. (The Vim name for this is put). Take a look at how this works. First you will delete an entire line, by putting the cursor on the line you want to delete and typing "dd". Now you move the cursor to where you want to put the line and use the "p" (put) command. The line is inserted on the line below the cursor. a line a line a line line 2 dd line 3 p line 3 line 3 line 2 Because you deleted an entire line, the "p" command placed the text line below the cursor. If you delete part of a line (a word, for instance), the "p" command puts it just after the cursor. Some more boring try text to out commands. ----> dw Some more boring text to out commands. -------> welp Some more boring text to try out commands. MORE ON PUTTING The "P" command puts text like "p", but before the cursor. When you deleted a whole line with "dd", "P" will put it back above the cursor. When you deleted a word with "dw", "P" will put it back just before the cursor. You can repeat putting as many times as you like. The same text will be used. You can use a count with "p" and "P". The text will be repeated as many times as specified with the count. Thus "dd" and then "3p" puts three copies of the same deleted line. SWAPPING TWO CHARACTERS Frequently when you are typing, your fingers get ahead of your brain (or the other way around?). The result is a typo such as "teh" for "the". Vim makes it easy to correct such problems. Just put the cursor on the e of "teh" and execute the command "xp". This works as follows: "x" deletes the character e and places it in a register. "p" puts the text after the cursor, which is after the h. teh th the x p
*04.6* Copying text To copy text from one place to another, you could delete it, use "u" to undo the deletion and then "p" to put it somewhere else. There is an easier way: yanking. The "y" operator copies text into a register. Then a "p" command can be used to put it. Yanking is just a Vim name for copying. The "c" letter was already used for the change operator, and "y" was still available. Calling this operator "yank" made it easier to remember to use the "y" key. Since "y" is an operator, you use "yw" to yank a word. A count is possible as usual. To yank two words use "y2w". Example: let sqr = LongVariable * --------------> y2w let sqr = LongVariable * p let sqr = LongVariable * LongVariable Notice that "yw" includes the white space after a word. If you don't want this, use "ye". The "yy" command yanks a whole line, just like "dd" deletes a whole line. Unexpectedly, while "D" deletes from the cursor to the end of the line, "Y" works like "yy", it yanks the whole line. Watch out for this inconsistency!  First select some text with Visual mode, then use the Edit/Copy menu. The selected text is now copied to the clipboard. You can paste the text in other programs. In Vim itself too. If you have copied text to the clipboard in another application, you can paste it in Vim with the Edit/Paste menu. This works in Normal mode and Insert mode. In Visual mode the selected text is replaced with the pasted text. The "Cut" menu item deletes the text before it's put on the clipboard. The "Copy", "Cut" and "Paste" items are also available in the popup menu (only when there is a popup menu, of course). If your Vim has a toolbar, you can also find these items there. If you are not using the GUI, or if you don't like using a menu, you have to use another way. You use the normal "y" (yank) and "p" (put) commands, but prepend "* (double-quote star) before it. To copy a line to the clipboard: "*yy To put text from the clipboard back into the text: "*p This only works on versions of Vim that include clipboard support. More about the clipboard in section |09.3| and here: |clipboard|.
*04.8* Text objects If the cursor is in the middle of a word and you want to delete that word, you need to move back to its start before you can do "dw". There is a simpler way to do this: "daw". this is some example text. daw this is some text. The "d" of "daw" is the delete operator. "aw" is a text object. Hint: "aw" stands for "A Word". Thus "daw" is "Delete A Word".  Using text objects is the third way to make changes in Vim. We already had operator-motion and Visual mode. Now we add operator-text object. It is very similar to operator-motion, but instead of operating on the text between the cursor position before and after a movement command, the text object is used as a whole. It doesn't matter where in the object the cursor was. To change a whole sentence use "cis". Take this text: Hello there. This is an example. Just some text. Move to the start of the second line, on "is an". Now use "cis": Hello there. Just some text. The cursor is in between the blanks in the first line. Now you type the new sentence "Another line.": Hello there. Another line. Just some text. "cis" consists of the "c" (change) operator and the "is" text object. This stands for "Inner Sentence". There is also the "as" (a sentence) object. The difference is that "as" includes the white space after the sentence and "is" doesn't. If you would delete a sentence, you want to delete the white space at the same time, thus use "das". If you want to type new text the white space can remain, thus you use "cis". You can also use text objects in Visual mode. It will include the text object in the Visual selection. Visual mode continues, thus you can do this several times. For example, start Visual mode with "v" and select a sentence with "as". Now you can repeat "as" to include more sentences. Finally you use an operator to do something with the selected sentences. You can find a long list of text objects here: |text-objects|.
*04.9* Replace mode The "R" command causes Vim to enter replace mode. In this mode, each character you type replaces the one under the cursor. This continues until you type <Esc>. In this example you start Replace mode on the first "t" of "text": This is text. Rinteresting.<Esc> This is interesting. You may have noticed that this command replaced 5 characters in the line with twelve others. The "R" command automatically extends the line if it runs out of characters to replace. It will not continue on the next line. You can switch between Insert mode and Replace mode with the <Insert> key. When you use <BS> (backspace) to make correction, you will notice that the old text is put back. Thus it works like an undo command for the last typed character.
*04.10* Conclusion The operators, movement commands and text objects give you the possibility to make lots of combinations. Now that you know how it works, you can use N operators with M movement commands to make N * M commands! You can find a list of operators here: |operator| For example, there are many other ways to delete pieces of text. Here are a few often used ones: x delete character under the cursor (short for "dl") X delete character before the cursor (short for "dh") D delete from cursor to end of line (short for "d$") dw delete from cursor to next start of word db delete from cursor to previous start of word diw delete word under the cursor (excluding white space) daw delete word under the cursor (including white space) dG delete until the end of the file dgg delete until the start of the file If you use "c" instead of "d" they become change commands. And with "y" you yank the text. And so forth. There are a few often used commands to make changes that didn't fit somewhere else: ~ change case of the character under the cursor, and move the cursor to the next character. This is not an operator (unless 'tildeop' is set), thus you can't use it with a motion command. It does works in Visual mode and changes case for all the selected text then. I Start Insert mode after moving the cursor to the first non-blank in the line. A Start Insert mode after moving the cursor to the end of the line.
Next chapter: |usr_05.txt| Set your settings Copyright: see |manual-copyright| vim:tw=78:ts=8:ft=help:norl: top - main help file


Recently, I started developing iOS applications for work. It’s an interesting experience, especially because I once vowed never to do iOS development due to my love-hate relationship with Apple. But the opportunity came up, and the diversity of experience can only be good experience. So here are my thoughts on the past few weeks:
- It requires a change in paradigm from what I’m used to. The way a system is designed in .Net, i.e. the different classes, interfaces, base classes and design patterns that may be used will be different because they have different approaches. Sure iOS app development is based on the foundation of the common MVC design pattern, but there are differences in the way the application responds to events, handles user inputs, saves data, etc. There are many new concepts, such as delegates, which are not prevalent in .Net development. I’m still learning ‘best practices’ in terms of design.
- The names of things aren’t the same. Firstly, every class has a header and an implementation file. Some people don’t like this. I kinda liked the separation of what a class does internally and how it interfaces with others. Also, initially I thought protocols in Objective-C are synonymous with interfaces in .Net development, but they aren’t necessarily. They don’t always have the same uses.
- Like .Net, it’s best to stand on the shoulders of others. Just like Entity Framework abstracts interactions with the database in .Net, there is really no need to create your own frameworks and libraries for what others have done already. Magical Record is really good for accessing and manipulating Core Data. RestKit is a really good library for interacting with RESTful web services.
- Following from that Ray Wenderlich is my new best friend. This site has tutorials which cover everything I’ve needed thus far. Most of my learning has been from here.
- Visual Studio is a really good IDE. Using XCode after spending so long with Visual Studio is like moving from the new Mercedes Benz C-Class to my current student card 2004 Renault Clio. At times I think it’s just a glorified text editor. The debugging process is silly. It doesn’t automate tasks which I assume should be easily automated. But it works. Most times.
- The Mac OS operating system is what Ubuntu should have been. The Unix interface and general use is similar, but it’s prettier, and more user friendly.
- Mobile is the future. Creating apps instead of creating web applications has just shown that with mobile apps, one can truly create a personal experience interacting with user preferences and other user data which can be stored per user on their own device. Also, unlike the bottlenecks of the state-less nature of the web, developing apps instead of web sites becomes so much easier, and allows for so much more.
This journey has recently started, but it looks like an interesting one. I’m still a Microsoft lover and evangelist, but this has opened my previously myopic eyes to a bigger world out there with a larger range of possibilities.


A WMI client can fetch the installed AV products by executing the following sample WQL Query:
PS C:\> Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct


""" Low-level helpers for the SecureTransport bindings. These are Python functions that are not directly related to the high-level APIs but are necessary to get them to work. They include a whole bunch of low-level CoreFoundation messing about and memory management. The concerns in this module are almost entirely about trying to avoid memory leaks and providing appropriate and useful assistance to the higher-level code. """ import base64 import ctypes import itertools import re import os import ssl import tempfile from .bindings import Security, CoreFoundation, CFConst # This regular expression is used to grab PEM data out of a PEM bundle. _PEM_CERTS_RE = re.compile( b"-----BEGIN CERTIFICATE-----\n(.*?)\n-----END CERTIFICATE-----", re.DOTALL ) def _cf_data_from_bytes(bytestring): """ Given a bytestring, create a CFData object from it. This CFData object must be CFReleased by the caller. """ return CoreFoundation.CFDataCreate( CoreFoundation.kCFAllocatorDefault, bytestring, len(bytestring) ) def _cf_dictionary_from_tuples(tuples): """ Given a list of Python tuples, create an associated CFDictionary. """ dictionary_size = len(tuples) # We need to get the dictionary keys and values out in the same order. keys = (t[0] for t in tuples) values = (t[1] for t in tuples) cf_keys = (CoreFoundation.CFTypeRef * dictionary_size)(*keys) cf_values = (CoreFoundation.CFTypeRef * dictionary_size)(*values) return CoreFoundation.CFDictionaryCreate( CoreFoundation.kCFAllocatorDefault, cf_keys, cf_values, dictionary_size, CoreFoundation.kCFTypeDictionaryKeyCallBacks, CoreFoundation.kCFTypeDictionaryValueCallBacks, ) def _cf_string_to_unicode(value): """ Creates a Unicode string from a CFString object. Used entirely for error reporting. Yes, it annoys me quite a lot that this function is this complex. """ value_as_void_p = ctypes.cast(value, ctypes.POINTER(ctypes.c_void_p)) string = CoreFoundation.CFStringGetCStringPtr( value_as_void_p, CFConst.kCFStringEncodingUTF8 ) if string is None: buffer = ctypes.create_string_buffer(1024) result = CoreFoundation.CFStringGetCString( value_as_void_p, buffer, 1024, CFConst.kCFStringEncodingUTF8 ) if not result: raise OSError("Error copying C string from CFStringRef") string = buffer.value if string is not None: string = string.decode("utf-8") return string def _assert_no_error(error, exception_class=None): """ Checks the return code and throws an exception if there is an error to report """ if error == 0: return cf_error_string = Security.SecCopyErrorMessageString(error, None) output = _cf_string_to_unicode(cf_error_string) CoreFoundation.CFRelease(cf_error_string) if output is None or output == u"": output = u"OSStatus %s" % error if exception_class is None: exception_class = ssl.SSLError raise exception_class(output) def _cert_array_from_pem(pem_bundle): """ Given a bundle of certs in PEM format, turns them into a CFArray of certs that can be used to validate a cert chain. """ # Normalize the PEM bundle's line endings. pem_bundle = pem_bundle.replace(b"\r\n", b"\n") der_certs = [ base64.b64decode(match.group(1)) for match in _PEM_CERTS_RE.finditer(pem_bundle) ] if not der_certs: raise ssl.SSLError("No root certificates specified") cert_array = CoreFoundation.CFArrayCreateMutable( CoreFoundation.kCFAllocatorDefault, 0, ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks), ) if not cert_array: raise ssl.SSLError("Unable to allocate memory!") try: for der_bytes in der_certs: certdata = _cf_data_from_bytes(der_bytes) if not certdata: raise ssl.SSLError("Unable to allocate memory!") cert = Security.SecCertificateCreateWithData( CoreFoundation.kCFAllocatorDefault, certdata ) CoreFoundation.CFRelease(certdata) if not cert: raise ssl.SSLError("Unable to build cert object!") CoreFoundation.CFArrayAppendValue(cert_array, cert) CoreFoundation.CFRelease(cert) except Exception: # We need to free the array before the exception bubbles further. # We only want to do that if an error occurs: otherwise, the caller # should free. CoreFoundation.CFRelease(cert_array) return cert_array def _is_cert(item): """ Returns True if a given CFTypeRef is a certificate. """ expected = Security.SecCertificateGetTypeID() return CoreFoundation.CFGetTypeID(item) == expected def _is_identity(item): """ Returns True if a given CFTypeRef is an identity. """ expected = Security.SecIdentityGetTypeID() return CoreFoundation.CFGetTypeID(item) == expected def _temporary_keychain(): """ This function creates a temporary Mac keychain that we can use to work with credentials. This keychain uses a one-time password and a temporary file to store the data. We expect to have one keychain per socket. The returned SecKeychainRef must be freed by the caller, including calling SecKeychainDelete. Returns a tuple of the SecKeychainRef and the path to the temporary directory that contains it. """ # Unfortunately, SecKeychainCreate requires a path to a keychain. This # means we cannot use mkstemp to use a generic temporary file. Instead, # we're going to create a temporary directory and a filename to use there. # This filename will be 8 random bytes expanded into base64. We also need # some random bytes to password-protect the keychain we're creating, so we # ask for 40 random bytes. random_bytes = os.urandom(40) filename = base64.b16encode(random_bytes[:8]).decode("utf-8") password = base64.b16encode(random_bytes[8:]) # Must be valid UTF-8 tempdirectory = tempfile.mkdtemp() keychain_path = os.path.join(tempdirectory, filename).encode("utf-8") # We now want to create the keychain itself. keychain = Security.SecKeychainRef() status = Security.SecKeychainCreate( keychain_path, len(password), password, False, None, ctypes.byref(keychain) ) _assert_no_error(status) # Having created the keychain, we want to pass it off to the caller. return keychain, tempdirectory def _load_items_from_file(keychain, path): """ Given a single file, loads all the trust objects from it into arrays and the keychain. Returns a tuple of lists: the first list is a list of identities, the second a list of certs. """ certificates = [] identities = [] result_array = None with open(path, "rb") as f: raw_filedata = f.read() try: filedata = CoreFoundation.CFDataCreate( CoreFoundation.kCFAllocatorDefault, raw_filedata, len(raw_filedata) ) result_array = CoreFoundation.CFArrayRef() result = Security.SecItemImport( filedata, # cert data None, # Filename, leaving it out for now None, # What the type of the file is, we don't care None, # what's in the file, we don't care 0, # import flags None, # key params, can include passphrase in the future keychain, # The keychain to insert into ctypes.byref(result_array), # Results ) _assert_no_error(result) # A CFArray is not very useful to us as an intermediary # representation, so we are going to extract the objects we want # and then free the array. We don't need to keep hold of keys: the # keychain already has them! result_count = CoreFoundation.CFArrayGetCount(result_array) for index in range(result_count): item = CoreFoundation.CFArrayGetValueAtIndex(result_array, index) item = ctypes.cast(item, CoreFoundation.CFTypeRef) if _is_cert(item): CoreFoundation.CFRetain(item) certificates.append(item) elif _is_identity(item): CoreFoundation.CFRetain(item) identities.append(item) finally: if result_array: CoreFoundation.CFRelease(result_array) CoreFoundation.CFRelease(filedata) return (identities, certificates) def _load_client_cert_chain(keychain, *paths): """ Load certificates and maybe keys from a number of files. Has the end goal of returning a CFArray containing one SecIdentityRef, and then zero or more SecCertificateRef objects, suitable for use as a client certificate trust chain. """ # Ok, the strategy. # # This relies on knowing that macOS will not give you a SecIdentityRef # unless you have imported a key into a keychain. This is a somewhat # artificial limitation of macOS (for example, it doesn't necessarily # affect iOS), but there is nothing inside Security.framework that lets you # get a SecIdentityRef without having a key in a keychain. # # So the policy here is we take all the files and iterate them in order. # Each one will use SecItemImport to have one or more objects loaded from # it. We will also point at a keychain that macOS can use to work with the # private key. # # Once we have all the objects, we'll check what we actually have. If we # already have a SecIdentityRef in hand, fab: we'll use that. Otherwise, # we'll take the first certificate (which we assume to be our leaf) and # ask the keychain to give us a SecIdentityRef with that cert's associated # key. # # We'll then return a CFArray containing the trust chain: one # SecIdentityRef and then zero-or-more SecCertificateRef objects. The # responsibility for freeing this CFArray will be with the caller. This # CFArray must remain alive for the entire connection, so in practice it # will be stored with a single SSLSocket, along with the reference to the # keychain. certificates = [] identities = [] # Filter out bad paths. paths = (path for path in paths if path) try: for file_path in paths: new_identities, new_certs = _load_items_from_file(keychain, file_path) identities.extend(new_identities) certificates.extend(new_certs) # Ok, we have everything. The question is: do we have an identity? If # not, we want to grab one from the first cert we have. if not identities: new_identity = Security.SecIdentityRef() status = Security.SecIdentityCreateWithCertificate( keychain, certificates[0], ctypes.byref(new_identity) ) _assert_no_error(status) identities.append(new_identity) # We now want to release the original certificate, as we no longer # need it. CoreFoundation.CFRelease(certificates.pop(0)) # We now need to build a new CFArray that holds the trust chain. trust_chain = CoreFoundation.CFArrayCreateMutable( CoreFoundation.kCFAllocatorDefault, 0, ctypes.byref(CoreFoundation.kCFTypeArrayCallBacks), ) for item in itertools.chain(identities, certificates): # ArrayAppendValue does a CFRetain on the item. That's fine, # because the finally block will release our other refs to them. CoreFoundation.CFArrayAppendValue(trust_chain, item) return trust_chain finally: for obj in itertools.chain(identities, certificates): CoreFoundation.CFRelease(obj)


The Works of Edgar Allan Poe
by Edgar Allan Poe
Stanzas
Additional Information
- Year Published: 1903
- Language: English
- Country of Origin: United States of America
- Source: Poe, E.A. (1903). The Works of Edgar Allan Poe, The Raven Edition, Volume 5. New York: P. F. Collier and Son.
-
Readability:
- Flesch–Kincaid Level: 8.0
- Word Count: 329
- Genre: Poetry
- Keywords: nature
- ✎ Cite This
Downloads
How often we forget all time, when lone
Admiring Nature's universal throne;
Her woods–her wilds–her mountains–the intense
Reply of HERS to OUR intelligence! [BYRON, The Island.]
I
In youth have I known one with whom the Earth
In secret communing held–as he with it,
In daylight, and in beauty from his birth:
Whose fervid, flickering torch of life was lit
From the sun and stars, whence he had drawn forth
A passionate light–such for his spirit was fit–
And yet that spirit knew not, in the hour
Of its own fervor what had o'er it power.
II
Perhaps it may be that my mind is wrought
To a fever by the moonbeam that hangs o'er,
But I will half believe that wild light fraught
With more of sovereignty than ancient lore
Hath ever told–or is it of a thought
The unembodied essence, and no more,
That with a quickening spell doth o'er us pass
As dew of the night-time o'er the summer grass?
III
Doth o'er us pass, when, as th' expanding eye
To the loved object–so the tear to the lid
Will start, which lately slept in apathy?
And yet it need not be–(that object) hid
From us in life–but common–which doth lie
Each hour before us–but then only, bid
With a strange sound, as of a harp-string broken,
To awake us–'Tis a symbol and a token
IV
Of what in other worlds shall be–and given
In beauty by our God, to those alone
Who otherwise would fall from life and Heaven
Drawn by their heart's passion, and that tone,
That high tone of the spirit which hath striven,
Tho' not with Faith–with godliness–whose throne
With desperate energy 't hath beaten down;
Wearing its own deep feeling as a crown.


can.fixture can.fixture
can.fixture(fromUrl, toUrl)
Trap requests from one url and redirect them from another.
Parameters
-
fromUrl
{String}
Trap requests made by can.ajax to this url.
-
toUrl
{String}
Redirect requests to this url.
can.fixture(url, handler(request, response))
Trap requests to a url and provide the response with a callback function.
Parameters
-
url
{String}
Trap requests made by can.ajax to this url.
The url can be templated with tags that look like
{TEMPLATE}
. For example: "/users/{id}". Any templated values get added to thehandler
's request object's data. -
handler
{requestHandler(request, response)}
Specifies the response of the fixture.
handler
gets called with the can.ajax settings object and a response handler that is used to specify the response.
can.fixture(fixtures)
Configures multiple ajax traps.
Parameters
-
fixtures
{Object<url,requestHandler(request, response) | String>}
An mapping of templated urls to redirect urls or request handler functions.
can.fixture({ "/tasks": "/fixtures/tasks.json", "DESTROY /tasks/{id}": function(){ return {}; } })
Simulate AJAX requests.
can.fixture
intercepts an AJAX request and simulates the response with a file or function. They are a great technique when you want to develop JavaScript independently of the backend.Types of Fixtures
There are two common ways of using fixtures. The first is to map Ajax requests to another file. The following intercepts requests to
/tasks.json
and directs them tofixtures/tasks.json
:The other common option is to generate the Ajax response with a function. The following intercepts updating tasks at
/tasks/ID.json
and responds with updated data:We categorize fixtures into the following types:
There are different ways to lookup static and dynamic fixtures.
Static Fixtures
Static fixtures use an alternate url as the response of the Ajax request.
Static fixtures can also be templated, which means that parameters will be used in the fixture filename:
A request to
tasks/42
will look for afixtures/tasks.42.json
file.Dynamic Fixtures
Dynamic Fixtures are functions that get the details of the Ajax request and return the result of the mocked service request from your server.
For example, the following returns a successful response with JSON data from the server:
The fixture function has the following signature:
where the fixture function is called with:
originalOptions
- are the options provided to the ajax method, unmodified, and thus, without defaults from ajaxSettingsresponse
- the response callback. It can be called with:status
- the HTTP status code of the response.statusText
- the status text of the responseresponses
- a map of dataType/value that contains the responses for each data format supportedresponseHeaders
- response headersoptions
- are the request optionsheaders
- a map of key/value request headersHowever, can.fixture handles the common case where you want a successful response with JSON data. The previous can be written like:
Since
response
is called asynchronously you can also set a custom fixture timeout like this:If you want to return an array of data respond like this:
Note: A fixture function can also return its response directly like this:
This is kept for backwards compatibility and should not be used.
can.fixture works closesly with jQuery's ajaxTransport system.
Templated Urls
Often, you want a dynamic fixture to handle urls for multiple resources (for example a REST url scheme). can.fixture's templated urls allow you to match urls with a wildcard.
The following example simulates services that get and update 100 todos.
Notice that data found in templated urls (ex:
{id}
) is added to the original data object.Simulating Errors
The following simulates an unauthorized request to
/foo
.This could be received by the following Ajax request:
Turning off Fixtures
You can remove a fixture by passing
null
for the fixture option:You can also set can.fixture.on to false:
can.fixture.store
can.fixture.store makes a CRUD service layer that handles sorting, grouping, filtering and more. Use it with a can.Model like this:
Testing Performance
Dynamic fixtures are awesome for performance testing. Want to see what 10000 files does to your app's performance? Make a fixture that returns 10000 items.
What to see what the app feels like when a request takes 5 seconds to return? Set can.fixture.delay to 5000.
Organizing fixtures
The best way of organizing fixtures is to have a 'fixtures.js' file that steals
can/util/fixture
and defines all your fixtures. For example, if you have a 'todo' application, you might havetodo/fixtures/fixtures.js
look like:Notice: We used steal's ignore option to prevent loading the fixture plugin in production.
Finally, we steal
todo/fixtures/fixtures.js
in the app file (todo/todo.js
) like:We typically keep it a one liner so it's easy to comment out.
Switching Between Sets of Fixtures
If you are using fixtures for testing, you often want to use different sets of fixtures. You can add something like the following to your fixtures.js file:


Listen now
Kid Cudi
Reborn
Kanye West
Graduation
Chance the Rapper
Blessings
Solange
Cranes in the Sky
Childish Gambino
3005
Brockhampton
Sugar
Toro y Moi
Ordinary Pleasure
Gorillaz
Broken
Kyle
iSpy
Tyler the Creator
Earfquake
Kenny Chesney
When the sun goes down
Jaden
Fire Dept
Reborn
Kid Cudi
0:00
5:24


SubstraPunks
10,000 unique collectible characters with proof of ownership stored on the NFT Substrate blockchain Unique Network, is a remake and a tribute to CryptoPunks, the first "Non-Fungible Token," and inspiration for the Ethereum ERC-721 standard that powers most digital art and collectibles.
Random Punks
Loading random punks from Polkadot Blockchain.
Please wait just a bit...
The CryptoPunks are 10,000 uniquely generated characters. No two are exactly the same, and each one of them can be officially owned by a single person on the Unique Network blockchain. Initially they can be claimed for free by anybody with an NFT wallet. The zoomable image above is connected to the Polkadot NFT network and has been colored to show you the status of each Punk in the market. Punks with a blue background have been claimed. Punks with a red background are available for claiming. You can click to zoom in on a Punk and reveal its details and claim the free ones.


Track Suggester!
Answer the following questions to decide which
track
is best for you.
Please enter your name.
Where would you rather work?
A startup company
An enterprise-level company
A front-end developer company
A bigger established business
What are you interested in?
Building interactive web applications
High-performance applications
Design
Building internal software
What else are you interested in?
Interacting with dynamic content
Building Anroid user interfaces
Making things look and work well
Working on business software
What word best describes you?
Interactive
Popular
Designer
Stable
Is it important to choose a popular programming language?
Yes
Very
Somewhat
Of course
Submit
Congratulations
!
Your track is Ruby/Rails.
Congratulations
!
Your track is Java/Android.
Congratulations
!
Your track is CSS/React.
Congratulations
!
Your track is C#/.NET.


Sleek, intuitive, and powerful mobile first front-end frameworks for faster and easier web development.
Why use a task runner? In one word: automation. The less work you have to do when performing repetitive tasks like minification, compilation, unit testing, linting, etc, the easier your job becomes.


Free Christmas parking proposal in Mayo county town not clearcut
A call has been made to introduce some free hours of parking in local authority car parks in Castlebar on the run-up to Christmas.
Councillor Ger Deere has tabled a motion for consideration at Wednesday's meeting of the Castlebar Municipal District,
However, Marie Crowley, head of Castlebar Municipal District, has pointed out the members agreed previously that rather than provide free parking, they would give financial support to the Castlebar of Chamber Commerce-led initiatives.
“This has been given effect in previous years and also in 2019 through their support of the ice rink on the Mall."
However, shoppers in both Claremorris and Ballinrobe can enjoy free parking in the afternoons from this Friday.
Mayo County Council has confirmed that parking on the streets and in the council car parks in both towns will be free, from 2 p.m. each afternoon from this Friday, December 13, until Christmas Eve.
The move is aimed at encouraging people to shop local in the run-up to Christmas.


| Getting started |
The well-known binary representation for OGC geometry (WKBGeometry), provides a portable representation of a geometry value as a contiguous stream of bytes. It permits geometry values to be exchanged between an ODBC client and an SQL database in binary form.
Functions are provided in the SQL, JAVA, and C-API to import and export the well-known binary representation of geometry.
The well-known binary representation of geometry defines an encoding for 2D simple feature geometry as defined by the OpenGIS Simple Features Specification for SQL, and ISO 19125. This encoding does not support elevations, measures, CAD, or annotation.
The well-known binary representation is a contiguous stream of bytes. It permits geometry to be exchanged between an ODBC client and an SQL database in binary form. Because these geometry functions require the definition of C structures to map the binary representation, they’re intended for use within a 3GL program and aren’t suited to a 4GL environment.
The well-known binary representation for geometry is obtained by serializing a geometry instance as a sequence of numeric types drawn from the set {Unsigned Integer, Double} and then serializing each numeric type as a sequence of bytes using one of two well-defined, standard binary representations for numeric types (NDR, XDR). The specific binary encoding used for a geometry byte stream is described by a one-byte tag that precedes the serialized bytes. The only difference between the two encodings of geometry is byte order. The XDR encoding is big-endian, while the NDR encoding is little-endian.
An ‘unsigned integer’ is a 32-bit (4 byte) data type that encodes a nonnegative integer in the range [0,<PHONE_NUMBER>].
A ‘double’ is a 64-bit (8 byte) double-precision data type that encodes a double-precision number using the IEEE 754 double-precision format.
The above definitions are common to both XDR and NDR.
The XDR representation of an unsigned integer is big-endian (most significant byte first).
The XDR representation of a double is big-endian (sign bit is first byte).
The NDR representation of an unsigned integer is little-endian (least significant byte first).
The NDR representation of a double is little-endian (sign bit is last byte).
Conversion between the NDR and XDR data types for unsigned integers and doubles is a simple operation involving reversing the order of bytes within each unsigned integer or double in the byte stream.
The well-known binary representation for geometry is described below. The basic building block is the byte stream for a point that consists of two doubles. The byte streams for other geometries are built using the byte streams for geometries that have already been defined.
// Basic Type definitions
// byte : 1 byte
// uint32 : 32 bit unsigned integer (4 bytes)
// double : double precision number (8 bytes)
// Building Blocks : Point, LinearRing
Point
{
double x;
double y;
};
LinearRing
{
uint32 numPoints;
Point points[numPoints];
}
enum
wkbGeometryType {
wkbPoint = 1,
wkbLineString = 2,
wkbPolygon = 3,
wkbMultiPoint = 4,
wkbMultiLineString = 5,
wkbMultiPolygon = 6,
wkbGeometryCollection = 7
};
enum wkbByteOrder {
wkbXDR = 0, // Big Endian
wkbNDR = 1 // Little Endian
};
WKBPoint
{
byte
byteOrder;
uint32 wkbType;
// 1
Point
point;
}
WKBLineString
{
byte
byteOrder;
uint32 wkbType;
// 2
uint32 numPoints;
Point
points[numPoints];
}
WKBPolygon
{
byte
byteOrder;
uint32 wkbType;
// 3
uint32 numRings;
LinearRing rings[numRings];
}
WKBMultiPoint
{
byte
byteOrder;
uint32 wkbType;
// 4
uint32 num_wkbPoints;
WKBPoint WKBPoints[num_wkbPoints];
}
WKBMultiLineString
{
byte
byteOrder;
uint32 wkbType;
// 5
uint32 num_wkbLineStrings;
WKBLineString WKBLineStrings[num_wkbLineStrings];
}
wkbMultiPolygon
{
byte
byteOrder;
uint32 wkbType;
// 6
uint32 num_wkbPolygons;
WKBPolygon wkbPolygons[num_wkbPolygons];
}
WKBGeometry
{
union {
WKBPoint
point;
WKBLineString
linestring;
WKBPolygon
polygon;
WKBGeometryCollection collection;
WKBMultiPoint
mpoint;
WKBMultiLineString mlinestring;
WKBMultiPolygon mpolygon;
}
};
WKBGeometryCollection
{
byte
byte_order;
uint32 wkbType;
// 7
uint32 num_wkbGeometries;
WKBGeometry wkbGeometries[num_wkbGeometries]
}
Well-known binary representation for a geometry object in NDR format (B=1) of type polygon (T=3) with two linears (NR = 2) and each ring having three points (NP = 3).
The well-known binary representation for geometry is designed to represent instances of the geometry types described in the geometry object model and in the OpenGIS Abstract Specification.
These assertions imply the following for rings, polygons, and multipolygons:


Right again!
Like you need a variety of tools to care for your plants,
you'll also need lots of tools to perfect your SEO.
One of the most important tools you can have for your website
is a variety of relevant content to keep things interesting and engaging for your users.
Besides ideas for concrete content, you will want to learn a thing or two
about SEO in general to keep ready in your toolbelt as well.
Look at the seedlings you planted!


Cyanobacteria in Lakes, Ponds, and Reservoirs
Overview of US EPA, Atlantic Ecology Division Research Activities
Jeff Hollister (with Kristen Hychka, Darryl Keith, Betty Kreakie, and Bryan Milstead)
Presented at Boston Museum of Science
10/24/2013
Disclaimer
The views expressed in this presentation are those of the author[s] and
do not necessarily reflect the views or policies of the U.S. Environmental
Protection Agency. It has not been subjected to peer and administrative
review and does not constitute U.S.Environmental Protection Agency policy.
It has not been formally disseminated by EPA. It does not represent and
should not be construed to represent any Agency determination or policy.
Mention of trade names or commercial products does not constitute
endorsement or recommendation for use.
Cyanobacteria Research at AED
left: 50%
incremental: True
- Background
- Research Areas
- Ecology
- Toxicology
- Epidemiology
- Remote Sensing
- Informatics
Cyanobacteria Research at AED:
Toxicology
- Mamalian toxicity
- Hair as biomarkers
- Research Triangle Park: Neil Chernoff
Cyanobacteria Research at AED:
Epidemiology
- Cyanotoxin occurence
- Exposure scenarios to assess risk to human health
Cyanobacteria Research at AED:
right:55%
Ecology
- Modelling
- Long-term trends in Midwest
- National Modelling
- Rhode Island
- Lake Morphometry
- Improving predictions
Lake Morphometry
- Lake Volume (2010)
- Lake Depth (2011)
- National Lake Morphometry Dataset (In Process)
Lake Morphometry
left:45%
- Lake Volume (2010)
- Lake Depth (2011)
- National Lake Morphometry Dataset (In Process)
Lake Morphometry
- Lake Volume (2010)
- Lake Depth (2011)
- National Lake Morphometry Dataset (In Process)
Improving Predictions
Cyanobacteria Research at AED:
Remote Sensing
- Airborne hypersepctral
- Satellite multispectral
Airborne Hyperspectral
Satellite Multispectral
Cyanobacteria Research at AED:
Informatics
- Open Science
- Data Sciencey Stuff
- Twitter
- R Package Development