What is really different with FLOW CHART from ACTIVITY DIAGRAM?

I know activity diagram is




more simple
standardized
support concurrent flows


than a flow chart.



But what is the reason I should use activity diagram rather than flow chart apart from those above points.



I'm just started UML. And this point is unclear for me. Can anyone explain to me? Thanks in advance.



Answers

An activity diagram is not simpler than a flow chart. A flow chart is a simpler (earlier) version of an Activity Diagram.



Flow charts were invented at least 20 years earlier and are commonly used by non-programmers to document workflows. Any business process where people have to make decisions can be described as a flow chart. So, for example, a clerk making decisions about how to file complicated information might have a flow chart on the wall.



Because a flow chart is a subset of an activity diagram, there's actually no decision to make. A flow chart naturally grows into an activity diagram if you need to add more complex descriptions.



Sparx have a good explanation of the range of things you can describe in an Activity Diagram



Answers

A UML Activity Diagram is a type of "flowchart" .. in UML, with bells and whistles. There is no such thing as a "UML Flowchart". If using UML it is an Activity Diagram. If using something else, then something else is being used.




[UML] Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration and concurrency ..



.. Activity diagrams may be regarded as a form of flowchart.




For better or worse, UML is a standardization. This is nice because it is well, "standardized", but also means that it is not appropriate for all tasks: the chosen "flowchart" model (and extensions thereof) might be a better fit for a particular problem/domain.





Linkedin retrive full profile details?

I want to integrate the Linkedin API and fetch all the details (Education ,detail..)



But When I pass r_fullprofile in the grant access. I am getting following error.




authorization failed Error Domain=LIALinkedInERROR Code=1




I have done the code as below :



- (LIALinkedInHttpClient *)client {
LIALinkedInApplication *application = [LIALinkedInApplication applicationWithRedirectURL:@"http://www.google.com"
clientId:@"XXXXXXX"
clientSecret:@"XXXXX"
state:@"DCEEFWF45453sdffef424"
grantedAccess:@[@"r_fullprofile",@"r_emailaddress"]];
return [LIALinkedInHttpClient clientForApplication:application presentingViewController:nil];
}


Answers

May be you are not aware of the developer programe changes done by LinkedIn as explained in https://developer.linkedin.com/support/developer-program-transition







How to get the hidden input's value by using python?

How can i get input value from html page



like



<input type="hidden" name="captId" value="AqXpRsh3s9QHfxUb6r4b7uOWqMT" ng-model="captId">


I have input name [ name="captId" ] and need his value



import re , urllib ,  urllib2
a = urllib2.urlopen('http://www.example.com/','').read()


thanx





update 1



I installed BeautifulSoup and used it but there some errors



code



 import re , urllib ,  urllib2
a = urllib2.urlopen('http://www.example.com/','').read()
soup = BeautifulSoup(a)
value = soup.find('input', {'name': 'scnt'}).get('value')


error



"soup = BeautifulSoup(a)
NameError: name 'BeautifulSoup' is not defined"



Answers

Using re module to parse xml or html is generally considered as bad practice. Use it only if you are responsable for the page you try to parse. If not, either your regexes are awfully complex, or your script could break if someone replaces <input type="hidden" name=.../> with <input name="..." type="hidden" .../> or almost anything else.



BeautifulSoup is a html parser that :




automatically fixes minor errors (unclosed tags ...)
build a DOM tree
allows you to browse the tree, search for specific tags, with specific attributes
is useable with Python 2 and 3


Unless you have good reasons not to do it, you should use it rather than re for HTML parsing.



For example assuming that txt contains the whole page, find all hidden fields would be as simple as :



from bs4 import BeautifulSoup
soup = BeautifulSoup(txt)
hidden_tags = soup.find_all("input", type="hidden")
for tag in hidden_tags:
# tag.name is the name and tag.value the value, simple isn't it ?




↑このページのトップヘ