2014年2月25日 星期二

Message Sequence Diagram utility - QSDE

src:
http://sdedit.sourceforge.net/enter_text/index.html
http://sdedit.sourceforge.net/download/index.html

notes:


------

How to enter text

Use the text area at the bottom of the window to specify your objects and messages. The object section must be separated from the message section by an empty line.
Should there be a (syntax) error in your text, the first line where such an error occurs is highlighted. And there will be a description of the error at the bottom of the window.
'.' and ':' will not be interpreted as delimiters, if they are preceded by a '\'.

Objects

For each object you want to appear in your sequence diagram, type
<name>:<Type>[<flags>] "<label>"
      
or
/<name>:<Type>[<flags>] "<label>"
      
into the text area. This represents an instance of class <Type>, named <name> which will be shown as a lifeline. <name>. The [<flags>] and "<label>" parts are optional:
If you specify a quoted label, it will be used to label the object with, otherwise the object's label will be derived from the name and the type.

Invisible objects

If <name> is prefixed with a '/', the lifeline will be invisible until the instance is created by a 'new' message to <name> (see below).

Flags

An object declaration can be followed by a sequence of <flags> between square brackets. Four flags (a,p,r,x) are supported:

a-nonymous

The object is anonymous, so the name (which must still be there in order to be able to reference the lifeline) will not appear on the diagram, just a colon followed by the type. This flag is useless if a <label> is specified.

r-ole

The label of the lifeline will not be underlined.

p-rocess

The object behaves like an actor (see below), but it is represented by a box with a thick border, not by a figure.

e-external

(Only) a process can be declared to be external, which means that it represents an external entity with the ability to send "found" messages, but not appearing on the diagram. Messages originating from an external process are represented by arrows starting with filled circles.

x-auto-destruction

The object is destroyed when it has sent its last answer, denoted by a cross below its lifeline. One might interpret this as automatic destruction of non-persistent objects by a garbage collector.
There are other flags, relevant for multithreading .

Actors

If <Type> is 'Actor', the lifeline belongs to an actor. An actor is always active and sends asynchronous messages. It cannot send messages to itself. Also, it cannot receive answers (see below). In order to send an answer to an actor, one must use an explicit message.

Messages

The lines in the message section have the following format:
<caller>[<s>]:<answer>=<callee>[m].<message>
      
<caller> is the name of an object that has been declared in the object section. It is either the first one to send a message or has received a message before and not yet answered to it. Otherwise it is not active and cannot send a message.
[<s>] is optional and refines the specification of the caller object.
If <s> is a number, it denotes the 'level' of the caller: A caller may have received k messages to which it has yet to answer. Then <s> can range from 0 to k-1. Before <caller> sends the message, it will answer to the <s> most recent messages.
If <s> is not a number, it is a mnemonic. A mnemonic can be defined for a callee (by using the optional [<m>] part). If <s> is a mnemonic that has been defined for the object <caller> and <caller> is still active, <caller>[<s>] references this object.
<answer>= is optional and <answer> is simply a string representing the answer to the message. This string is used as a label of a dashed arrow from the <callee> to the <caller> lifeline. Note that there cannot be answers to messages sent by and to actors.
<callee>. is optional and <callee> denotes the object that receives the message represented by the string <message>, which is used as a label of an arrow from <caller> to <callee>. If no <callee> is specified, <message> is interpreted as an description of a simple action (not another invocation of a method/procedure) performed by the caller.
[<m>] is optional and <m> is a mnemonic containing at least one character that is not a digit. As long as the callee is active, it can be referenced as a caller by its name followed by [<m>].
<message> can consist of more than one line, separated by (a literal) \n.

Constructors

Messages that are named ' new ' or that start with ' new( ' are special messages. They can be sent only once to objects that were declared with a '/' before their names. On receiving a 'new' message, the object will be created and its lifeline will become visible.

Destructors

Messages that are named ' destroy ' or that start with ' destroy( ' are also special. They can only be sent to an object that is not active. After receiving the destroy-message, the object may become active for the last time and, for example, send some destroy messages to other objects. But after this last activity ended, the object is destroyed (denoted by a cross below its lifeline) and cannot be reclaimed.

Actor messages

Actors can only send and receive asynchronous messages that return immediately. An asynchronous message will be generated that is sent back to the actor when the activity that was started by his message is finished.
If an actor sends a message to an ordinary object, all activities will be finished before. An actor should typically send the first message of the diagram, but this is not necessary, sequences without even a single actor are still supported.

Broadcast messages

Annotations

Diagrams can be annotated in three different ways.

Source text comments

First, you may insert lines starting with a '#' in the textual description. These lines serve as comments and will not be interpreted, unless they start with '#!', which indicates an active comment.

Title

A line of the form
#![<title>]
          
specifies a diagram title. If it is present, the diagram will be surrounded by a frame, with the title written at the top left corner of the frame.

Description

A sequence of lines of the form
#!>>
#!A paragraph
#!of text describing
#!what is going on.
#!<<
is interpreted as text that will be written above the diagram.

Fragments

Second, a sequence of messages can be declared to be a fragment of the diagram. A fragment is represented by a frame surrounding those messages. It has a type (for example: alt, cond, or opt), appearing in the top-left corner, and a text, appearing in square brackets at the top of the frame. The text typically represents a condition. For example:
[c:<type> <text>]
  foo:bar.message_1
  foo:bar.message_2
  ...
  foo:bar.message_n
[/c]
Fragments can be slightly abused: if you write [c <text>] (without the colon), all of the text will appear in the small box in the top left corner.
Fragments may contain sections. To open a new section, insert a line of the form
--some text
The effect is that a dashed line is drawn from the left to the right end of the current fragment frame, with "some text" being written below this line.

Notes

Third, there are notes. These appear in a box resembling a piece of paper that is arranged to the right of a lifeline. Notes are a part of the message section. The top of the box is where an arrow belonging to a message specified at the same position in the text would appear. The syntax is similar to a here-document delimited by an asterisk followed by a number (without the <<).
*<num> <name>
multi-
line
note
*<num>
<name> is the name of the lifeline such that the note is to the right of it. <num> is the unique number identifying the note. You can refer to this number anywhere in the code - even before the note - in order to associate the note to messages or lifelines. For this you add one of the following prefixes to a message or the name of a lifeline:
  • (<num>). A line will be drawn from the note box with the number <num> to the message arrow or to the current vertical position of the lifeline.
  • (<num>,<anum>). This can only be the prefix of a message. The effect is the same as above, if <num> is not empty. Additionally, there will be a line drawn from the note box <anum> to the arrow belonging to the answer of the message
Example:
*5 foo
  foo calls bar's wait method
*5
*6 foo
  foo is waiting for bar
*6
*7 foo
  bar is ready
*7

(5,7)foo:ready=bar.wait()
(6)foo
  bar:do something
(6)foo
bar:do something more
        
If you use a "+" instead of a "*", the note box will consume as much vertical space as it needs and there will not be any message arrow or other note box beside it. When using "*", the note box will consume its own vertical space only if it is followed by a message arrow that is adjacent to one its both neighbour lifelines.
There are no direct associations between notes and objects. If one wishes to note something concerning an object or actor, she or he should specify a note belonging to the corresponding lifeline before any message has been specified.

Links

A single-lined note that starts with "link:" is interpreted as a link to another sequence diagram. The part of the line that follows is a URI (see RFC 3986 ) of an sd file. If the URI is relative, it is resolved against the location of the file of the current diagram. Example:
#BEGIN of file "a.sd"
a:A

*1 a
link:b.sd
*1 a
#END
          
#BEGIN of file "b.sd",
#located in the same directory as "a.sd"
b:B
#END
          
When the note in the "a.sd" diagram is clicked, "b.sd" will be opened.
There is a problem when the characters behind "link:" contain spaces. This is a bad URI syntax. Spaces must be replaced by "%20". Especially on Windows, where directory names with spaces are far from being exceptional - for instance "Program Files" - one may easily run into this problem when trying to specify absolute paths.
Those characters are interpreted as a URI for the sake of platform independence. This means that even on the Windows platform, "/" is to be used as a separator in a path to a file. Absolute path names should start with "file:/".

Automatic completion

When you have entered a (non-empty) prefix of a name of an object, you can press the TAB key (like in a UNIX shell) or Ctrl-Shift-Space (like in some IDEs) for completing the name automatically or for browsing through (via successive keystrokes) all object names with that prefix.
If there is whitespace or a delimiter (one of {'>', ':', '='}) to the left of the cursor, the TAB key will behave normally, so you can still use it for indentations.

Automatic redrawing

By default, a new diagram is generated from your text almost as soon as the text changes, even if this change in text would leave the diagram unchanged.
This is a suitable behaviour for a standalone PC that is reasonably well equipped. In some situtations, however, especially when Quick Sequence Diagram Editor acts as a remote X client, it can be a nuisance. So you may disable automatic redrawing in the preferences dialog. When it is disabled, only a syntax/semantic check is performed. To see a new diagram, you must click "Redraw" or type F5.
The time that passes between a change of text and a redrawing or a syntax/semantic check can also be adjusted in the configuration dialog (see "Redraw/syntax check delay"). It may be desirable to have two different delays (one for redrawing, one for the check), but this feature is not (yet?) implemented.

Preferences

There are some types of preferences, which can all be adjusted in the tabs of a single preferences dialog.
  • Global preferences: These preferences determine the general behaviour and look of the application. They are stored in the file .sdedit.conf in a user directory ($HOME on Unix, Application Data on Windows). In order to restore the default preferences (which came shipped with the application), one can use the "Restore defaults" button.
  • Initial diagram preferences: These preferences are applied to a diagram that is being newly created or that is loaded from a plain (sd) file. They are also stored in .sdedit.conf. One can use the current diagram's preferences as the initial preferences (via the "Save as initial" button). Also, one can restore the default initial preferences (which came shipped with the application) via the "Restore defaults" button.
  • Current diagram preferences: These preferences are applied only to the diagram currently being displayed. They are saved along with the diagram source when it is saved as an sdx file. When a diagram is saved as an sd file, these preferences will be lost.

Filtering

The contents of the text area can be replaced by the output of a command that you have entered after clicking the filter icon. If no text is selected, the whole of the text is used as the command's input and replaced by its output, otherwise the replacement is applied to the selection only.
The field where the command is entered can be left by clicking the ESC key. This may also terminate a command that has been entered and has not yet finished. There is a history of commands you have already entered in this session, through which you can browse using the cursor up and cursor down key.
This feature can be used by people who are too lazy to use the file dialog in order to load a file. For example: cat ~/my_diagram.sd. It can also be used for replacing patterns: sed s/foo/bar/g. Or to remove lines that contain comments: grep -v # ... Of course cat, sed and grep must be available on the system then.

RT diagram server

Diagram specifications can be transmitted through a TCP socket and displayed in real time, i. e. as soon as a new line is transmitted, the diagram will be updated.
To use this function, select "Start/stop RT server" in the Extras menu and enter a port number. A process that connects to the port will have to follow a very simple uni-directional protocol:
  • The first line is interpreted as the name of a new tab to be opened.
  • The remaining lines are entered into the text area of the new tab.
  • When a line consists of the word "end", the socket will be closed. The line will not appear in the text area.
The server is started automatically if the "Autostart RT diagram server" flag is set to 1 in the configuration dialog.

2014年2月23日 星期日

256 color naming

src:
http://stackoverflow.com/questions/21498183/what-are-the-names-of-the-256-web-colors-or-unix-terminal-colors

notes:


--------------


0 #000000 Black
1 #800000 Maroon
2 #008000 Green
3 #808000 Olive
4 #000080 Navy
5 #800080 Purple
6 #008080 Teal
7 #c0c0c0 Silver
8 #808080 Grey
9 #ff0000 Red
10 #00ff00 Lime
11 #ffff00 Yellow
12 #0000ff Blue
13 #ff00ff Magenta
14 #00ffff Aqua
15 #ffffff White
16 #000000 Black
17 #00005f Navy
18 #000087 Dark Blue
19 #0000af New Midnight Blue
20 #0000d7 Medium Blue
21 #0000ff Blue
22 #005f00 Green
23 #005f5f Mosque
24 #005f87 Blue Lagoon
25 #005faf Cobalt
26 #005fd7 Navy Blue
27 #005fff Dodger Blue
28 #008700 Green
29 #00875f Observatory
30 #008787 Dark Cyan
31 #0087af Cerulean
32 #0087d7 Pacific Blue
33 #0087ff Dodger Blue
34 #00af00 Islamic Green
35 #00af5f Jade
36 #00af87 Persian Green
37 #00afaf Bondi Blue
38 #00afd7 Iris Blue
39 #00afff Deep Sky Blue
40 #00d700 Lime
41 #00d75f Malachite
42 #00d787 Caribbean Green
43 #00d7af Caribbean Green
44 #00d7d7 Dark Turquoise
45 #00d7ff Deep Sky Blue
46 #00ff00 Electric Green
47 #00ff5f Spring Green
48 #00ff87 Spring Green
49 #00ffaf Medium Spring Green
50 #00ffd7 Bright Turquoise
51 #00ffff Aqua
52 #5f0000 Maroon
53 #5f005f Tyrian Purple
54 #5f0087 Indigo
55 #5f00af Indigo
56 #5f00d7 Electric Indigo
57 #5f00ff Electric Indigo
58 #5f5f00 Olive
59 #5f5f5f Dim Gray
60 #5f5f87 Kimberly
61 #5f5faf Rich Blue
62 #5f5fd7 Slate Blue
63 #5f5fff Neon Blue
64 #5f8700 Olive
65 #5f875f Hippie Green
66 #5f8787 Hoki
67 #5f87af Air Force Blue
68 #5f87d7 Picton Blue
69 #5f87ff Light Slate Blue
70 #5faf00 Olive
71 #5faf5f Fern
72 #5faf87 Keppel
73 #5fafaf Fountain Blue
74 #5fafd7 Picton Blue
75 #5fafff Maya Blue
76 #5fd700 Bright Green
77 #5fd75f Pastel Green
78 #5fd787 Pastel Green
79 #5fd7af Medium Aquamarine
80 #5fd7d7 Medium Turquoise
81 #5fd7ff Maya Blue
82 #5fff00 Bright Green
83 #5fff5f Screamin' Green
84 #5fff87 Screamin' Green
85 #5fffaf Aquamarine
86 #5fffd7 Aquamarine
87 #5fffff Baby Blue
88 #870000 Dark Red
89 #87005f Eggplant
90 #870087 Dark Magenta
91 #8700af Dark Violet
92 #8700d7 Dark Violet
93 #8700ff Electric Indigo
94 #875f00 Olive
95 #875f5f Light Wood
96 #875f87 Trendy Pink
97 #875faf Blue Marguerite
98 #875fd7 Medium Purple
99 #875fff Light Slate Blue
100 #878700 Olive
101 #87875f Bandicoot
102 #878787 Suva Grey
103 #8787af Ship Cove
104 #8787d7 Portage
105 #8787ff Light Slate Blue
106 #87af00 Citrus
107 #87af5f Chelsea Cucumber
108 #87af87 Dark Sea Green
109 #87afaf Ziggurat
110 #87afd7 Seagull
111 #87afff Maya Blue
112 #87d700 Lawn Green
113 #87d75f Pastel Green
114 #87d787 Gossip
115 #87d7af Bermuda
116 #87d7d7 Riptide
117 #87d7ff Columbia Blue
118 #87ff00 Chartreuse
119 #87ff5f Screamin' Green
120 #87ff87 Mint Green
121 #87ffaf Mint Green
122 #87ffd7 Aquamarine
123 #87ffff Electric Blue
124 #af0000 Free Speech Red
125 #af005f Eggplant
126 #af0087 Eggplant
127 #af00af Deep Magenta
128 #af00d7 Dark Violet
129 #af00ff Electric Purple
130 #af5f00 Tenne (Tawny)
131 #af5f5f Coral Tree
132 #af5f87 Tapestry
133 #af5faf Violet Blue
134 #af5fd7 Medium Orchid
135 #af5fff Light Slate Blue
136 #af8700 Dark Goldenrod
137 #af875f Teak
138 #af8787 Thatch
139 #af87af London Hue
140 #af87d7 Wisteria
141 #af87ff Light Slate Blue
142 #afaf00 Citrus
143 #afaf5f Olive Green
144 #afaf87 Neutral Green
145 #afafaf Dark Gray
146 #afafd7 Moon Raker
147 #afafff Lavender Blue
148 #afd700 Spring Bud
149 #afd75f Conifer
150 #afd787 Feijoa
151 #afd7af Chinook
152 #afd7d7 Scandal
153 #afd7ff Columbia Blue
154 #afff00 Spring Bud
155 #afff5f Green Yellow
156 #afff87 Mint Green
157 #afffaf Mint Green
158 #afffd7 Aquamarine
159 #afffff Columbia Blue
160 #d70000 Free Speech Red
161 #d7005f Razzmatazz
162 #d70087 Hollywood Cerise
163 #d700af Deep Magenta
164 #d700d7 Deep Magenta
165 #d700ff Psychedelic Purple
166 #d75f00 Tenne (Tawny)
167 #d75f5f Roman
168 #d75f87 Pale Violet Red
169 #d75faf Pale Violet Red
170 #d75fd7 Orchid
171 #d75fff Heliotrope
172 #d78700 Mango Tango
173 #d7875f Copper
174 #d78787 My Pink
175 #d787af Kobi
176 #d787d7 Plum
177 #d787ff Heliotrope
178 #d7af00 Golden Poppy
179 #d7af5f Equator
180 #d7af87 Calico
181 #d7afaf Pink Flare
182 #d7afd7 French Lilac
183 #d7afff Mauve
184 #d7d700 School Bus Yellow
185 #d7d75f Goldenrod
186 #d7d787 Deco
187 #d7d7af Aths Special
188 #d7d7d7 Light Grey
189 #d7d7ff Lavender Blue
190 #d7ff00 Chartreuse Yellow
191 #d7ff5f Laser Lemon
192 #d7ff87 Canary
193 #d7ffaf Canary
194 #d7ffd7 Honeydew
195 #d7ffff Light Cyan
196 #ff0000 Red
197 #ff005f Razzmatazz
198 #ff0087 Deep Pink
199 #ff00af Hollywood Cerise
200 #ff00d7 Hot Magenta
201 #ff00ff Magenta
202 #ff5f00 Safety Orange
203 #ff5f5f Bittersweet
204 #ff5f87 Wild Watermelon
205 #ff5faf Hot Pink
206 #ff5fd7 Neon Pink
207 #ff5fff Pink Flamingo
208 #ff8700 Dark Orange
209 #ff875f Coral
210 #ff8787 Mona Lisa
211 #ff87af Tickle Me Pink
212 #ff87d7 Neon Pink
213 #ff87ff Fuchsia Pink
214 #ffaf00 Orange
215 #ffaf5f Rajah
216 #ffaf87 Macaroni And Cheese
217 #ffafaf Melon
218 #ffafd7 Cotton Candy
219 #ffafff Lavender Rose
220 #ffd700 Gold
221 #ffd75f Dandelion
222 #ffd787 Salomie
223 #ffd7af Navajo White
224 #ffd7d7 Misty Rose
225 #ffd7ff Lavender Blush
226 #ffff00 Yellow
227 #ffff5f Laser Lemon
228 #ffff87 Canary
229 #ffffaf Canary
230 #ffffd7 Cream
231 #ffffff White
232 #080808 Black
233 #121212 Black
234 #1c1c1c Nero
235 #262626 Nero
236 #303030 Night Rider
237 #3a3a3a Eclipse
238 #444444 Charcoal
239 #4e4e4e Matterhorn
240 #585858 Mortar
241 #606060 Dim Gray
242 #666666 Dim Gray
243 #767676 Empress
244 #808080 Grey
245 #8a8a8a Suva Grey
246 #949494 Suva Grey
247 #9e9e9e Dark Gray
248 #a8a8a8 Dark Gray
249 #b2b2b2 Dark Gray
250 #bcbcbc Silver
251 #c6c6c6 Silver
252 #d0d0d0 Light Grey
253 #dadada Gainsboro
254 #e4e4e4 Gainsboro
255 #eeeeee White Smoke






2014年2月21日 星期五

史上最便宜 3D印表機 僅1萬5

Src:
http://www.appledaily.com.tw/appledaily/article/supplement/20130827/35250193/

Notes:

-------

史上最便宜 3D印表機 僅1萬5

1公克成本約1元台幣

 
 
更多專欄文章
三緯國際3D印表機da Vinci(如圖)可印出模特兒身上的網狀比基尼,包含手環配件總計耗時24小時,成本約500元。
三緯國際於昨(26)日發表XYZprinting家用3D印表機da Vinci,採熔絲製造技術,僅售1萬5000元,為目前市場同級機種中最便宜,跟市售高階彩色雷射印表機價位差不多,但尚在原型機階段,完成品1公克列印成本約1元,列印過程安靜,塑料耗材臭味低,預計9月初開放預購,年底全台威寶門市可試印,明年下半年將推雙色噴嘴新機。
報導╱王心怡 攝影╱翁玉信 部分圖片╱業者提供

【3C小百科】何謂3D印表機?

號稱掀起第三波工業革命的科技新品3D印表機,依用途可分工業、醫療及家用3類,其噴嘴射出物料也有金屬、人體組織及塑料等,現行家用機種可自行繪圖、從各業者既有3D圖庫中選要列印圖樣,或從3D掃描機掃瞄欲列印物品,所屬軟體會自行運算立體結構進行立體列印;目前家用機種多用於列印餐具或生活用品等,但採ABS塑料餐具僅可用於冷飲,不適用於盛裝熱食。 

【親民新機】XYZprinting da Vinci

體積與雷射印表機差不多,附單頭噴嘴單色列印,最大可印長、寬、高均20公分立方體物品,耗時約15小時,簡體中文介面,上市後有繁體中文版,售1萬5000元,9月初預購,年底上市。 
該機種專屬的有色塑料卷材目前共有15色,機身後方可附掛2卷,上市會加贈2卷300克耗材,銷售版耗材為600克,預計上市售價750元。 
楔型鞋重約300多克,成本約300元,製作耗時4個半小時,採中空模式,強光下可看出蜂巢狀結構;另有實心及薄殼列印模式。 

【實測列印】

在軟體上選定圖樣,實測列印約耗時2小時,成品溫度頗高但不燙手,不過機器面板及射出處溫度相當高,使用需注意安全。 
在專屬3D軟體中選定並繪製完成Android公仔圖樣,即可製作出1:1比例的公仔。 
實測軟體可加工編輯,如列印防燙杯套前可輸入客製化人名,就能製作出個人專屬杯套,製作1個約需1小時左右。 
現行3D列印成品表面紋路無法避免,可依細緻、高品質、標準及快速等4等級列印。 

【同場加映】RedAngel 3D打印機

可列印長15×寬15×高15公分物品,售價8萬5000元,泰摩科技。 

MakerBot 3D印表機

對應軟體採繁體中文,機身重10公斤,可印長23×寬15×高15公分體積物品,露天拍賣含運售價3萬9800元,賣家帳號mickeyboss。 

【哪裡買】

三緯國際 (02)7705-8001 www.xyzprinting.com
泰摩科技 0800-869-000 timer3c.com
露天拍賣 www.ruten.com.tw