Top 3 Levels Items
Balance Sheet
|
|
Income Statement
Cash Flow
EPS and WASO
Love Coding, Love Money
|
|
Income Statement
Cash Flow
EPS and WASO
https://en.wikipedia.org/wiki/Financial_ratio
Current Ratio
流动比率、营运资金比率。它表明企业流动负债有多少流动资产作为其支付保障,是衡量企业流动资产可以变为现金用于偿还其流动负债的能力。是衡量企业短期风险的指标。
Formula: Total Current Assets / Total Current Liabilities
Total Current Assets (IFBS000470): 流动资金\
Total Current Liabilities (IFBS000500): 短期债务、流动负债。流动负债主要包括短期借款、应付票据、应付账款、预收账款、应付工资、应付福利费、应付股利、应交税金、其他暂收应付款项、预提费用和一年内到期的长期借款等。
Quick Ratio
速动比率。是指速动资产对流动负债的比率。它是衡量企业流动资产中可以立即变现用于偿还流动负债的能力。流动资产中扣除存货,是因为存货在流动资产中变现速度较慢,有些存货可能滞销,无法变现。即Total Current Assets (IFBS000470)中的两项,IFBS000350和IFBS200660。
Formula: (Cash, Cash Equivalents, and Short Term Investments + Trade and Other Receivables, Current) / Total Current Liabilities
Cash, Cash Equivalents, and Short Term Investments (IFBS000350): 现金、现金等价物和短期投资\
Trade and Other Receivables, Current (IFBS200660): 交易和其他应收款 (Current是什么意思?)\
Total Current Liabilities (IFBS000500): 短期债务、流动负债。流动负债主要包括短期借款、应付票据、应付账款、预收账款、应付工资、应付福利费、应付股利、应交税金、其他暂收应付款项、预提费用和一年内到期的长期借款等。
Cash Ratio
现金比率、流动资产比率。是指企业现金与流动负债的比率,反映企业的即刻变现能力,这里所说的现金,是指现金及现金等价物,这项比率可显示企业立即偿还到期债务的能力。反映出公司在不依靠存货销售及应收款的情况下, 支付当前债务的能力。
Formula: Cash, Cash Equivalents, and Short Term Investments / Total Current Liabilities
Cash, Cash Equivalents, and Short Term Investments (IFBS000350): 现金、现金等价物和短期投资\
Total Current Liabilities (IFBS000500): 短期债务、流动负债。流动负债主要包括短期借款、应付票据、应付账款、预收账款、应付工资、应付福利费、应付股利、应交税金、其他暂收应付款项、预提费用和一年内到期的长期借款等。
Total Debt to Total Capital Ratio
Formula: Total Debt / Invested Capital
Invested Capital (IFBSZ00008): 投入资本(注册资本)。是指所有者在企业注册资本的范围内实际投入的资本,是指出资人作为资本实际投入企业的资金数额,进一步划分为资本金与资本公积。\
Total Debt (IFBSZ00006):
Long Term Debt to Capital Ratio
Formula: Long Term Debt and Capital Lease Obligation / (Total Equity + Long Term Debt and Capital Lease Obligation)
Long Term Debt and Capital Lease Obligation (IFBS002961): \
Total Equity (IFBS002220):
Long Term Debt to Assets Ratio
Formula: Long Term Debt and Capital Lease Obligation / Total Assets
Financial Leverage
Formula: Total Assets / Total Equity
FCF to Debt
Formula: Free Cash Flow / Average Total Debt \
Average Total Debt = (Current Total Debt - Previous Total Debt) / 2
The Free Cash Flow should has the same period length as Current - Previous.
Debt to Equity
Formula: Long Term Debt and Capital Lease Obligation / Total Equity
Debt To Assets
Formula: Total Debt / Total Assets
Cash Flow to Debt
Formula: Cash Flow from Operating Activities Used in Calculations / Average Total Debt
Normalized Dividend Payout Ratio
Formula:
Dividend Payout Ratio
Formula: Dividend Per Share used for calculations / EPS for Calculations
Retention Rate
Formula: 1 - Dividend Payout Ratio
Normalized Retention Rate
Formula: 1 - Normalized Dividend Payout Ratio
Total Debt to Equity Ratio
Formula: Total Debt / Total Equity
The working code is the most accurate document.
I think, as a developer, when working, here are 3 basic rules needs to follow:
The 1st one, it’s the very basic one. If code cannot work correctly, it’s useless. For the 2nd one, it’s a higher level request for the developer. When you coding, you should not only think how to write correct code, but also need to conside how to write high performance code, at least, not bad performance. To meet this rule, minimum, you should to know the common data structures, understand the algorithm complexity of the functions of those structures. And the last one, write readable code, it’s the hardest part, and it’s the most careless thing to developer. The code once has been written down, it doesn’t mean it won’t be changed any more. In the life cycle of the program, it could be 10 years or more, new requirements will be preposed continuously. That means the code needs to be changed. The creator may has left, someone new has to take over the job, or the creator has a long time not touch the code, he cannot remember every details. A terrible code will lead the job much more difficult.
To define a coding standard is hard. Everyone has their preferences. Here I just want to list some very common things, and somethings I really recommend.
It worths to spend some time to find out a name which can represent the exact meaning of the class, property, function or the variable. Don’t use abbreviation unless you sure it is very common for every reader. And don’t make the name too long, less than 30 characters should be fine.
A class represents an object, so the name of if should be a noun, and use Pascal case for the capitalizing the name, like AppDomain
.
A property also represent an object, so the name also should be a noun, like BackgroundColor
. It’s also use Pascal case. If the property represents a collection, should use plural form of the noun, like Items
.
A function represent an activity, should use verb or the first word is verb, like GetReader
. Or use To
as the prefix, like ToString
.
Field is similar with the property, but for the protected instance filed should use Camel case, like connectionString
. The public
, internal
, static
fields should follow the Pascal case.
Variable or parameter also should be noun. But it should use Camel case. For the very simple functions, variables named as x
, a
, or other single character is acceptable. And for the very simple loop, i
as the index variable name is acceptable too.
Namespace should use noun to name it too. And use Pascal case.
It’s not recommended to use in classes, public properties, and public functions. Unless the name is too long, or the abbreviation is well known. If the name only have a word, it can (not must) use upper case for every charaters, like ID
. If the name is composed of more than one words, for the abbreviation, only the first character can be upper case, like XmlReader
or HttpRequest
.
Exception
as the suffix. For other cases, like Reader
, Event
also should add them as the suffix.I
as the prefix.int.TryParse
function, if you want to implement your own functions like this, please follow the same way, so that others can easy to know what it is and how to use it.A well formatted article is more earier to be understund than bad one. For reading code it works just the same.
Tab or space, it’s a perpetual topic for developers. And there are more, Vim or EMacs, {
in a new line or not, etc. Most of them are just personal preference, can’t say which one is really better then another. For the tab or space is the same, but I prefer the space. The reason is tab could be presented differently in different editors.
this.
In some coding standards recommend do not write this.
, but I suggest, do it. There is a benfit add this.
before the fields or properties is it could let you to distinguish between the variables and properties/fields in the function easier.
Add a column guideline, and set the value to 120. It could reminder you that the line is to long. It is a very bad experience to scroll horizontal scrollbar from time to time when reading code.
Please remove the empty lines when more than one.
Imagine this order.Status = 1
, what does ‘1’ mean? New order, or others? Or when you typing event.Type = "SoemthingDone"
, you could not realize there is a typo. Or if someone want to know what else values of order.Status
could be, how can he easy to find the anwser?
The first choose is Enum. It has better performance than string
type. And it supports FlagAttribute
, you can use bit operators on Enum types.
The second way is to define a static class, and define many constants.
Use Settings
class to instead of AppConfig
. To use AppConfig
, you
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
|
|
More info: Writing
|
|
More info: Server
|
|
More info: Generating
|
|
More info: Deployment
This tag plug-in allows you to use font awesome in the post.
Install
|
|
And then copy the fontawesome.js
to the theme folder you used, put it under the <your theme>/scripts/tags/
, like ./themes/Next/scripts/tags/
.
|
|
Add an new file, and doesn’t add to stage yet, git reset HEAD
won’t change anything.
|
|
If the file was added into stage, git reset HEAD
will make the file to the Untracked
status.
|
|
For the file which has been modified, if it hasn’t been added to stage, git reset HEAD
won’t change anything. If it has been added to stage, this command will change the file to unstage
status, but the changes won’t be lost.
--hard
argument will lead the uncommited changes lost, new files will become untracked
. BE CAREFUL!
|
|
reflog
command allows to check the commit history.
|
|
The file 3.txt
also comes back, that because it was added to the stage.
What if used reset --hard
command?
|
|
H1
H2
H3
H4
H5
H6
Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
Alt-H2
|
|
Emphasis, aka italics, with asterisks or underscores.
Strong emphasis, aka bold, with asterisks or underscores.
Combined emphasis with asterisks and underscores.
Strikethrough uses two tildes.Scratch this.
(In this example, leading and trailing spaces are shown with with dots: ⋅)
- First ordered list item
- Another item
- Unordered sub-list.
- Actual numbers don’t matter, just that it’s a number
- Ordered sub-list
And another item.
You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we’ll use three here to also align the raw Markdown).
To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅
Note that this line is separate, but within the same paragraph.⋅⋅
(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)
- Unordered list can use asterisks
- Or minuses
- Or pluses
There are two ways to create links.
I’m an inline-style link with title
[I’m a reference-style link][Arbitrary case-insensitive reference text]
I’m a relative reference to a repository file
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself].
URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or http://www.example.com and sometimes
example.com (but not on Github, for example).Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com
Here’s our logo (hover to see the title text):
Inline-style:
Reference-style:
Code blocks are part of the Markdown spec, but syntax highlighting isn’t. However, many renderers – like Github’s and Markdown Here – support syntax highlighting. Which languages are supported and how those language names should be written will vary from renderer to renderer. Markdown Here supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the highlight.js demo page.
|
|
Inline
code
hasback-ticks around
it.
Blocks of code are either fenced by lines with three back-ticks ```, or are indented with four spaces. I recommend only using the fenced code blocks – they’re easier and only they support syntax highlighting.
12 var s = "JavaScript syntax highlighting";alert(s);
12 s = "Python syntax highlighting"print s
12 No language indicated, so no syntax highlighting.But let's throw in a <b>tag</b>.
|
|
|
|
|
|
Tables aren’t part of the core Markdown spec, but they are part of GFM and Markdown Here supports them. They are an easy way of adding tables to your email – a task that would otherwise require copy-pasting from another application.
Colons can be used to align columns.
Tables Are Cool col 3 is right-aligned $1600 col 2 is centered $12 zebra stripes are neat $1
There must be at least 3 dashes separating each header cell.
The outer pipes (|) are optional, and you don’t need to make the
raw Markdown line up prettily. You can also use inline Markdown.
Markdown Less Pretty Still renders
nicely 1 2 3
Colons can be used to align columns.
|
|
Blockquotes are very handy in email to emulate reply text.
This line is part of the same quote.Quote break.
This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing
You can also use raw HTML in your Markdown, and it’ll mostly work pretty well.
- Definition list
- Is something people use sometimes.
- Markdown in HTML
- Does not work very well. Use HTML tags.
|
|
Three or more…
Hyphens
Asterisks
Underscores
My basic recommendation for learning how line breaks work is to experiment and discover – hit
Here are some things to try out:
Here’s a line for us to start with.
This line is separated from the one above by two newlines, so it will be a separate paragraph.
This line is also a separate paragraph, but…
This line is only separated by a single newline, so it’s a separate line in the same paragraph.
They can’t be added directly but you can add an image with a link to the video like this:
Or, in pure Markdown, but losing the image sizing and border:
The pwd
command is short for print working directory. It displays the directory of your current location.
The cd
allows you to enter an new directory.
Syntax | Explanation |
---|---|
cd | navigate to home directory |
cd ~ | navigate to home directory |
cd .. | navigate backwards to parent directory |
cd - | navigate to previous working directory |
cd Directory1 | navigate to directory named Directory1 |
cd Directory1/Directory2 | navigate to directory, Directory2, through path |
Shortcuts | Description |
---|---|
Ctrl + A | Move cursor to beginning of line |
Ctrl + E | Move cursor to end of line |
Ctrl + R | Search bash history |
Ctrl + W | Cut the last word |
Ctrl + U | Cut everything before the cursor |
Ctrl + K | Cut everything after the cursor |
Ctrl + Y | Paste the last thing to be cut |
Ctrl + _ | Undo |
Ctrl + L | Clears terminal screen |
The man
command shows the command manuals.
For example, the following command shows the help infomation of the cat
.
The echo
command prints its arguments to standard output.
If you call echo
without any parameters, the command prints a new line.
The head
command reads the first 10 lines of any passed in text and prints its contents to standard output.
You can change the default 10 lines to any number by manually passing in the desired size.
For example, the following prints all 50 lines of the file.
The tail
command reads the last 10 lines of any passed in text and prints its contents to standard output.
You can change the default 10 lines to any number by manually passing in the desired size.
For example, the following prints all 50 lines of the file.
You can also view in real time any text appended to the file with the -f
flag.
The less
command gives you a way to navigate through a passed file or block of text. Unlike the more
command, less allows you to move backward through the file as well.
Common less keyboard shortcuts | Description |
---|---|
G |
Moves to end of file |
g |
Moves to beginning of file |
:50 |
Moves to the 50th line of the file |
q |
Exits less |
/searchterm |
Searches for any string matching ‘searchterm’ below the current line |
/ |
Moves you to the next match for your previous ‘searchterm’ below the current line |
?searchterm |
Searches for any string matching ‘searchterm’ above the current line |
? |
Moves you to the next match for your previous ‘searchterm’ above the current line |
up |
Moves up a line |
down |
Moves down a line |
pageup |
Moves up a page |
pagedown |
Moves down a page |
The true
command always returns the exit status zero to indicate success.
The false
command always returns the exit status non-zero to indicate failure.
$?
$?
is a variable that will return the exit code of the last command you ran.
The grep
command is a search function.
Passing a string and a file searches the file for the given string and prints the occurrences to standard output.
grep
can take multiple files as parameters and regular expressions to specify a pattern in text.
Common flags | Description |
---|---|
-i |
remove case sensitivity |
-r |
search recursively through directories |
-w |
search only whole words |
-c |
prints number of times found |
-n |
prints line found on with phrase |
-v |
prints invert match |
The sed
command is a stream editor that performs text transformations on an input.
Common use of this command is to replace expressions which takes the form s/regexp/replacement/g
For example, the following replaces all occurrences of the phrase “Hello” with “Hi”.
The history
command prints out an incremented command line history.
It is common to use the grep
command with the history
command in order to search for a particular command.
For example, the following searches your history for all occurrences of the string g++
.
The export
command sets an environment variable to be passed to child processes in the environment.
For example, the following exports the variable “name” with the value “student”.
The ps
command, short for process status, prints out information about the processes running.
There are four items displayed:
The awk
command finds and replaces text by searching through files for lines that have a pattern.
Syntax: awk 'pattern {action}' test.txt
The wget
command downloads files from the web and stores it in the current working directory.
The nc
command, short for netcat, is a utility used to debug and investigate the network.
See nc tutorial
The ping
command tests a network connection.
The statistics at the end show an overview of how many connections went through before we called ^C
and how long it took.
Git
is a version control system that is commonly used in the industry and in open source projects.
See git tutorial
Environment variables are named variables that contain values used by one or more applications.
The PATH
variable contains a list of directories where systems look for executable files.
The HOME
variable contains the path to the home directory of the current user.
The PS1
variable is the default prompt to control appearances of the command prompt.
Connectors allow you to run multiple commands at once.
Connector | Description | ||
---|---|---|---|
&& |
first command always executes and the next command will only execute if the one before it succeeds | ||
` | ` | first command always executes and the next command will only execute if the one before it fails | |
; |
first command and the following commands always execute |
|
|
Pipes connect multiple commands together by sending the stdout of the first command to the stdin of the next command.
For example, the following sends the ls
output to head
so that only the top 10 items get printed.
Standard output redirection uses the symbols >
and >>
.
For example, the following sends the output of ls
into the file instead of printing to the screen.
If the file isn’t already in your working directory, the file gets created.
If the file already exists, then the contents of the command overwrites what is already in the file.
To avoid overwriting a file, the >>
command appends to the end of the file instead.
Standard input redirection uses the symbol <
.
For example, the following causes sort
to access its input from the file instead of the keyboard.
The sort
command prints the contents of the file and prints to the screen because we haven’t redirected its output.
But we can combine I/O redirection into one command line, such as:
Adding a &
with the >
symbol results in redirecting both standard out and standard error.
For example, the test.cpp
file prints the string “stdout” with cout
and the string “stderr” with cerr
.
The >
symbol alone only redirects standard output.
If you only want to redirect a specific file descriptor you can attach the file descriptor number to >
.
Name | File Descriptor | Description |
---|---|---|
stdin | 0 | standard input stream |
stdout | 1 | standard output stream |
stderr | 2 | standard error output stream |
For example, if I only wanted to redirect “stderr” to the file test.txt
from the above example, I would do the following:
The command ls -l
prints out a lot of information about each file that is informative about the permissions.
Output from example above | Description/Possible Outputs |
---|---|
- | File type: - = regular file d = directory |
rw- | Permissions for owner of file |
rw- | Permissions for members of the group owning the file |
r– | Permissions for all other users |
user | name of user owning the file |
group | name of group owning the file |
The chmod
command, short for change mode, changes the permissions of a file.
There is a combination of letters that need to be known in order to change specific users’ permission.
Letter | User |
---|---|
u | User who owns it |
g | Users in the group |
o | Other users not in the group |
a | All users |
You call chmod
by describing which actions you want to perform and to which file.
The -
symbol represents taking away permissions while the +
symbol represents adding permissions.
The following example makes the file readable and writable to the user who owns it and the group.
Alternatively, we can use chmod
with hex numbers.
You can think of each permission setting as a bit where it is a 1
if there is permission for the file and 0
otherwise.
Each set of permissions represents a single digit so the following commands have the same outcome as above.
This blog is powered by Hexo, and hosted on GitHub, and is wrote in Bash on Windows. Amazing, right? :)
Love it!