You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doug McIlroy [noted][note] that it is possible to correctly sort an array with a very simple (but inefficient) algorithm: Scan the array for a pair of consecutive positions whose values are out of order (an "inversion"), swap them, then repeat. The algorithm terminates when no such inversions are found.
Edges in this graph indicate order dependencies. Broadly, you may only legally use an operation if you have performed all the operations on some path to it, starting from "ø", the entry point. Error paths are not illustrated. Once created, a socket can be close'd at any time.
"Legally" here is intentionally somewhat imprecise. For example, most implementations will not report an error if you call recvmsg on a socket that has no address bound to it; however, no message will ever become available, and if non-blocking, the call will time out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Curious Permission Preservation Pitfall in rsync
A Curious Permission Preservation Pitfall in rsync
When using rsync to back up or archive data, you typically want to preserve file metadata such as owner and group ID, permissions, and modification times, in addition to the file content. You might run with --archive (-a) or using the --times (-t), --perms (-P), --owner (-o) and --group (-g) flags, for example.
In particular, preserving permissions naturally means that if a file is read-only in the source (e.g., mode 0444 or -r--r--r--), then its mirror in the destination will also be read-only. This is working as intended, and does not ordinarily cause any problems because (by default) when rsync updates file contents, it does so by creating a (writable) temp file with the new content, then replacing the target file (and updating the file metadata) once it is complete.
The --inplace flag overrides the default behaviour, causing rsync to update existing target files directly rather than via a temporary. This can be useful when dea
This does not exist, I am sketching out a design idea.
The go keyword accepts a call expression, evaluates all the terms of the expression up to the point of the call itself, then issues the call inside a newly-created goroutine.
By analogy, the call keyword accepts a call expression and generates a function literal that evalutes that expression.
Although this convention is quite old, I only learned of it fairly recently. One way to pick a "memorable" port number is to use a telephone-style encoding of the digits to their corresponding letters on a (QWERTY) keyboard. So, just as one might spell 364-9255 as "DOG-WALK", you can do the same trick with the keyboard letters.
In tabular format, that is:
1 2 3 4 5 6 7 8 9 0
Q W E R T Y U I O P
A S D F G H J K L ?
Most requests go to https://www.reddit.com[/path], where paths are either /api/... or /r/subreddit/... or similar, depending on the method. API docs give the details.
Many APIs permit unauthenticated access, but Reddit imposes rate limits and—perhaps more annoyingly—blocks various IP ranges (notably a bunch of AWS). Their support does not respond to tickets unless you embarrass them publicly. I lack both the ability and the desire to do that, so I needed another way.
Update installed version of the AWS CLI on a Linux system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters