| |

VerySource

 Forgot password?
 Register
Search
Author: deathking

Which expert can solve it ????

[Copy link]

0

Threads

38

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-3-17 13:30:01
| Show all posts
Experts can only help you solve technical problems, but logical problems must be carefully considered by yourself ~
Reply

Use magic Report

0

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-3-26 16:45:01
| Show all posts
This kind of thing is the need to do a good job. There should be no problems in the program. Write the requirements first, make uml diagrams, and then program it. It's much better. The day is wrong, but it is troublesome.
======================================================= =================================
Funny, what UML does.
Is it necessary? For such an example, is it necessary to top it down?
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-27 22:45:01
| Show all posts
I have it ready.
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-28 09:30:01
| Show all posts
Give you a data storage example:

; This configuration file is used to save the date classification setting data for one year.
[SETUP]

; Lunar leap year sign
EMBOLISM = 0

Number of categories
TYPE_COUNT = 5

TYPE_0_ID = 0
TYPE_0_NAME = Normal
TYPE_0_REMARK = dates other than type

TYPE_1_ID = 1
TYPE_1_NAME = Public Holiday
TYPE_1_REMARK = Saturday and Sunday other than

TYPE_2_ID = 2
TYPE_2_NAME = legal holiday
TYPE_2_REMARK = New Year's Day, Chinese New Year, Labor Day, etc.

TYPE_3_ID = 3
TYPE_3_NAME = special holiday
TYPE_3_REMARK = Regional Holiday

TYPE_4_ID = 4
TYPE_4_NAME = other types
TYPE_4_REMARK = Holidays set by the company

; Legal holiday data, format: month / day comma is the separator and dash is the interval.
TYPE_2_DAY_COUNT = 3
TYPE_2_DAY_0_DAY = 1/1
TYPE_2_DAY_1_DAY = 5 / 1-5 / 3
TYPE_2_DAY_2_DAY = 10 / 01-10 / 03
TYPE_2_DAY_0_NAME = New Year's Day
TYPE_2_DAY_1_NAME = Labor Day
TYPE_2_DAY_2_NAME = National Day


[DEFAULT]

COUNT = 11


DEFAULT_0_ID = 2
DEFAULT_0_DAY = 5 / 1-5 / 3
DEFAULT_0_NAME = Labor Day

DEFAULT_1_ID = 2
DEFAULT_1_DAY = 10 / 1-10 / 3
DEFAULT_1_NAME = National Day

DEFAULT_2_ID = 2
DEFAULT_2_DAY = 6/1
DEFAULT_2_NAME = Children's Day

DEFAULT_3_ID = 2
DEFAULT_3_DAY = 3/8
DEFAULT_3_NAME = Women's Day

DEFAULT_4_ID = 3
DEFAULT_4_DAY = 2/14
DEFAULT_4_NAME = Valentine's Day

DEFAULT_5_ID = 2
DEFAULT_5_DAY = 1/1
DEFAULT_5_NAME = New Year's Day

DEFAULT_6_ID = 2
DEFAULT_6_DAY = 1 / 1-1 / 3
DEFAULT_6_NAME = Chinese New Year
; Date calendar type, 0 = Gregorian calendar, 1 = Lunar calendar
DEFAULT_6_DAYTYPE = 1


DEFAULT_7_ID = 2
DEFAULT_7_DAY = 8/15
DEFAULT_7_NAME = Mid-Autumn Festival
; Date calendar type, 0 = Gregorian calendar, 1 = Lunar calendar
DEFAULT_7_DAYTYPE = 1


DEFAULT_8_ID = 2
DEFAULT_8_DAY = 1/15
DEFAULT_8_NAME = Lantern Festival
; Date calendar type, 0 = Gregorian calendar, 1 = Lunar calendar
DEFAULT_8_DAYTYPE = 1

DEFAULT_9_ID = 2
DEFAULT_9_DAY = 7/7
DEFAULT_9_NAME = Star Festival
; Date calendar type, 0 = Gregorian calendar, 1 = Lunar calendar
DEFAULT_9_DAYTYPE = 1


DEFAULT_10_ID = 2
DEFAULT_10_DAY = 7/17
DEFAULT_10_NAME = Ghost Festival
; Date calendar type, 0 = Gregorian calendar, 1 = Lunar calendar
DEFAULT_10_DAYTYPE = 1
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-28 13:15:01
| Show all posts
Categories have levels. General <Public Holidays <Legal Holidays <Special Holidays <Others.
Reply

Use magic Report

0

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-4-8 20:45:01
| Show all posts
Master
Reply

Use magic Report

1

Threads

23

Posts

15.00

Credits

Newbie

Rank: 1

Credits
15.00

 China

Post time: 2020-4-10 12:30:01
| Show all posts
Whether it is Sunday or not, the first day to the eighth day are holidays
Reply

Use magic Report

2

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-11 14:15:01
| Show all posts
Haha, good idea, I will make one too!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-12 16:00:02
| Show all posts
Build a watch to put all the holidays for the next ten years. Play it
Reply

Use magic Report

0

Threads

8

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-4-13 12:30:01
| Show all posts
Our original way of doing projects was to build a table for storing dates, and save many days in the future (or before) into the table. This table can add many other fields for other purposes. Holidays can be realized, and there is no problem with custom holidays
The landlord can try
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list