quarta-feira, 31 de agosto de 2011

Listar usuários conectados 2

_global usuarios_conectados <<
_proc(_optional write?)
    ## This proc lists out the users (username@machine_name)
    ## connected to smallworld at that instance.
    ##
    ## The argument write? is defaulted to _true. If given false, it doesn't
    ## write at the magik prompt.
    ##
    ## Anycase it returns a simple_vector of user names.
    write? << write?.default(_true)
    mv << message_handler.view
    fl << mv.files.an_element()
    _local log_fl << fl.current_logical_file
    us << log_fl.users
    us << us.map(_proc (id)
               _import log_fl

               >> log_fl.user_details(id)
             _endproc)
    _if write?
    _then

        gr << equality_hash_table.new()
        guser << equality_hash_table.new()
        _for u _over us.fast_elements()
        _loop
            pos_arroba << u.index_of_seq("@")

            user << u.subseq(1,pos_arroba-1)
            machine << u.subseq(pos_arroba+1,u.size-pos_arroba)

            _if gr[machine.as_symbol()]_is _unset
            _then
                gr[machine.as_symbol()] << 1
            _else
                gr[machine.as_symbol()] +<< 1
            _endif

            _if guser[user.as_symbol()]_is _unset
            _then
                guser[user.as_symbol()] << 1
            _else
                guser[user.as_symbol()] +<< 1
            _endif

            write(u," -> ",user," - ",machine)
        _endloop

        _for i,k _over gr.keys_and_elements()
        _loop
            write(i," count: ",k)
        _endloop

        _for i,k _over guser.keys_and_elements()
        _loop
            write(i," count: ",k)
        _endloop
    _endif
    >> us
_endproc
$

Listar usuários conectados

_global usuarios_conectados <<

_proc(_optional write?)
      ## This proc lists out the users (username@machine_name)
      ## connected to smallworld at that instance.
      ##
      ## The argument write? is defaulted to _true. If given false, it doesn't
      ## write at the magik prompt.
      ##

      ## Anycase it returns a simple_vector of user names.

      write? << write?.default(_true)
      mv << message_handler.view
      fl << mv.files.an_element()
      _local log_fl << fl.current_logical_file
      us << log_fl.users
      us << us.map(_proc (id)
                     _import log_fl
                     >> log_fl.user_details(id)
                 _endproc)
      _if write?
      _then
            _for u _over us.fast_elements()
            _loop
                  write(u)
            _endloop
      _endif
     
>> us
_endproc
$

segunda-feira, 29 de agosto de 2011

Forums & Blogs

Forums

GESmallworld.org BLOG

This forum is part of the gesmallworld.org wiki. Please feel free to add your own blogs here.

Yahoo: SW-GIS

The sw-gis list provides a forum for developers and system administrators working with Smallworld GIS. This list addresses technical issues concerning Smallworld GIS, such as Magik programming, CASE tool, interfacing to other systems, but also system and database administration.

Yahoo: SW-GIS-ANNOUNCE

This list is for general announcements related to Smallworld GIS or other Smallworld related products or applications. Acceptable announcements include:

  • New Smallworld-related products or new releases of existing products
  • Smallworld related job openings
  • New Smallworld partner companies or new offices of existing Smallworld partner companies

For some reason, this group is listed as an adult content. Whoever is the moderator of the group should fix that.

Yahoo: SW-GIS-USERS

This list provides a forum for users of Smallworld GIS and other Smallworld related applications to share information and knowledge about the use and configuration of those products and applications.

This appears to be inactive, as the only postings this year are SPAM.

Social Networks

Twitter

Follow Smallworld information on Twitter using the search hash tag of #swgis. And for when you are at conferences use #swuc.

Blogs

Alfred Sawatzky

Alfred has a large blog site that discusses many aspects of Smallworld.

Other areas of interest…

A posting from http://tech.groups.yahoo.com/group/sw-gis
Re: Small World Tutorials

There are a limited number of web resources, but some of these websites do have good information.

This wiki article gives a good overview.
http://en.wikipedia.org/wiki/Magik_(programming_language)

There are a few basic tricks on Bill Wright's old (2005) blog. It's dead, but the code is still valid.
http://www.billwrightenterprises.com/professional/Magik/magik_blogger.html

Charlie Savage has posted the old Smallworld Technical Papers on his blog. Tech paper number 5 is on Magik Programming.
http://cfis.savagexi.com/pages/technical_papers

Alfred Sawatzky has an active blog on Magik programming, but it is for more advanced programmers. Lots of good information, but it can overwhelm a beginner.
http://sworldwatch.blogspot.com/

If you are hands on, you can rip apart some source code from SourceForge and see the inner workings of some excellent open source projects. There are lots of great things to download from here.
http://sourceforge.net/projects/magikcmpnts/

Christian Taton's blog is geared toward beginning Magik programmers. It doesn't have a lot of content yet, but it is alive and it should be good for learning Magik from the beginning.
http://magiktricks.thetatons.com/

Tim Minto has some source code projects available to dissect on his site.
http://www3.telus.net/tminto/downloads.html

There are some good tools for Magik programmers found on the Magik IDE - MDT Magik Development Tools website.
http://www.mdt-project.net/

There aren't many Magik programming resources out there, but hopefully some of these will help you. You will also find this Yahoo group to be great at answering specific questions. Read the archives before posting because it annoys everybody to answer the same question multiple times, and ask specific questions with detail and you will often get a timely and effective response.

Good luck learning Magik and welcome to the community.

-Christain Taton

Fonte: http://sw-gis.wikidot.com/forums-blogs

Related Posts Plugin for WordPress, Blogger...