2.1.1 Search To be determined Like Important
2.1.2 Life in Chinese To be determined Urgent
2.1.3 Articles/Data in English To be determined Important
2.1.4 Articles/Data in Chinese To be determined Important
2.1.5 Study in English Need supplementary
2.1.6 Study in Chinese Need supplementary Important
2.1.7 Novels in Chinese Need supplementary Like
2.1.8 Entertainment in Chinese Need supplementary Like
2.2.1 My eyes
Radian: 84
Time |
Left eye |
RIght eye |
2020.8 |
300 |
350 |
2019.7 |
300 |
350 |
2018.5 |
300 |
350 |
2.2.2 My weight
Time |
Weight(kg) |
2020.7 |
53.7 |
2019.3 |
55.2 |
2018.6 |
54.5 |
2.2.3 My height
Time |
Height(cm) |
2020.7 |
164 |
2019.3 |
165 |
2018.6 |
164 |
2.2.4 My menstruation
Year/Month |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
2021 |
2,30 |
|
2 |
|
|
|
|
|
|
|
|
|
2020 |
28 |
27 |
23 |
21 |
19 |
|
7,26 |
19 |
15 |
12 |
8 |
9 |
2019 |
10 |
7 |
7 |
2,30 |
26 |
25 |
23 |
17 |
14 |
12 |
19 |
26 |
2.2.5 My money
Time |
Total |
Bank A |
Bank B |
Bank C |
2020.1 |
300 |
100 |
100 |
100 |
2019.1 |
300 |
100 |
100 |
100 |
2018.1 |
300 |
100 |
100 |
100 |
2.3.1 Size of coat
Size |
Coat Length |
Shoulder |
Sleeve |
Chest |
Waist |
160/76A(0) |
69 |
37 |
80 |
88 |
86 |
160/84A(2) |
69 |
38 |
81 |
90 |
88 |
160/88A(4) |
70 |
39 |
82 |
93 |
91 |
165/88A(6) |
70 |
39 |
83 |
95 |
93 |
165/92A(8) |
71 |
40 |
83 |
98 |
96 |
165/96A(10) |
72 |
41 |
84 |
100 |
98 |
165/100A(12) |
73 |
42 |
84 |
104 |
102 |
170/100A(14) |
74 |
43 |
85 |
108 |
106 |
170/104A(16) |
75 |
43 |
86 |
112 |
110 |
2.4.1 Relative Important
Relationship |
Phone |
Email |
Address |
Birthday |
Comments |
papa |
123456789 |
123@aa.com |
Beautiful Island |
1960.1.1 |
|
mama |
123456789 |
123@aa.com |
Beautiful Island |
1961.3.1 |
|
sister |
123456789 |
123@aa.com |
Beautiful Island |
1984.3.8 |
|
2.4.2 Work
Relationship |
Name |
Phone |
Email |
Address |
Comments |
manager |
A |
123456789 |
123@aa.com |
Hidden Peak |
|
colleague |
B |
123456789 |
123@aa.com |
Hidden Peak |
|
colleague |
C |
123456789 |
123@aa.com |
Hidden Peak |
|
2.5.1 Coding Address To be determined
2.5.2 sftp to sourceforge (to upload large files)
C:\Users\mara>sftp mararsh@frs.sourceforge.net
Password:
Connected to mararsh@frs.sourceforge.net.
sftp> cd /home/frs/project/mara-mybox
sftp> ls
sftp> cd v6.4.2
sftp> lcd D:\releases\Mybox\2021-03-21-v6.4.2
sftp> put D:\releases\Mybox\2021-03-21-v6.4.2\MyBox-6.4.2-linux.tar.gz
Access the files: https://sourceforge.net/projects/mara-mybox/files/
2.5.3 sftp to sourceforge (to upload website files)
C:\Users\mara>sftp mararsh@frs.sourceforge.net
Password:
Connected to mararsh@frs.sourceforge.net.
sftp> cd /home/project-web/mara-mybox/htdocs
sftp> ls
sftp> lcd D:\GitHub\MyBox\docs
sftp> put *.*
Access the website: https://mara-mybox.sourceforge.io/index.html
2.5.4.1 Items in one sentence about javafx Need supplementary Like
- Always assume user knows nothing about programming.
- Do not expect user will open user guide. Someone, including me, even will not look at nor think about prompts on the screen.
- Necessary prompts can help user understand intention of the program.
- Ambiguous prompt is worse than no prompt.
- Always response for user, like pop information, make sound, or update interface.
- Provide most options and set default choice.
- Remember user’s inputs or seletions and fill in or set values automatically in next time.
- Less inputs or selections meanwhile keep interfaces clean.
- Use radio or check buttons instead of drop-down list if there is enough place in interface.
- No more than 3 levels to select.
- When too many controls in interface, consider popular layout: Left-right areas like curtain, vertical accordion menus, tabs to switch targets
- User’ screen resolution may be from 1k to 4k, so the design size of most MyBox interfaces is smaller than 1100 * 720.
- Make use of auto-wrap container like FlowPane, to work for both small screen and large screen.
- Controls can be updated only in JavaFx thread. Use Platform.runLater to change control when handle event in its listener.
- Progress should be shown when operation costs much time.
- Time-consume operation should not be run in JavaFx thread to avoid blocking interface.
- Backgournd task should always check whether task is canceled, especially in loop or before/after long-run statements.
- When listen mouse events, event.getX() and event.getY() return the coordinate of event.getSource() which is the control owns the events. Example, when listen on ImageView, the coordinate is related to the image.
- Iterative calls may happen when listen both onMouseEntered and onMouseExited and change focus in handling of the events(like pop menu) or change control’s size.
- When double click mouse, single-click event is tiggerred at first and then double-click event is triggerred. So need avoid duplicated or conflicted handlings against same event.
- For table's multiple selections, use getSelectedIndices() to listen changes, Some changes may be missed if use selectedItemProperty().
2.5.4.2.1 ChangeListener
input.textProperty().addListener(new ChangeListener() {
@Override
public void changed(ObservableValue observable, String oldValue, String newValue) {
checkInput();
}
});
2.5.4.2.2 setOnMouseClicked
control.setOnMouseClicked(new EventHandler() {
@Override
public void handle(MouseEvent event) {
controlPane();
}
});
2.5.4.2.3 disableProperty().bind
startButton.disableProperty().bind(
Bindings.isEmpty(targetPathInput.textProperty())
.or(targetPathInput.styleProperty().isEqualTo(badStyle))
.or(optionsValid.not())
);
2.5.5.1 Items in one sentence about java Need supplementary Like
- Always assume most extreme inputs and most weird operations.
- Assume user’ hardware configuration(CPU/memory/disk) is lower than average level.
- Use BufferedInputStream and BufferedOutputStream for file I/O.
- Use try-with-resource for file I/O.
- Always consider out of memory when read/write file or data.
- Notice charset when read/write text file.
- Notice charset when convert between bytes and string.
- Condition to determine whether reach end of file should be "len > 0". If use "len != -1", endless loop may happen if zero byte is read.
- Call "System.gc()" before delete/move/rename file, to avoid failure due to cache.
- When handle information in tree, like files system, endless loop should be avoided. If the operation will change source node, the target node should not be the source node nor its descendants.
- If delete list by indices, delete items from the end index to the start index.
- When class has many parameters, do not write many constructors to initialized different sets of parameters. Better coding is static creator and chain assignment by return “this” in all “set” methods.
- Anonymous class is very useful for scenario like lots of duplicated codes with only difference that several methods have difference implements.
- Generic is very useful for scenario like lots of duplicated codes with only differernce of data type.
- Define as less instance variables/methods as possible in class if it generates lots of instance.
- As less float-point calculations as possible in loop. If can, change float-point calculations as integer calculations.
- When listen data changing, need judge whether change trully happens, and avoid too frequently manufactures by setting minimum threshold of changing.
- Reboot application when change JVM parameters or need clean env in simple way.
- Notice whether the index is 0-based or 1-based, especially for thrid-party codes. 0-based is default. If 1-based, should write comment for it.
- Generally, index in user interface starts from 1, while index in codes data starts from 0.
- Generally, range(start-end) in user interface includes end, while range(start-end) in codes data excludes end.
- Double.MIN_VALUE is the minimum positive double(almost zero). -Double.MAX_VALUE is the minimum double.
- When handle money, store integer numbers for each unit.
- BigDecimal is much slower than double. Double is enough for most situations.
- To determine value's broken, write if (abs(x - 7.3) < TOLERANCE) instead of if (x == 7.3).
- Value of final static constant should be determined at compling time.
- When JDBC read numbers, if SQL value is null, ResultSet.getDouble/getFloat/getInt/getShort returns 0. Use ResultSet.getObject instead if need distinct zero and null. ResultSet.html#getDouble
- From Java18, Charset.defaultCharset() is always UTF-8. This will affect commands and results of ProcessBuilder. Process JDK-8266075