@startuml
[*] -> ready : start;
ready -> running : get cpu;
running -> ready : lost cpu;
running -down -> block : io, sleep, locked;
block -up -> ready : io return, sleep over, get lock;
running -> [*] : complete;
@enduml
@startuml
a --> b : how are you;
note right : greeting;
a -> a : i am thinking;
b -> a : fine;
@enduml
@startuml
actor customer
actor chef
rectangle restaurant {
customer --> (eat food )
customer --> (pay for food )
chef --> (cook food )
}
@enduml
sequenceDiagram
participant 张三
participant 李四
张三-> +王五: 王五你好吗?
loop 健康检查
王五->王五: 与疾病战斗
end
Note right of 王五: 合理 食物 <br/>看医生...
李四-->>张三: 很好!
王五-> -李四: 你怎么样?
李四--> 王五: 很好!
Loading
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
Loading
@startjson
#highlight "lastName"
#highlight "address" / "city"
#highlight "phoneNumbers" / "0" / "number"
{
"firstName" : "John" ,
"lastName" : "Smith" ,
"isAlive" : true ,
"age" : 28 ,
"address" : {
"streetAddress" : "21 2nd Street" ,
"city" : "New York" ,
"state" : "NY" ,
"postalCode" : "10021-3100"
},
"phoneNumbers" : [
{
"type" : "home" ,
"number" : "212 555-1234"
},
{
"type" : "office" ,
"number" : "646 555-4567"
}
],
"children" : [],
"spouse" : null
}
@endjson
sequenceDiagram
participant Alice
participant John
rect rgb(191, 223, 255)
note right of Alice: Alice calls John.
Alice->>+John: Hello John, how are you?
rect rgb(200, 150, 255)
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
end
John-->>-Alice: I feel great!
end
Alice ->>+ John: Did you want to go to the game tonight?
John -->>- Alice: Yeah! See you there.
Loading
@startuml
scale 350 width
[*] --> NotShooting
state NotShooting {
[*] --> Idle
Idle --> Configuring : EvConfig
Configuring --> Idle : EvConfig
}
state Configuring {
[*] --> NewValueSelection
NewValueSelection --> NewValuePreview : EvNewValue
NewValuePreview --> NewValueSelection : EvNewValueRejected
NewValuePreview --> NewValueSelection : EvNewValueSaved
state NewValuePreview {
State1 -> State2
}
}
@enduml