Edited, memorised or added to reading queue

on 28-Dec-2023 (Thu)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

JavaScript became a fully independent language with its own specification called ECMAScript
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
initially had another name: “LiveScript”. But Java was very popular at that time, so it was decided that positioning a new language as a “younger brother” of Java would help. But as it evolved, <span>JavaScript became a fully independent language with its own specification called ECMAScript, and now it has no relation to Java at all. Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called th




JavaScript is very different from another language called Java.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
n right in a web page’s HTML and run automatically as the page loads. Scripts are provided and executed as plain text. They don’t need special preparation or compilation to run. In this aspect, <span>JavaScript is very different from another language called Java. Why is it called JavaScript? When JavaScript was created, it initially had another name: “LiveScript”. But Java was very popular at that time, so it was decided that positioning a new l




Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
“younger brother” of Java would help. But as it evolved, JavaScript became a fully independent language with its own specification called ECMAScript, and now it has no relation to Java at all. <span>Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine. The browser has an embedded engine sometimes called a “JavaScript virtual machine”. Different engines have different “codenames”. For example: V8 – in Chrome, Opera and Edge. SpiderMonk




The browser has an embedded engine sometimes called a “JavaScript virtual machine”.

Different engines have different “codenames”. For example:

  • V8 – in Chrome, Opera and Edge.
  • SpiderMonkey – in Firefox.
  • …There are other codenames like “Chakra” for IE, “JavaScriptCore”, “Nitro” and “SquirrelFish” for Safari, etc.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
has no relation to Java at all. Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the JavaScript engine. <span>The browser has an embedded engine sometimes called a “JavaScript virtual machine”. Different engines have different “codenames”. For example: V8 – in Chrome, Opera and Edge. SpiderMonkey – in Firefox. …There are other codenames like “Chakra” for IE, “JavaScriptCore”, “Nitro” and “SquirrelFish” for Safari, etc. The terms above are good to remember because they are used in developer articles on the internet. We’ll use them too. For instance, if “a feature X is supported by V8”, then it probably




How do engines work?

Engines are complicated. But the basics are easy.

  1. The engine (embedded if it’s a browser) reads (“parses”) the script.
  2. Then it converts (“compiles”) the script to machine code.
  3. And then the machine code runs, pretty fast.

The engine applies optimizations at each step of the process. It even watches the compiled script as it runs, analyzes the data that flows through it, and further optimizes the machine code based on that knowledge.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
to remember because they are used in developer articles on the internet. We’ll use them too. For instance, if “a feature X is supported by V8”, then it probably works in Chrome, Opera and Edge. <span>How do engines work? Engines are complicated. But the basics are easy. The engine (embedded if it’s a browser) reads (“parses”) the script. Then it converts (“compiles”) the script to machine code. And then the machine code runs, pretty fast. The engine applies optimizations at each step of the process. It even watches the compiled script as it runs, analyzes the data that flows through it, and further optimizes the machine code based on that knowledge. What can in-browser JavaScript do? Modern JavaScript is a “safe” programming language. It does not provide low-level access to memory or the CPU, because it was initially created for br




What can in-browser JavaScript do?

Modern JavaScript is a “safe” programming language. It does not provide low-level access to memory or the CPU, because it was initially created for browsers which do not require it.

JavaScript’s capabilities greatly depend on the environment it’s running in. For instance, Node.js supports functions that allow JavaScript to read/write arbitrary files, perform network requests, etc.

In-browser JavaScript can do everything related to webpage manipulation, interaction with the user, and the webserver.

For instance, in-browser JavaScript is able to:

  • Add new HTML to the page, change the existing content, modify styles.
  • React to user actions, run on mouse clicks, pointer movements, key presses.
  • Send requests over the network to remote servers, download and upload files (so-called AJAX and COMET technologies).
  • Get and set cookies, ask questions to the visitor, show messages.
  • Remember the data on the client-side (“local storage”).
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
timizations at each step of the process. It even watches the compiled script as it runs, analyzes the data that flows through it, and further optimizes the machine code based on that knowledge. <span>What can in-browser JavaScript do? Modern JavaScript is a “safe” programming language. It does not provide low-level access to memory or the CPU, because it was initially created for browsers which do not require it. JavaScript’s capabilities greatly depend on the environment it’s running in. For instance, Node.js supports functions that allow JavaScript to read/write arbitrary files, perform network requests, etc. In-browser JavaScript can do everything related to webpage manipulation, interaction with the user, and the webserver. For instance, in-browser JavaScript is able to: Add new HTML to the page, change the existing content, modify styles. React to user actions, run on mouse clicks, pointer movements, key presses. Send requests over the network to remote servers, download and upload files (so-called AJAX and COMET technologies). Get and set cookies, ask questions to the visitor, show messages. Remember the data on the client-side (“local storage”). What CAN’T in-browser JavaScript do? JavaScript’s abilities in the browser are limited to protect the user’s safety. The aim is to prevent an evil webpage from accessing private informa




JavaScript on a webpage may not read/write arbitrary files on the hard disk, copy them or execute programs. It has no direct access to OS functions.

Modern browsers allow it to work with files, but the access is limited and only provided if the user does certain actions, like “dropping” a file into a browser window or selecting it via an <input> tag.

There are ways to interact with the camera/microphone and other devices, but they require a user’s explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the NSA.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
the browser are limited to protect the user’s safety. The aim is to prevent an evil webpage from accessing private information or harming the user’s data. Examples of such restrictions include: <span>JavaScript on a webpage may not read/write arbitrary files on the hard disk, copy them or execute programs. It has no direct access to OS functions. Modern browsers allow it to work with files, but the access is limited and only provided if the user does certain actions, like “dropping” a file into a browser window or selecting it via an <input> tag. There are ways to interact with the camera/microphone and other devices, but they require a user’s explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the NSA. Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript fr




Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript from one page may not access the other page if they come from different sites (from a different domain, protocol or port).

This is called the “Same Origin Policy”. To work around that, both pages must agree for data exchange and must contain special JavaScript code that handles it. We’ll cover that in the tutorial.

This limitation is, again, for the user’s safety. A page from http://anysite.com which a user has opened must not be able to access another browser tab with the URL http://gmail.com, for example, and steal information from there.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
nd other devices, but they require a user’s explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the NSA. <span>Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript from one page may not access the other page if they come from different sites (from a different domain, protocol or port). This is called the “Same Origin Policy”. To work around that, both pages must agree for data exchange and must contain special JavaScript code that handles it. We’ll cover that in the tutorial. This limitation is, again, for the user’s safety. A page from http://anysite.com which a user has opened must not be able to access another browser tab with the URL http://gmail.com, for example, and steal information from there. JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it




#has-images
  • JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that’s a safety limitation.

Such limitations do not exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugins/extensions which may ask for extended permissions.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
ser’s safety. A page from http://anysite.com which a user has opened must not be able to access another browser tab with the URL http://gmail.com, for example, and steal information from there. <span>JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that’s a safety limitation. Such limitations do not exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugins/extensions which may ask for extended permissions. What makes JavaScript unique? There are at least three great things about JavaScript: Full integration with HTML/CSS. Simple things are done simply. Supported by all major browsers and




There are at least three great things about JavaScript:

  • Full integration with HTML/CSS.
  • Simple things are done simply.
  • Supported by all major browsers and enabled by default.

JavaScript is the only browser technology that combines these three things.

That’s what makes JavaScript unique. That’s why it’s the most widespread tool for creating browser interfaces.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugins/extensions which may ask for extended permissions. What makes JavaScript unique? <span>There are at least three great things about JavaScript: Full integration with HTML/CSS. Simple things are done simply. Supported by all major browsers and enabled by default. JavaScript is the only browser technology that combines these three things. That’s what makes JavaScript unique. That’s why it’s the most widespread tool for creating browser interfaces. That said, JavaScript can be used to create servers, mobile applications, etc. Languages “over” JavaScript The syntax of JavaScript does not suit everyone’s needs. Different people want




Languages “over” JavaScript

The syntax of JavaScript does not suit everyone’s needs. Different people want different features.

That’s to be expected, because projects and requirements are different for everyone.

So, recently a plethora of new languages appeared, which are transpiled (converted) to JavaScript before they run in the browser.

Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it “under the hood”.

Examples of such languages:

  • CoffeeScript is “syntactic sugar” for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it.
  • TypeScript is concentrated on adding “strict data typing” to simplify the development and support of complex systems. It is developed by Microsoft.
  • Flow also adds data typing, but in a different way. Developed by Facebook.
  • Dart is a standalone language that has its own engine that runs in non-browser environments (like mobile apps), but also can be transpiled to JavaScript. Developed by Google.
  • Brython is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript.
  • Kotlin is a modern, concise and safe programming language that can target the browser or Node.

There are more. Of course, even if we use one of these transpiled languages, we should also know JavaScript to really understand what we’re doing.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
gs. That’s what makes JavaScript unique. That’s why it’s the most widespread tool for creating browser interfaces. That said, JavaScript can be used to create servers, mobile applications, etc. <span>Languages “over” JavaScript The syntax of JavaScript does not suit everyone’s needs. Different people want different features. That’s to be expected, because projects and requirements are different for everyone. So, recently a plethora of new languages appeared, which are transpiled (converted) to JavaScript before they run in the browser. Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it “under the hood”. Examples of such languages: CoffeeScript is “syntactic sugar” for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it. TypeScript is concentrated on adding “strict data typing” to simplify the development and support of complex systems. It is developed by Microsoft. Flow also adds data typing, but in a different way. Developed by Facebook. Dart is a standalone language that has its own engine that runs in non-browser environments (like mobile apps), but also can be transpiled to JavaScript. Developed by Google. Brython is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript. Kotlin is a modern, concise and safe programming language that can target the browser or Node. There are more. Of course, even if we use one of these transpiled languages, we should also know JavaScript to really understand what we’re doing. Summary JavaScript was initially created as a browser-only language, but it is now used in many other environments as well. Today, JavaScript has a unique position as the most widely-ad




The ECMA-262 specification contains the most in-depth, detailed and formalized information about JavaScript. It defines the language.

But being that formalized, it’s difficult to understand at first. So if you need the most trustworthy source of information about the language details, the specification is the right place. But it’s not for everyday use.

A new specification version is released every year. Between these releases, the latest specification draft is at https://tc39.es/ecma262/.

To read about new bleeding-edge features, including those that are “almost standard” (so-called “stage 3”), see proposals at https://github.com/tc39/proposals.

Also, if you’re developing for the browser, then there are other specifications covered in the second part of the tutorial.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
, 2022 Manuals and specifications This book is a tutorial. It aims to help you gradually learn the language. But once you’re familiar with the basics, you’ll need other resources. Specification <span>The ECMA-262 specification contains the most in-depth, detailed and formalized information about JavaScript. It defines the language. But being that formalized, it’s difficult to understand at first. So if you need the most trustworthy source of information about the language details, the specification is the right place. But it’s not for everyday use. A new specification version is released every year. Between these releases, the latest specification draft is at https://tc39.es/ecma262/. To read about new bleeding-edge features, including those that are “almost standard” (so-called “stage 3”), see proposals at https://github.com/tc39/proposals. Also, if you’re developing for the browser, then there are other specifications covered in the second part of the tutorial. Manuals MDN (Mozilla) JavaScript Reference is the main manual with examples and other information. It’s great to get in-depth information about individual language functions, methods et




MDN (Mozilla) JavaScript Reference is the main manual with examples and other information. It’s great to get in-depth information about individual language functions, methods etc.

You can find it at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
tage 3”), see proposals at https://github.com/tc39/proposals. Also, if you’re developing for the browser, then there are other specifications covered in the second part of the tutorial. Manuals <span>MDN (Mozilla) JavaScript Reference is the main manual with examples and other information. It’s great to get in-depth information about individual language functions, methods etc. You can find it at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference. Although, it’s often best to use an internet search instead. Just use “MDN [term]” in the query, e.g. https://google.com/search?q=MDN+parseInt to search for the parseInt function. Compa




JavaScript is a developing language, new features get added regularly.

To see their support among browser-based and other engines, see:

All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
h, it’s often best to use an internet search instead. Just use “MDN [term]” in the query, e.g. https://google.com/search?q=MDN+parseInt to search for the parseInt function. Compatibility tables <span>JavaScript is a developing language, new features get added regularly. To see their support among browser-based and other engines, see: https://caniuse.com – per-feature tables of support, e.g. to see which engines support modern cryptography functions: https://caniuse.com/#feat=cryptography. https://kangax.github.io/compat-table – a table with language features and engines that support those or don’t support. All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc. Please remember them (or this page) for the cases when you need in-depth information about a particular feature. Previous lessonNext lesson Share Tutorial map Comments read this before




The term IDE (Integrated Development Environment) refers to a powerful editor with many features that usually operates on a “whole project.” As the name suggests, it’s not just an editor, but a full-scale “development environment.”

An IDE loads the project (which can be many files), allows navigation between files, provides autocompletion based on the whole project (not just the open file), and integrates with a version management system (like git), a testing environment, and other “project-level” stuff.

If you haven’t selected an IDE yet, consider the following options:

For Windows, there’s also “Visual Studio”, not to be confused with “Visual Studio Code”. “Visual Studio” is a paid and mighty Windows-only editor, well-suited for the .NET platform. It’s also good at JavaScript. There’s also a free version Visual Studio Community.

Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer’s salary, so just choose the best one for you.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
editors A code editor is the place where programmers spend most of their time. There are two main types of code editors: IDEs and lightweight editors. Many people use one tool of each type. IDE <span>The term IDE (Integrated Development Environment) refers to a powerful editor with many features that usually operates on a “whole project.” As the name suggests, it’s not just an editor, but a full-scale “development environment.” An IDE loads the project (which can be many files), allows navigation between files, provides autocompletion based on the whole project (not just the open file), and integrates with a version management system (like git), a testing environment, and other “project-level” stuff. If you haven’t selected an IDE yet, consider the following options: Visual Studio Code (cross-platform, free). WebStorm (cross-platform, paid). For Windows, there’s also “Visual Studio”, not to be confused with “Visual Studio Code”. “Visual Studio” is a paid and mighty Windows-only editor, well-suited for the .NET platform. It’s also good at JavaScript. There’s also a free version Visual Studio Community. Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer’s salary, so just choose the best one for you. Lightweight editors “Lightweight editors” are not as powerful as IDEs, but they’re fast, elegant and simple. They are mainly used to open and edit a file instantly. The main difference




“Lightweight editors” are not as powerful as IDEs, but they’re fast, elegant and simple.

They are mainly used to open and edit a file instantly.

The main difference between a “lightweight editor” and an “IDE” is that an IDE works on a project-level, so it loads much more data on start, analyzes the project structure if needed and so on. A lightweight editor is much faster if we need only one file.

In practice, lightweight editors may have a lot of plugins including directory-level syntax analyzers and autocompleters, so there’s no strict border between a lightweight editor and an IDE.

There are many options, for instance:

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
dio Community. Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer’s salary, so just choose the best one for you. Lightweight editors <span>“Lightweight editors” are not as powerful as IDEs, but they’re fast, elegant and simple. They are mainly used to open and edit a file instantly. The main difference between a “lightweight editor” and an “IDE” is that an IDE works on a project-level, so it loads much more data on start, analyzes the project structure if needed and so on. A lightweight editor is much faster if we need only one file. In practice, lightweight editors may have a lot of plugins including directory-level syntax analyzers and autocompleters, so there’s no strict border between a lightweight editor and an IDE. There are many options, for instance: Sublime Text (cross-platform, shareware). Notepad++ (Windows, free). Vim and Emacs are also cool if you know how to use them. Let’s not argue The editors in the lists above are those that either I or my friends whom I consider good developers have been using for a long time and are happy with. There are other




Code is prone to errors. You will quite likely make errors… Oh, what am I talking about? You are absolutely going to make errors, at least if you’re a human, not a robot.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
meDark theme Share عربي English Español فارسی Français Indonesia Italiano 日本語 한국어 Русский Türkçe Українська 简体中文 Tutorial The JavaScript language An introduction April 5, 2021 Developer console <span>Code is prone to errors. You will quite likely make errors… Oh, what am I talking about? You are absolutely going to make errors, at least if you’re a human, not a robot. But in the browser, users don’t see errors by default. So, if something goes wrong in the script, we won’t see what’s broken and can’t fix it. To see errors and get a lot of other usefu




Now we can see errors, and that’s enough for a start. We’ll come back to developer tools later and cover debugging more in-depth in the chapter Debugging in the browser.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
ith the line number where the error has occurred. Below the error message, there is a blue > symbol. It marks a “command line” where we can type JavaScript commands. Press Enter to run them. <span>Now we can see errors, and that’s enough for a start. We’ll come back to developer tools later and cover debugging more in-depth in the chapter Debugging in the browser. Multi-line input Usually, when we put a line of code into the console, and then press Enter, it executes. To insert multiple lines, press Shift+Enter. This way one can enter long fragme




Most other browsers use F12 to open developer tools.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
ine of code into the console, and then press Enter, it executes. To insert multiple lines, press Shift+Enter. This way one can enter long fragments of JavaScript code. Firefox, Edge, and others <span>Most other browsers use F12 to open developer tools. The look & feel of them is quite similar. Once you know how to use one of these tools (you can start with Chrome), you can easily switch to another. Safari Safari (Mac browser, not




let’s open developer tools to see it.

Press F12 or, if you’re on Mac, then Cmd + Opt + J .

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unknown title
how to open them, look at errors, and run JavaScript commands. Google Chrome Open the page bug.html. There’s an error in the JavaScript code on it. It’s hidden from a regular visitor’s eyes, so <span>let’s open developer tools to see it. Press F12 or, if you’re on Mac, then Cmd+Opt+J. The developer tools will open on the Console tab by default. It looks somewhat like this: The exact look of developer tools depends on your version of Chrome. It changes from time to ti




If you need help on how to use Ledger, or run into problems, you can join the Ledger mailing list at http://groups.google.com/group/ledger-cli.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
mand-line using info ledger, which will bring up this entire manual in your TTY. Alternatively, the shorter man page can be accessed from the command-line either via man ledger or ledger --help <span>If you need help on how to use Ledger, or run into problems, you can join the Ledger mailing list at http://groups.google.com/group/ledger-cli. You can also find help in the #ledger channel on the IRC server irc.libera.chat. Previous: Getting help, Up: Introduction to Ledger [Contents][Index] 1.4 Third-Party Ledger Tutorials Th




2.2.3 Cleared Report

A very useful report is to show what your obligations are versus what expenditures have actually been recorded. It can take several days for a check to clear, but you should treat it as money spent. The cleared report shows just that (note that the cleared report will not format correctly for accounts that contain multiple commodities):

$ ledger -f drewr3.dat cleared
 $ -3,804.00 $ 775.00 Assets $ 1,396.00 $ 775.00 10-Dec-20 Checking $ 30.00 0 Business $ -5,200.00 0 Savings $ -1,000.00 $ -1,000.00 10-Dec-01 Equity:Opening Balances $ 6,654.00 $ 225.00 Expenses $ 5,500.00 0 Auto $ 20.00 0 Books $ 300.00 0 Escrow $ 334.00 $ 225.00 10-Dec-20 Food:Groceries $ 500.00 0 Interest:Mortgage $ -2,030.00 0 Income $ -2,000.00 0 Salary $ -30.00 0 Sales $ -63.60 0 Liabilities $ -20.00 0 MasterCard $ 200.00 0 Mortgage:Principal $ -243.60 0 Tithe
---------------- ---------------- --------- $ -243.60 0 

The first column shows the outstanding balance, the second column shows the “cleared” balance.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ies $ 37.50 $ 187.50 Expense:Food:Groceries $ 37.50 $ 225.00 Assets:Checking $ -225.00 0 Next: Using the Windows Command-Line, Previous: Register Report, Up: Run a Few Reports [Contents][Index] <span>2.2.3 Cleared Report A very useful report is to show what your obligations are versus what expenditures have actually been recorded. It can take several days for a check to clear, but you should treat it as money spent. The cleared report shows just that (note that the cleared report will not format correctly for accounts that contain multiple commodities): $ ledger -f drewr3.dat cleared $ -3,804.00 $ 775.00 Assets $ 1,396.00 $ 775.00 10-Dec-20 Checking $ 30.00 0 Business $ -5,200.00 0 Savings $ -1,000.00 $ -1,000.00 10-Dec-01 Equity:Opening Balances $ 6,654.00 $ 225.00 Expenses $ 5,500.00 0 Auto $ 20.00 0 Books $ 300.00 0 Escrow $ 334.00 $ 225.00 10-Dec-20 Food:Groceries $ 500.00 0 Interest:Mortgage $ -2,030.00 0 Income $ -2,000.00 0 Salary $ -30.00 0 Sales $ -63.60 0 Liabilities $ -20.00 0 MasterCard $ 200.00 0 Mortgage:Principal $ -243.60 0 Tithe ---------------- ---------------- --------- $ -243.60 0 The first column shows the outstanding balance, the second column shows the “cleared” balance. Previous: Cleared Report, Up: Run a Few Reports [Contents][Index] 2.2.4 Using the Windows Command-Line Using ledger under the windows command shell has one significant limitation. CMD.E




2.2.4 Using the Windows Command-Line

Using ledger under the windows command shell has one significant limitation. CMD.EXE is limited to standard ASCII characters and as such cannot display any currency symbols other than dollar signs ‘ $ ’.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
---------- --------- $ -243.60 0 The first column shows the outstanding balance, the second column shows the “cleared” balance. Previous: Cleared Report, Up: Run a Few Reports [Contents][Index] <span>2.2.4 Using the Windows Command-Line Using ledger under the windows command shell has one significant limitation. CMD.EXE is limited to standard ASCII characters and as such cannot display any currency symbols other than dollar signs ‘$’. Next: Keeping a Journal, Previous: Ledger Tutorial, Up: Overview [Contents][Index] 3 Principles of Accounting with Ledger Accounting with Ledger Stating where money goes Assets and Liab




Why is the Income a negative figure? When you look at the balance totals for your ledger, you may be surprised to see that Expenses are a positive figure, and Income is a negative figure. It may take some getting used to, but to properly use a general ledger you must think in terms of how money moves. Rather than Ledger “fixing” the minus signs, let’s understand why they are there.

When you earn money, the money has to come from somewhere. Let’s call that somewhere “society”. In order for society to give you an income, you must take money away (withdraw) from society in order to put it into (make a payment to) your bank. When you then spend that money, it leaves your bank account (a withdrawal) and goes back to society (a payment). This is why Income will appear negative—it reflects the money you have drawn from society—and why Expenses will be positive—it is the amount you’ve given back. These additions and subtractions will always cancel each other out in the end, because you don’t have the ability to create new money: it must always come from somewhere, and in the end must always leave. This is the beginning of economy, after which the explanation gets terribly difficult.

Based on that explanation, here’s another way to look at your balance report: every negative figure means that that account or person or place has less money now than when you started your ledger; and every positive figure means that that account or person or place has more money now than when you started your ledger. Make sense?

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
to. For example, when you are paid a salary, you must add money to your bank account and also subtract it from an income account: 9/29 My Employer Assets:Checking $500.00 Income:Salary $-500.00 <span>Why is the Income a negative figure? When you look at the balance totals for your ledger, you may be surprised to see that Expenses are a positive figure, and Income is a negative figure. It may take some getting used to, but to properly use a general ledger you must think in terms of how money moves. Rather than Ledger “fixing” the minus signs, let’s understand why they are there. When you earn money, the money has to come from somewhere. Let’s call that somewhere “society”. In order for society to give you an income, you must take money away (withdraw) from society in order to put it into (make a payment to) your bank. When you then spend that money, it leaves your bank account (a withdrawal) and goes back to society (a payment). This is why Income will appear negative—it reflects the money you have drawn from society—and why Expenses will be positive—it is the amount you’ve given back. These additions and subtractions will always cancel each other out in the end, because you don’t have the ability to create new money: it must always come from somewhere, and in the end must always leave. This is the beginning of economy, after which the explanation gets terribly difficult. Based on that explanation, here’s another way to look at your balance report: every negative figure means that that account or person or place has less money now than when you started your ledger; and every positive figure means that that account or person or place has more money now than when you started your ledger. Make sense? Next: Commodities and Currencies, Previous: Stating where money goes, Up: Principles of Accounting with Ledger [Contents][Index] 3.3 Assets and Liabilities Assets are money that you hav




Assets are money that you have, and Liabilities are money that you owe.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
you started your ledger. Make sense? Next: Commodities and Currencies, Previous: Stating where money goes, Up: Principles of Accounting with Ledger [Contents][Index] 3.3 Assets and Liabilities <span>Assets are money that you have, and Liabilities are money that you owe. “Liabilities” is just a more inclusive name for Debts. An Asset is typically increased by transferring money from an Income account, such as when you get paid. Here is a typical transac




“Liabilities” is just a more inclusive name for Debts.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
Previous: Stating where money goes, Up: Principles of Accounting with Ledger [Contents][Index] 3.3 Assets and Liabilities Assets are money that you have, and Liabilities are money that you owe. <span>“Liabilities” is just a more inclusive name for Debts. An Asset is typically increased by transferring money from an Income account, such as when you get paid. Here is a typical transaction: 2004/09/29 My Employer Assets:Checking $500.00 In




An Asset is typically increased by transferring money from an Income account, such as when you get paid.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ccounting with Ledger [Contents][Index] 3.3 Assets and Liabilities Assets are money that you have, and Liabilities are money that you owe. “Liabilities” is just a more inclusive name for Debts. <span>An Asset is typically increased by transferring money from an Income account, such as when you get paid. Here is a typical transaction: 2004/09/29 My Employer Assets:Checking $500.00 Income:Salary Money, here, comes from an Income account belonging to ‘My Employer’, and is transferred to y




Liabilities track money owed to others. This can happen when you borrow money to buy something, or if you owe someone money.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
hecking $500.00 Income:Salary Money, here, comes from an Income account belonging to ‘My Employer’, and is transferred to your checking account. The money is now yours, which makes it an Asset. <span>Liabilities track money owed to others. This can happen when you borrow money to buy something, or if you owe someone money. Here is an example of increasing a MasterCard liability by spending money with it: 2004/09/30 Restaurant Expenses:Dining $25.00 Liabilities:MasterCard The Dining account balance now sho




The combined total of your Assets and Liabilities is your net worth. So to see your current net worth, use this command:

$ ledger balance ^assets ^liabilities
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ws $25 spent on Dining, and a corresponding $25 owed on the MasterCard—and therefore shown as $-25.00. The MasterCard liability shows up as negative because it offsets the value of your assets. <span>The combined total of your Assets and Liabilities is your net worth. So to see your current net worth, use this command: $ ledger balance ^assets ^liabilities $500.00 Assets:Checking $-25.00 Liabilities:MasterCard -------------------- $475.00 In a similar vein, your Income accounts show up negative, because they transfer money from an account




The combined total of Income and Expenses is your cash flow. A positive cash flow means you are spending more than you make, since income is always a negative figure. To see your current cash flow, use this command:

$ ledger balance ^income ^expenses
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ein, your Income accounts show up negative, because they transfer money from an account in order to increase your assets. Your Expenses show up positive because that is where the money went to. <span>The combined total of Income and Expenses is your cash flow. A positive cash flow means you are spending more than you make, since income is always a negative figure. To see your current cash flow, use this command: $ ledger balance ^income ^expenses $25.00 Expenses:Dining $-500.00 Income:Salary -------------------- $-475.00 Another common question to ask of your expenses is: How much do I spend each month on X? Ledger provides a si




How much do I spend each month on X? Ledger provides a simple way of displaying monthly totals for any account. Here is an example that summarizes your monthly automobile expenses:

$ ledger -M register -f drewr3.dat expenses:auto
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
t cash flow, use this command: $ ledger balance ^income ^expenses $25.00 Expenses:Dining $-500.00 Income:Salary -------------------- $-475.00 Another common question to ask of your expenses is: <span>How much do I spend each month on X? Ledger provides a simple way of displaying monthly totals for any account. Here is an example that summarizes your monthly automobile expenses: $ ledger -M register -f drewr3.dat expenses:auto 11-Jan-01 - 11-Jan-31 Expenses:Auto $ 5,500.00 $ 5,500.00 This assumes, of course, that you use account names like ‘Expenses:Auto:Gas’ and ‘Expenses:Auto:Repair’. Tracking reimbursable




Sometimes you will want to spend money on behalf of someone else, which will eventually get repaid. Since the money is still yours, it is really an asset. And since the expenditure was for someone else, you don’t want it contaminating your Expenses reports. You will need to keep an account for tracking reimbursements.

This is fairly easy to do in ledger. When spending the money, spend it to your Assets:Reimbursements, using a different account for each person or business that you spend money for.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
Expenses:Auto:Gas’ and ‘Expenses:Auto:Repair’. Tracking reimbursable expenses Previous: Assets and Liabilities, Up: Assets and Liabilities [Contents][Index] 3.3.1 Tracking reimbursable expenses <span>Sometimes you will want to spend money on behalf of someone else, which will eventually get repaid. Since the money is still yours, it is really an asset. And since the expenditure was for someone else, you don’t want it contaminating your Expenses reports. You will need to keep an account for tracking reimbursements. This is fairly easy to do in ledger. When spending the money, spend it to your Assets:Reimbursements, using a different account for each person or business that you spend money for. For example: 2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard This shows $100.00 spent on a MasterCard at Circuit City, with the expense was made




what to do if you run your own business, and you want to keep track of expenses made on your own behalf, while still tracking everything in a single ledger file? This is more complex, because you need to track two separate things: 1) The fact that the money should be reimbursed to you, and 2) What the expense account was, so that you can later determine where your company is spending its money.

This kind of posting is best handled with mirrored postings in two different files, one for your personal accounts, and one for your company accounts. But keeping them in one file involves the same kinds of postings, so those are what is shown here. First, the personal transaction, which shows the need for reimbursement:

2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard

This is the same as above, except that you own Company XYZ, and are keeping track of its expenses in the same ledger file. This transaction should be immediately followed by an equivalent transaction, which shows the kind of expense, and also notes the fact that $100.00 is now payable to you:

2004/09/29 Circuit City Company XYZ:Expenses:Computer:Software $100.00 Company XYZ:Accounts Payable:Your Name

This second transaction shows that Company XYZ has just spent $100.00 on software, and that this $100.00 came from Your Name, which must be paid back.

These two transactions can also be merged, to make things a little clearer. Note that all amounts must be specified now:

2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard $-100.00 Company XYZ:Expenses:Computer:Software $100.00 Company XYZ:Accounts Payable:Your Name $-100.00

To “pay back” the reimbursement, just reverse the order of everything, except this time drawing the money from a company asset, paying it to accounts payable, and then drawing it again from the reimbursement account, and paying it to your personal asset account. It’s easier shown than said:

2004/10/15 Company XYZ Assets:Checking $100.00 Assets:Reimbursements:Company XYZ $-100.00 Company XYZ:Accounts Payable:Your Name $100.00 Company XYZ:Assets:Checking $-100.00

And now the reimbursements account is paid off, accounts payable is paid off, and $100.00 has been effectively transferred from the company’s checking account to your personal checking account. The money simply “waited”—in both ‘ Assets:Reimbursements:Company XYZ ’, and ‘ Company XYZ:Accounts Payable:Your Name ’—until such time as it could be paid off.

The value of tracking expenses from both sides like that is that you do not contaminate your personal expense report with expenses made on behalf of others, while at the same time making it possible to generate accurate reports of your company’s expenditures. It is more verbose than just paying for things with your personal assets, but it gives you a very accurate information trail.

The advantage to keep these doubled transactions together is that they always stay in sync. The advantage to keeping them apart is that it clarifies the transfer’s point of view. To keep the postings in separate files, just separate the two transactions that were joined above. For example, for both the expense and the pay-back shown above, the following four transactions would be created. Two in your personal ledger file:

2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard $-100.00 2004/10/15 Company XYZ Assets:Checking $100.00 Assets:Reimbursements:Company XYZ $-100.00

And two in your company ledger file:

apply account Company XYZ 2004/09/29 Circuit City Expenses:Computer:Software $100.00 Accounts Payable:Your Name $-100.00 2004/10/15 Company XYZ Accounts Payable:Your Name $100.00 Assets:Checking $-100.00 end apply account

(Note: Th

...
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
Z Assets:Checking $100.00 Assets:Reimbursements:Company XYZ This deposits the money owed from Company XYZ into a checking account, presumably because they paid the amount back with a check. But <span>what to do if you run your own business, and you want to keep track of expenses made on your own behalf, while still tracking everything in a single ledger file? This is more complex, because you need to track two separate things: 1) The fact that the money should be reimbursed to you, and 2) What the expense account was, so that you can later determine where your company is spending its money. This kind of posting is best handled with mirrored postings in two different files, one for your personal accounts, and one for your company accounts. But keeping them in one file involves the same kinds of postings, so those are what is shown here. First, the personal transaction, which shows the need for reimbursement: 2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard This is the same as above, except that you own Company XYZ, and are keeping track of its expenses in the same ledger file. This transaction should be immediately followed by an equivalent transaction, which shows the kind of expense, and also notes the fact that $100.00 is now payable to you: 2004/09/29 Circuit City Company XYZ:Expenses:Computer:Software $100.00 Company XYZ:Accounts Payable:Your Name This second transaction shows that Company XYZ has just spent $100.00 on software, and that this $100.00 came from Your Name, which must be paid back. These two transactions can also be merged, to make things a little clearer. Note that all amounts must be specified now: 2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard $-100.00 Company XYZ:Expenses:Computer:Software $100.00 Company XYZ:Accounts Payable:Your Name $-100.00 To “pay back” the reimbursement, just reverse the order of everything, except this time drawing the money from a company asset, paying it to accounts payable, and then drawing it again from the reimbursement account, and paying it to your personal asset account. It’s easier shown than said: 2004/10/15 Company XYZ Assets:Checking $100.00 Assets:Reimbursements:Company XYZ $-100.00 Company XYZ:Accounts Payable:Your Name $100.00 Company XYZ:Assets:Checking $-100.00 And now the reimbursements account is paid off, accounts payable is paid off, and $100.00 has been effectively transferred from the company’s checking account to your personal checking account. The money simply “waited”—in both ‘Assets:Reimbursements:Company XYZ’, and ‘Company XYZ:Accounts Payable:Your Name’—until such time as it could be paid off. The value of tracking expenses from both sides like that is that you do not contaminate your personal expense report with expenses made on behalf of others, while at the same time making it possible to generate accurate reports of your company’s expenditures. It is more verbose than just paying for things with your personal assets, but it gives you a very accurate information trail. The advantage to keep these doubled transactions together is that they always stay in sync. The advantage to keeping them apart is that it clarifies the transfer’s point of view. To keep the postings in separate files, just separate the two transactions that were joined above. For example, for both the expense and the pay-back shown above, the following four transactions would be created. Two in your personal ledger file: 2004/09/29 Circuit City Assets:Reimbursements:Company XYZ $100.00 Liabilities:MasterCard $-100.00 2004/10/15 Company XYZ Assets:Checking $100.00 Assets:Reimbursements:Company XYZ $-100.00 And two in your company ledger file: apply account Company XYZ 2004/09/29 Circuit City Expenses:Computer:Software $100.00 Accounts Payable:Your Name $-100.00 2004/10/15 Company XYZ Accounts Payable:Your Name $100.00 Assets:Checking $-100.00 end apply account (Note: The apply account above means that all accounts mentioned in the file are children of that account. In this case it means that all activity in the file relates to Company XYZ). After creating these transactions, you will always know that $100.00 was spent using your MasterCard on behalf of Company XYZ, and that Company XYZ spent the money on computer software and paid it back about two weeks later. $ ledger balance --no-total $100.00 Assets:Checking 0 Company XYZ $-100.00 Assets:Checking $100.00 Expenses:Computer:Software $-100.00 Liabilities:MasterCard Next: Accounts and Inventories, Previous: Assets and Liabilities, Up: Principles of Accounting with Ledger [Contents][Index] 3.4 Commodities and Currencies Ledger makes no assumptions a




The commodity may be any non-numeric string that does not contain a period, comma, forward slash or at-sign. It may appear before or after the amount, although it is assumed that symbols appearing before the amount refer to currencies, while non-joined symbols appearing after the amount refer to commodities.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
: Principles of Accounting with Ledger [Contents][Index] 3.4 Commodities and Currencies Ledger makes no assumptions about the commodities you use; it only requires that you specify a commodity. <span>The commodity may be any non-numeric string that does not contain a period, comma, forward slash or at-sign. It may appear before or after the amount, although it is assumed that symbols appearing before the amount refer to currencies, while non-joined symbols appearing after the amount refer to commodities. Here are some valid currency and commodity specifiers: $20.00 ; currency: twenty US dollars 40 AAPL ; commodity: 40 shares of Apple stock 60 DM ; currency: 60 Deutsche Mark £50 ; curren




Ledger will examine the first use of any commodity to determine how that commodity should be printed on reports. It pays attention to whether the name of commodity was separated from the amount, whether it came before or after, the precision used in specifying the amount, whether thousand marks were used, etc. This is done so that printing the commodity looks the same as the way you use it.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ncy: twenty US dollars 40 AAPL ; commodity: 40 shares of Apple stock 60 DM ; currency: 60 Deutsche Mark £50 ; currency: 50 British pounds 50 EUR ; currency: 50 Euros (or use appropriate symbol) <span>Ledger will examine the first use of any commodity to determine how that commodity should be printed on reports. It pays attention to whether the name of commodity was separated from the amount, whether it came before or after, the precision used in specifying the amount, whether thousand marks were used, etc. This is done so that printing the commodity looks the same as the way you use it. An account may contain multiple commodities, in which case it will have separate totals for each. For example, if your brokerage account contains both cash, gold, and several stock quan




An account may contain multiple commodities, in which case it will have separate totals for each. For example, if your brokerage account contains both cash, gold, and several stock quantities, the balance might look like:

 $200.00
100.00 AU AAPL 40 BORL 100 FEQTX 50 Assets:Brokerage

This balance report shows how much of each commodity is in your brokerage account.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
er it came before or after, the precision used in specifying the amount, whether thousand marks were used, etc. This is done so that printing the commodity looks the same as the way you use it. <span>An account may contain multiple commodities, in which case it will have separate totals for each. For example, if your brokerage account contains both cash, gold, and several stock quantities, the balance might look like: $200.00 100.00 AU AAPL 40 BORL 100 FEQTX 50 Assets:Brokerage This balance report shows how much of each commodity is in your brokerage account. Sometimes, you will want to know the current street value of your balance, and not the commodity totals. For this to happen, you must specify what the current price is for each commodit




Sometimes, you will want to know the current street value of your balance, and not the commodity totals. For this to happen, you must specify what the current price is for each commodity. The price can be any commodity, in which case the balance will be computed in terms of that commodity. The usual way to specify prices is with a price history file, which might look like this:

P 2004/06/21 02:18:01 FEQTX $22.49
P 2004/06/21 02:18:01 BORL $6.20
P 2004/06/21 02:18:02 AAPL $32.91
P 2004/06/21 02:18:02 AU $400.00

Specify the price history to use with the --price-db FILE option, with the --market (-V) option to report in terms of current market value:

$ ledger --price-db prices.db -V balance brokerage

The balance for your brokerage account will be reported in US dollars, since the prices database uses that currency.

$40880.00 Assets:Brokerage

You can convert from any commodity to any other commodity. Let’s say you had $5000 in your checking account, and for whatever reason you wanted to know how many ounces of gold that would buy, in terms of the current price of gold:

$ ledger -X AU balance checking

The result of this command might be:

12.50 AU Assets:Checking
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
al stock quantities, the balance might look like: $200.00 100.00 AU AAPL 40 BORL 100 FEQTX 50 Assets:Brokerage This balance report shows how much of each commodity is in your brokerage account. <span>Sometimes, you will want to know the current street value of your balance, and not the commodity totals. For this to happen, you must specify what the current price is for each commodity. The price can be any commodity, in which case the balance will be computed in terms of that commodity. The usual way to specify prices is with a price history file, which might look like this: P 2004/06/21 02:18:01 FEQTX $22.49 P 2004/06/21 02:18:01 BORL $6.20 P 2004/06/21 02:18:02 AAPL $32.91 P 2004/06/21 02:18:02 AU $400.00 Specify the price history to use with the --price-db FILE option, with the --market (-V) option to report in terms of current market value: $ ledger --price-db prices.db -V balance brokerage The balance for your brokerage account will be reported in US dollars, since the prices database uses that currency. $40880.00 Assets:Brokerage You can convert from any commodity to any other commodity. Let’s say you had $5000 in your checking account, and for whatever reason you wanted to know how many ounces of gold that would buy, in terms of the current price of gold: $ ledger -X AU balance checking The result of this command might be: 12.50 AU Assets:Checking Commodity price histories Commodity equivalences Next: Commodity equivalences, Previous: Commodities and Currencies, Up: Commodities and Currencies [Contents][Index] 3.4.1 Commodity pri




By default, ledger will not consider commodity prices when generating its various reports. It will always report balances in terms of the commodity total, rather than the current value of those commodities. To enable pricing reports, use one of the commodity reporting options.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
k like those below: P 2004/06/21 02:17:58 TWCUX $27.76 P 2004/06/21 02:17:59 AGTHX $25.41 P 2004/06/21 02:18:00 OPTFX $39.31 P 2004/06/21 02:18:01 FEQTX $22.49 P 2004/06/21 02:18:02 AAPL $32.91 <span>By default, ledger will not consider commodity prices when generating its various reports. It will always report balances in terms of the commodity total, rather than the current value of those commodities. To enable pricing reports, use one of the commodity reporting options. Previous: Commodity price histories, Up: Commodities and Currencies [Contents][Index] 3.4.2 Commodity equivalences Sometimes a commodity has several forms which are all equivalent. An e




modities and Currencies [Contents][Index]

3.4.2 Commodity equivalences

Sometimes a commodity has several forms which are all equivalent. An example of this is time. Whether tracked in terms of minutes, hours or days, it should be possible to convert between the various forms. Doing this requires the use of commodity equivalences.

For example, you might have the following two postings, one which transfers an hour of time into a ‘ Billable ’ account, and another which decreases the same account by ten minutes. The resulting report will indicate that fifty minutes remain:

2005/10/01 Work done for company Billable:Client 1h Project:XYZ 2005/10/02 Return ten minutes to the project Project:XYZ 10m Billable:Client

Reporting the balance for this ledger file produces:

$ ledger --no-total balance Billable Project
 50.0m Billable:Client -50.0m Project:XYZ

This example works because ledger already knows how to handle seconds, minutes and hours, as part of its time tracking support. Defining other equivalences is simple. The following is an example that creates data equivalences, helpful for tracking bytes, kilobytes, megabytes, and more:

C 1.00 Kb = 1024 b
C 1.00 Mb = 1024 Kb
C 1.00 Gb = 1024 Mb
C 1.00 Tb = 1024 Gb

Each of these definitions correlates a commodity (such as ‘ Kb ’) and a default precision, with a certain quantity of another commodity. In the above example, kilobytes are reported with two decimal places of precision and each kilobyte is equal to 1024 bytes.

Equivalence chains can be as long as desired. Whenever a commodity would report as a decimal amount (less than ‘ 1.00 ’), the next smallest commodity is used. If a commodity could be reported in terms of a higher commodity without resulting to a partial fraction, then the larger commodity is used.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ms of the commodity total, rather than the current value of those commodities. To enable pricing reports, use one of the commodity reporting options. Previous: Commodity price histories, Up: Com<span>modities and Currencies [Contents][Index] 3.4.2 Commodity equivalences Sometimes a commodity has several forms which are all equivalent. An example of this is time. Whether tracked in terms of minutes, hours or days, it should be possible to convert between the various forms. Doing this requires the use of commodity equivalences. For example, you might have the following two postings, one which transfers an hour of time into a ‘Billable’ account, and another which decreases the same account by ten minutes. The resulting report will indicate that fifty minutes remain: 2005/10/01 Work done for company Billable:Client 1h Project:XYZ 2005/10/02 Return ten minutes to the project Project:XYZ 10m Billable:Client Reporting the balance for this ledger file produces: $ ledger --no-total balance Billable Project 50.0m Billable:Client -50.0m Project:XYZ This example works because ledger already knows how to handle seconds, minutes and hours, as part of its time tracking support. Defining other equivalences is simple. The following is an example that creates data equivalences, helpful for tracking bytes, kilobytes, megabytes, and more: C 1.00 Kb = 1024 b C 1.00 Mb = 1024 Kb C 1.00 Gb = 1024 Mb C 1.00 Tb = 1024 Gb Each of these definitions correlates a commodity (such as ‘Kb’) and a default precision, with a certain quantity of another commodity. In the above example, kilobytes are reported with two decimal places of precision and each kilobyte is equal to 1024 bytes. Equivalence chains can be as long as desired. Whenever a commodity would report as a decimal amount (less than ‘1.00’), the next smallest commodity is used. If a commodity could be reported in terms of a higher commodity without resulting to a partial fraction, then the larger commodity is used. Next: Understanding Equity, Previous: Commodities and Currencies, Up: Principles of Accounting with Ledger [Contents][Index] 3.5 Accounts and Inventories Since Ledger’s accounts and com




The only purpose for choosing one kind of source account over another is to generate more informative reports later on. The more you know, the better the analysis you can perform.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
d to your Inventory account. Note that you don’t have to use ‘Places:Black's Tavern’ as the source account. You could use ‘EverQuest:System’ to represent the fact that you acquired them online. <span>The only purpose for choosing one kind of source account over another is to generate more informative reports later on. The more you know, the better the analysis you can perform. If you later sell some of these items to another player, the transaction would look like: 10/2 Sturm Brightblade EverQuest:Inventory -2 Steaks EverQuest:Inventory 15 Gold Now you’ve tur




The most confusing transaction in any ledger will be your equity account—because starting balances can’t come out of nowhere.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
pples 15 Gold 3 Steaks EverQuest:Inventory Next: Dealing with Petty Cash, Previous: Accounts and Inventories, Up: Principles of Accounting with Ledger [Contents][Index] 3.6 Understanding Equity <span>The most confusing transaction in any ledger will be your equity account—because starting balances can’t come out of nowhere. When you first start your ledger, you will likely already have money in some of your accounts. Let’s say there’s $100 in your checking account; then add a transaction to your ledger to




When you first start your ledger, you will likely already have money in some of your accounts. Let’s say there’s $100 in your checking account; then add a transaction to your ledger to reflect this amount. Where will the money come from? The answer: your equity.

10/2 Opening Balance Assets:Checking $100.00 Equity:Opening Balances
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
f Accounting with Ledger [Contents][Index] 3.6 Understanding Equity The most confusing transaction in any ledger will be your equity account—because starting balances can’t come out of nowhere. <span>When you first start your ledger, you will likely already have money in some of your accounts. Let’s say there’s $100 in your checking account; then add a transaction to your ledger to reflect this amount. Where will the money come from? The answer: your equity. 10/2 Opening Balance Assets:Checking $100.00 Equity:Opening Balances But what is equity? You may have heard of equity when people talked about house mortgages, as “the part of the house that you own”. Basically, equity is like the value of something. If




But what is equity? You may have heard of equity when people talked about house mortgages, as “the part of the house that you own”. Basically, equity is like the value of something. If you own a car worth $5000, then you have $5000 in equity in that car. In order to turn that car (a commodity) into a cash flow, or a credit to your bank account, you will have to debit the equity by selling it.

When you start a ledger, you probably already have a net worth. Your net worth is your current equity. By transferring the money in the ledger from your equity to your bank accounts, you are crediting the ledger account based on your prior equity. That is why, when you look at the balance report, you will see a large negative number for Equity that never changes: Because that is what you were worth (what you debited from yourself in order to start the ledger) before the money started moving around. If the total positive value of your assets is greater than the absolute value of your starting equity, it means you are making money.

Clear as mud? Keep thinking about it. Until you figure it out, put not Equity at the end of your balance command, to remove the confusing figure from the total.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ount; then add a transaction to your ledger to reflect this amount. Where will the money come from? The answer: your equity. 10/2 Opening Balance Assets:Checking $100.00 Equity:Opening Balances <span>But what is equity? You may have heard of equity when people talked about house mortgages, as “the part of the house that you own”. Basically, equity is like the value of something. If you own a car worth $5000, then you have $5000 in equity in that car. In order to turn that car (a commodity) into a cash flow, or a credit to your bank account, you will have to debit the equity by selling it. When you start a ledger, you probably already have a net worth. Your net worth is your current equity. By transferring the money in the ledger from your equity to your bank accounts, you are crediting the ledger account based on your prior equity. That is why, when you look at the balance report, you will see a large negative number for Equity that never changes: Because that is what you were worth (what you debited from yourself in order to start the ledger) before the money started moving around. If the total positive value of your assets is greater than the absolute value of your starting equity, it means you are making money. Clear as mud? Keep thinking about it. Until you figure it out, put not Equity at the end of your balance command, to remove the confusing figure from the total. Next: Working with multiple funds and accounts, Previous: Understanding Equity, Up: Principles of Accounting with Ledger [Contents][Index] 3.7 Dealing with Petty Cash Something that sto




3.7 Dealing with Petty Cash

Something that stops many people from keeping a ledger at all is the insanity of tracking small cash expenses. They rarely generate a receipt, and there are often a lot of small postings, rather than a few large ones, as with checks.

One solution is: don’t bother. Move your spending to a debit card, but in general ignore cash. Once you withdraw it from the ATM, mark it as already spent to an ‘ Expenses:Cash ’ category:

2004/03/15 ATM Expenses:Cash $100.00 Assets:Checking

If at some point you make a large cash expense that you want to track, just move the amount of the expense from ‘ Expenses:Cash ’ into the target account:

2004/03/20 Somebody Expenses:Food $65.00 Expenses:Cash

This way, you can still track large cash expenses, while ignoring all of the smaller ones.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ommand, to remove the confusing figure from the total. Next: Working with multiple funds and accounts, Previous: Understanding Equity, Up: Principles of Accounting with Ledger [Contents][Index] <span>3.7 Dealing with Petty Cash Something that stops many people from keeping a ledger at all is the insanity of tracking small cash expenses. They rarely generate a receipt, and there are often a lot of small postings, rather than a few large ones, as with checks. One solution is: don’t bother. Move your spending to a debit card, but in general ignore cash. Once you withdraw it from the ATM, mark it as already spent to an ‘Expenses:Cash’ category: 2004/03/15 ATM Expenses:Cash $100.00 Assets:Checking If at some point you make a large cash expense that you want to track, just move the amount of the expense from ‘Expenses:Cash’ into the target account: 2004/03/20 Somebody Expenses:Food $65.00 Expenses:Cash This way, you can still track large cash expenses, while ignoring all of the smaller ones. Previous: Dealing with Petty Cash, Up: Principles of Accounting with Ledger [Contents][Index] 3.8 Working with multiple funds and accounts There are situations when the accounts you’re




3.8 Working with multiple funds and accounts

There are situations when the accounts you’re tracking are different between your clients and the financial institutions where money is kept. An example of this is working as the treasurer for a religious institution. From the secular point of view, you might be working with three different accounts:

  • Checking
  • Savings
  • Credit Card

From a religious point of view, the community expects to divide its resources into multiple “funds”, from which it makes purchases or reserves resources for later:

  • School fund
  • Building fund
  • Community fund

The problem with this kind of setup is that, when you spend money, it comes from two or more places at once: the account and the fund. And yet, the correlation of amounts between funds and accounts is rarely one-to-one. What if the school fund has ‘ $500.00 ’, but ‘ $400.00 ’ of that comes from Checking, and ‘ $100.00 ’ from Savings?

Traditional finance packages require that the money reside in only one place. But there are really two “views” of the data: from the account point of view and from the fund point of view—yet both sets should reflect the same overall expenses and cash flow. It’s simply where the money resides that differs.

This situation can be handled in one of two ways. The first is using virtual postings to represent the fact that money is moving to and from two kind of accounts at the same time:

2004/03/20 Contributions Assets:Checking $500.00 Income:Donations 2004/03/25 Distribution of donations [Funds:School] $300.00 [Funds:Building] $200.00 [Assets:Checking] $-500.00

The use of square brackets in the second transaction ensures that the virtual postings balance to zero. Now money can be spent directly from a fund at the same time as money is drawn from a physical account:

2004/03/25 Payment for books (paid from Checking) Expenses:Books $100.00 Assets:Checking $-100.00 (Funds:School) $-100.00

The use of round brackets creates a virtual posting without ensuring a balance to zero. When reports are generated, by default they’ll appear in terms of the funds. In this case, you will likely want to mask out your ‘ Assets ’ account, because otherwise the balance won’t make much sense:

$ ledger --no-total bal not ^Assets
 $100.00 Expenses:Books $400.00 Funds $200.00 Building $200.00 School $-500.00 Income:Donations

If the --real option is used, the report will be in terms of the real accounts:

$ ledger --real --no-total bal
 $400.00 Assets:Checking $100.00 Expenses:Books $-500.00 Income:Donations

If more asset accounts are needed as the source of a posting, just list them as you would normally, for example:

2004/03/25 Payment for books (paid from Checking) Expenses:Books $100.00 Assets:Checking $-50.00 Liabilities:Credit Card $-50.00 (Funds:School) $-100.00

The second way of tracking funds is to use transaction codes. In this respect the codes become like virtual accounts that embrace the entire set of postings. Basically, we are associating a transaction with a fund by setting its code. Here are two transactions that deposit money into, and spend money from, the ‘ Funds:School ’ fund:

2004/03/25 (Funds:School) Donations Assets:Checking $100.00 Income:Donations 2004/03/25 (Funds:Building) Donations Assets:Checking $20.00 Income:Donations 2004/04/25 (Funds:School) Payment for books Expenses:Books $50.00 Assets:Checking

Note how the accounts now relate only to the real accounts, and any balance or register reports will reflect this. That the transactions rela

...
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ses:Cash This way, you can still track large cash expenses, while ignoring all of the smaller ones. Previous: Dealing with Petty Cash, Up: Principles of Accounting with Ledger [Contents][Index] <span>3.8 Working with multiple funds and accounts There are situations when the accounts you’re tracking are different between your clients and the financial institutions where money is kept. An example of this is working as the treasurer for a religious institution. From the secular point of view, you might be working with three different accounts: Checking Savings Credit Card From a religious point of view, the community expects to divide its resources into multiple “funds”, from which it makes purchases or reserves resources for later: School fund Building fund Community fund The problem with this kind of setup is that, when you spend money, it comes from two or more places at once: the account and the fund. And yet, the correlation of amounts between funds and accounts is rarely one-to-one. What if the school fund has ‘$500.00’, but ‘$400.00’ of that comes from Checking, and ‘$100.00’ from Savings? Traditional finance packages require that the money reside in only one place. But there are really two “views” of the data: from the account point of view and from the fund point of view—yet both sets should reflect the same overall expenses and cash flow. It’s simply where the money resides that differs. This situation can be handled in one of two ways. The first is using virtual postings to represent the fact that money is moving to and from two kind of accounts at the same time: 2004/03/20 Contributions Assets:Checking $500.00 Income:Donations 2004/03/25 Distribution of donations [Funds:School] $300.00 [Funds:Building] $200.00 [Assets:Checking] $-500.00 The use of square brackets in the second transaction ensures that the virtual postings balance to zero. Now money can be spent directly from a fund at the same time as money is drawn from a physical account: 2004/03/25 Payment for books (paid from Checking) Expenses:Books $100.00 Assets:Checking $-100.00 (Funds:School) $-100.00 The use of round brackets creates a virtual posting without ensuring a balance to zero. When reports are generated, by default they’ll appear in terms of the funds. In this case, you will likely want to mask out your ‘Assets’ account, because otherwise the balance won’t make much sense: $ ledger --no-total bal not ^Assets $100.00 Expenses:Books $400.00 Funds $200.00 Building $200.00 School $-500.00 Income:Donations If the --real option is used, the report will be in terms of the real accounts: $ ledger --real --no-total bal $400.00 Assets:Checking $100.00 Expenses:Books $-500.00 Income:Donations If more asset accounts are needed as the source of a posting, just list them as you would normally, for example: 2004/03/25 Payment for books (paid from Checking) Expenses:Books $100.00 Assets:Checking $-50.00 Liabilities:Credit Card $-50.00 (Funds:School) $-100.00 The second way of tracking funds is to use transaction codes. In this respect the codes become like virtual accounts that embrace the entire set of postings. Basically, we are associating a transaction with a fund by setting its code. Here are two transactions that deposit money into, and spend money from, the ‘Funds:School’ fund: 2004/03/25 (Funds:School) Donations Assets:Checking $100.00 Income:Donations 2004/03/25 (Funds:Building) Donations Assets:Checking $20.00 Income:Donations 2004/04/25 (Funds:School) Payment for books Expenses:Books $50.00 Assets:Checking Note how the accounts now relate only to the real accounts, and any balance or register reports will reflect this. That the transactions relate to a particular fund is kept only in the code. How does this become a fund report? By using the --payee=code option, you can generate a register report where the payee for each posting shows the code. Alone, this is not terribly interesting; but when combined with the --by-payee (-P) option, you will now see account subtotals for any postings related to a specific fund. So, to see the current monetary balances of all funds, the command would be: $ ledger --payee=code -P reg ^Assets 04-Mar-25 Funds:Building Assets:Checking $20.00 $20.00 04-Mar-25 Funds:School Assets:Checking $50.00 $70.00 Or to see a particular fund’s expenses, the ‘School’ fund in this case: $ ledger --payee=code -P reg ^Expenses and code School 04-Apr-25 Funds:School Expenses:Books $50.00 $50.00 Both approaches yield different kinds of flexibility, depending on how you prefer to think of your funds: as virtual accounts, or as tags associated with particular transactions. Your own tastes will decide which is best for your situation. Next: Transactions, Previous: Principles of Accounting with Ledger, Up: Overview [Contents][Index] 4 Keeping a Journal The most important part of accounting is keeping a good journal. I




The most important part of accounting is keeping a good journal.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
ransactions. Your own tastes will decide which is best for your situation. Next: Transactions, Previous: Principles of Accounting with Ledger, Up: Overview [Contents][Index] 4 Keeping a Journal <span>The most important part of accounting is keeping a good journal. If you have a good journal, tools can be written to work whatever mathematical tricks you need to better understand your spending patterns. Without a good journal, no tool, however smar




If you require a user interface to maintain journal transactions GnuCash is a good alternative.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
r smart, can help you. The Ledger program aims at making journal transactions as simple as possible. Since it is a command-line tool, it does not provide a user interface for keeping a journal. <span>If you require a user interface to maintain journal transactions GnuCash is a good alternative. If you are not using GnuCash, but a text editor to maintain your journal, read on. Ledger has been designed to make data transactions as simple as possible, by keeping the journal forma




you do not need to tell Ledger about the accounts you use. Any time Ledger sees a posting involving an account it knows nothing about, it will create it2. If you use a commodity that is new to Ledger, it will create that commodity, and determine its display characteristics (placement of the symbol before or after the amount, display precision, etc.) based on how you used the commodity in the posting.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
nsactions as simple as possible, by keeping the journal format easy, and also by automagically determining as much information as possible based on the nature of your transactions. For example, <span>you do not need to tell Ledger about the accounts you use. Any time Ledger sees a posting involving an account it knows nothing about, it will create it2. If you use a commodity that is new to Ledger, it will create that commodity, and determine its display characteristics (placement of the symbol before or after the amount, display precision, etc.) based on how you used the commodity in the posting. The Most Basic Entry Starting up Structuring your Accounts Commenting on your Journal Currency and Commodities Keeping it Consistent Journal Format Converting from other formats Archivi




The only requirements are that the start of the transaction (the date typically) is at the beginning of the first line of the transaction, and the accounts are indented by at least one space. If you omit the leading spaces in the account lines Ledger will generate an error. There must be at least two spaces, or a tab, between the amount and the account. If you do not have adequate separation between the amount and the account Ledger will give an error and stop calculating.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
mplied hierarchy established by separating with colons (see Structuring your Accounts). The format is very flexible and it isn’t necessary that you indent and space out things exactly as shown. <span>The only requirements are that the start of the transaction (the date typically) is at the beginning of the first line of the transaction, and the accounts are indented by at least one space. If you omit the leading spaces in the account lines Ledger will generate an error. There must be at least two spaces, or a tab, between the amount and the account. If you do not have adequate separation between the amount and the account Ledger will give an error and stop calculating. Next: Structuring your Accounts, Previous: The Most Basic Entry, Up: Keeping a Journal [Contents][Index] 4.2 Starting up Unless you have recently arrived from another planet, you alread




Here is the Pacific Bell example from above, given as a Ledger posting, with the addition of a check number:

9/29 (1023) Pacific Bell Expenses:Utilities:Phone $23.00 Assets:Checking $-23.00

As you can see, it is very similar to what would be written on paper, minus the computed balance totals, and adding in account names that work better with Ledger’s scheme of things. In fact, since Ledger is smart about many things, you don’t need to specify the balanced amount, if it is the same as the first line:

9/29 (1023) Pacific Bell Expenses:Utilities:Phone $23.00 Assets:Checking

For this transaction, Ledger will figure out that $-23.00 must come from ‘ Assets:Checking ’ in order to balance the transaction.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Ledger: Command-Line Accounting
Consistent Journal Format Converting from other formats Archiving Previous Years Next: Starting up, Previous: Keeping a Journal, Up: Keeping a Journal [Contents][Index] 4.1 The Most Basic Entry <span>Here is the Pacific Bell example from above, given as a Ledger posting, with the addition of a check number: 9/29 (1023) Pacific Bell Expenses:Utilities:Phone $23.00 Assets:Checking $-23.00 As you can see, it is very similar to what would be written on paper, minus the computed balance totals, and adding in account names that work better with Ledger’s scheme of things. In fact, since Ledger is smart about many things, you don’t need to specify the balanced amount, if it is the same as the first line: 9/29 (1023) Pacific Bell Expenses:Utilities:Phone $23.00 Assets:Checking For this transaction, Ledger will figure out that $-23.00 must come from ‘Assets:Checking’ in order to balance the transaction. Also note the structure of the account entries. There is an implied hierarchy established by separating with colons (see Structuring your Accounts). The format is very flexible and it i




statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unicode 8.0.0
herokee syllables, forming case pairs with the existing Cherokee characters A large collection of CJK unified ideographs Emoji symbols and symbol modifiers for implementing skin tone diversity; <span>see Unicode Emoji. Georgian lari currency symbol Letters to support the Ik language in Uganda, Kulango in the Côte d’Ivoire, and other languages of Africa The Ahom script for support of the Tai Ahom lang




Two other important Unicode specifications are maintained in synchrony with the Unicode Standard, and include updates for the repertoire additions made in Version 8.0, as well as other modifications:

This version of the Unicode Standard is synchronized with ISO/IEC 10646:2014, plus Amendment 1. Additionally, it includes the accelerated publication of U+20BE LARI SIGN, nine CJK unified ideographs (U+9FCD..U+9FD5), and 41 emoji characters.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unicode 8.0.0
s to support Arwi—the Tamil language written in the Arabic script Other important updates in Unicode Version 8.0 include: Change in encoding model of New Tai Lue to visual order Synchronization <span>Two other important Unicode specifications are maintained in synchrony with the Unicode Standard, and include updates for the repertoire additions made in Version 8.0, as well as other modifications: UTS #10, Unicode Collation Algorithm UTS #46, Unicode IDNA Compatibility Processing This version of the Unicode Standard is synchronized with ISO/IEC 10646:2014, plus Amendment 1. Additionally, it includes the accelerated publication of U+20BE LARI SIGN, nine CJK unified ideographs (U+9FCD..U+9FD5), and 41 emoji characters. See Sections D through H below for additional details regarding the changes in this version of the Unicode Standard, its associated annexes, and the other synchronized Unicode specifica




Version 8.0 of the Unicode Standard consists of the core specification (download), the delta and archival code charts for this version, the Unicode Standard Annexes, and the Unicode Character Database (UCD).
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unicode 8.0.0
gh H below for additional details regarding the changes in this version of the Unicode Standard, its associated annexes, and the other synchronized Unicode specifications. B. Technical Overview <span>Version 8.0 of the Unicode Standard consists of the core specification (download), the delta and archival code charts for this version, the Unicode Standard Annexes, and the Unicode Character Database (UCD). The core specification gives the general principles, requirements for conformance, and guidelines for implementers. The code charts show representative glyphs for all the Unicode charac




The core specification gives the general principles, requirements for conformance, and guidelines for implementers. The code charts show representative glyphs for all the Unicode characters. The Unicode Standard Annexes supply detailed normative information about particular aspects of the standard. The Unicode Character Database supplies normative and informative data for implementers to allow them to implement the Unicode Standard.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unicode 8.0.0
the Unicode Standard consists of the core specification (download), the delta and archival code charts for this version, the Unicode Standard Annexes, and the Unicode Character Database (UCD). <span>The core specification gives the general principles, requirements for conformance, and guidelines for implementers. The code charts show representative glyphs for all the Unicode characters. The Unicode Standard Annexes supply detailed normative information about particular aspects of the standard. The Unicode Character Database supplies normative and informative data for implementers to allow them to implement the Unicode Standard. A complete specification of the contributory files for Unicode 8.0 is found on the page Components for 8.0.0. That page also provides the recommended reference format for Unicode Standa




A complete specification of the contributory files for Unicode 8.0 is found on the page Components for 8.0.0. That page also provides the recommended reference format for Unicode Standard Annexes. For examples of how to cite particular portions of the Unicode Standard, see also the Reference Examples.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Unicode 8.0.0
ve information about particular aspects of the standard. The Unicode Character Database supplies normative and informative data for implementers to allow them to implement the Unicode Standard. <span>A complete specification of the contributory files for Unicode 8.0 is found on the page Components for 8.0.0. That page also provides the recommended reference format for Unicode Standard Annexes. For examples of how to cite particular portions of the Unicode Standard, see also the Reference Examples. The navigation bar on the left of this page provides links to both the core specification as a single file, as well as to individual chapters, and the appendices. Also provided are link




These APIs are only used on the server at the top level of your app to generate the initial HTML. A framework may call them for you. Most of your components don’t need to import or use them.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Server React DOM APIs – React
APIs GET INVOLVED React Community STAY INFORMED React Blog Is this page useful? React Docs Server React DOM APIs The react-dom/server APIs let you render React components to HTML on the server. <span>These APIs are only used on the server at the top level of your app to generate the initial HTML. A framework may call them for you. Most of your components don’t need to import or use them. Server APIs for Node.js Streams These methods are only available in the environments with Node.js Streams: renderToPipeableStream renders a React tree to a pipeable Node.js Stream. rend




Server APIs for Node.js Streams

These methods are only available in the environments with Node.js Streams:

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Server React DOM APIs – React
r. These APIs are only used on the server at the top level of your app to generate the initial HTML. A framework may call them for you. Most of your components don’t need to import or use them. <span>Server APIs for Node.js Streams These methods are only available in the environments with Node.js Streams: renderToPipeableStream renders a React tree to a pipeable Node.js Stream. renderToStaticNodeStream renders a non-interactive React tree to a Node.js Readable Stream. Server APIs for Web Streams These methods are only available in the environments with Web Streams, which includes browsers, Deno, and some modern edge runtimes: renderToReadableStream r




Server APIs for Web Streams

These methods are only available in the environments with Web Streams, which includes browsers, Deno, and some modern edge runtimes:

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Server React DOM APIs – React
ments with Node.js Streams: renderToPipeableStream renders a React tree to a pipeable Node.js Stream. renderToStaticNodeStream renders a non-interactive React tree to a Node.js Readable Stream. <span>Server APIs for Web Streams These methods are only available in the environments with Web Streams, which includes browsers, Deno, and some modern edge runtimes: renderToReadableStream renders a React tree to a Readable Web Stream. Server APIs for non-streaming environments These methods can be used in the environments that don’t support streams: renderToString renders a React tree to a string. renderToStaticMarku




Server APIs for non-streaming environments

These methods can be used in the environments that don’t support streams:

They have limited functionality compared to the streaming APIs.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Server React DOM APIs – React
hods are only available in the environments with Web Streams, which includes browsers, Deno, and some modern edge runtimes: renderToReadableStream renders a React tree to a Readable Web Stream. <span>Server APIs for non-streaming environments These methods can be used in the environments that don’t support streams: renderToString renders a React tree to a string. renderToStaticMarkup renders a non-interactive React tree to a string. They have limited functionality compared to the streaming APIs. Deprecated server APIs Deprecated These APIs will be removed in a future major version of React. renderToNodeStream renders a React tree to a Node.js Readable stream. (Deprecated.) How




renderToNodeStream renders a React tree to a Node.js Readable stream. (Deprecated.)
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Server React DOM APIs – React
eractive React tree to a string. They have limited functionality compared to the streaming APIs. Deprecated server APIs Deprecated These APIs will be removed in a future major version of React. <span>renderToNodeStream renders a React tree to a Node.js Readable stream. (Deprecated.) How do you like these docs? Take our survey! ©2023 Learn React Quick Start Installation Describing the UI Adding Interactivity Managing State Escape Hatches API Reference React APIs Rea




Pgx (whole page)
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pgx package - gopkg.in/jackc/pgx.v2 - Go Packages
yte(b) (wb) WriteBytes(b) (wb) WriteCString(s) (wb) WriteInt16(n) (wb) WriteInt32(n) (wb) WriteInt64(n) (wb) WriteUint16(n) (wb) WriteUint32(n) type Xid Source Files Directories README README ¶ <span>Pgx Pgx is a pure Go database connection library designed specifically for PostgreSQL. Pgx is different from other drivers such as pq because, while it can operate as a database/sql compati




线积分计算的思路
线积分计算的思路主要是:将矢量函数\(\mathbf{F}(\mathbf{r})\)通过路径曲线\(C\)参数化得到的\(\mathbf{r}(t)\)转化成标量函数\(f(t)\),此时原线积分即可转化为普通的标量积分。例如假设\(\mathbf{F}(\mathbf{r})\)是一个空间中的电场,\(C\)是质点在电场中的路径曲线,则原线积分相当于在计算质点在电场\(\mathbf{F}(\mathbf{r})\)中沿路径\(C\)行进时做的功之和,而转化后的标量积分相当于从质点的角度在时域中计算,求得每一时刻\(t\)质点做的功,最后计算总功。
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




Flashcard 7607853911308

Question
线积分计算的思路主要是:[...]
Answer
将矢量函数\(\mathbf{F}(\mathbf{r})\)通过路径曲线\(C\)参数化得到的\(\mathbf{r}(t)\)转化成标量函数\(f(t)\),此时原线积分即可转化为普通的标量积分。例如假设\(\mathbf{F}(\mathbf{r})\)是一个空间中的电场,\(C\)是质点在电场中的路径曲线,则原线积分相当于在计算质点在电场\(\mathbf{F}(\mathbf{r})\)中沿路径\(C\)行进时做的功之和,而转化后的标量积分相当于从质点的角度在时域中计算,求得每一时刻\(t\)质点做的功,最后计算总功。

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

线积分计算的思路
线积分计算的思路主要是:将矢量函数\(\mathbf{F}(\mathbf{r})\)通过路径曲线\(C\)参数化得到的\(\mathbf{r}(t)\)转化成标量函数\(f(t)\),此时原线积分即可转化为普通的标量积分。例如假设\(\mathbf{F}(\mathbf{r})\)是一个空间中的电场,\(C\)是质点在电场中的路径曲线,则原线积分相当于在计算质点在电场\(\mathbf{F}(\mathbf{r})\)中沿路径\(C\)行进时做的功之和,而转化后的标量积分相当于从质点的角度在时域中计算,求得每一时刻\(t\)质点做的功,最后计算总功。







Prettier is an opinionated code formatter with support for:

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

What is Prettier? · Prettier
guring Prettier Options Configuration File Editors Editor Integration WebStorm Setup Vim Setup Watching For Changes Misc Technical Details Related Projects For Enterprise Edit What is Prettier? <span>Prettier is an opinionated code formatter with support for: JavaScript (including experimental features) JSX Angular Vue Flow TypeScript CSS, Less, and SCSS HTML Ember/Handlebars JSON GraphQL Markdown, including GFM and MDX v1 YAML It removes all original styling* and ensures that all outputted code conforms to a consistent style. (See this blog post) Prettier takes your code and reprints it from scratch by taking




See this blog post
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

What is Prettier? · Prettier
, Less, and SCSS HTML Ember/Handlebars JSON GraphQL Markdown, including GFM and MDX v1 YAML It removes all original styling* and ensures that all outputted code conforms to a consistent style. (<span>See this blog post) Prettier takes your code and reprints it from scratch by taking the line length into account. For example, take the following code: foo(arg1, arg2, arg3, arg4); It fits in a single lin




Prettier enforces a consistent code style (i.e. code formatting that won’t affect the AST) across your entire codebase because it disregards the original styling* by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length into account, wrapping code when necessary.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

What is Prettier? · Prettier
s too long. Prettier is going to do the painstaking work of reprinting it like that for you: foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne(), ); <span>Prettier enforces a consistent code style (i.e. code formatting that won’t affect the AST) across your entire codebase because it disregards the original styling* by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length into account, wrapping code when necessary. If you want to learn more, these two conference talks are great introductions: Footnotes * Well actually, some original styling is preserved when practical—see empty lines and multi-lin




#has-images

If you want to learn more, these two conference talks are great introductions:

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

What is Prettier? · Prettier
se because it disregards the original styling* by parsing it away and re-printing the parsed AST with its own rules that take the maximum line length into account, wrapping code when necessary. <span>If you want to learn more, these two conference talks are great introductions: Footnotes * Well actually, some original styling is preserved when practical—see empty lines and multi-line objects. Why Prettier? → Docs AboutUsage Community User ShowcaseStack Overflo




#has-images

Footnotes

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

What is Prettier? · Prettier
g the parsed AST with its own rules that take the maximum line length into account, wrapping code when necessary. If you want to learn more, these two conference talks are great introductions: <span>Footnotes * Well actually, some original styling is preserved when practical—see empty lines and multi-line objects. Why Prettier? → Docs AboutUsage Community User ShowcaseStack Overflow@Prettier




Well actually, some original styling is preserved when practical—see empty lines and multi-line objects.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

What is Prettier? · Prettier
d AST with its own rules that take the maximum line length into account, wrapping code when necessary. If you want to learn more, these two conference talks are great introductions: Footnotes * <span>Well actually, some original styling is preserved when practical—see empty lines and multi-line objects. Why Prettier? → Docs AboutUsage Community User ShowcaseStack Overflow@PrettierCode on Twitter More BlogGitHubIssues <span>




By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Why Prettier? · Prettier
tion File Editors Editor Integration WebStorm Setup Vim Setup Watching For Changes Misc Technical Details Related Projects For Enterprise Edit Why Prettier? Building and enforcing a style guide <span>By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles. It is generally accepted that having a common style guide is valuable for a project and team but getting there is a very painful and unrewarding process. People get very emotional around particular ways of writing code and nobody likes spending time writing and receiving nits. So why choose the “Prettier style guide” over any other random style guide? Because Prettier is the only “style guide” that is fully automatic. Even if Prettier does not format all code