上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 82 下一页
摘要: =>namespace current::DCS::SocketProtocol=>set m_theObject [[namespace current] ::#auto]::socketProtocol0=>set m_theObject [[namespace current] ::#auto]::socketProtocol1=>set m_theObject [[namespace current] ::#auto]::socketProtocol2=>set m_theObject [[namespace current] ::#auto]::sock 阅读全文
posted @ 2011-04-24 20:32 greencolor 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Application DcssUserProtocolDCS::DcssUserProtocol dcss \ $dcssHostName \ $dcssPort \ -useSSL [::config getDcssUseSSL] \ -authProtocol $authProtocol \ -_reconnectTime 1000 \ -callback "" \ -networkErrorCallback ""class in DcssUserProtocolconstructor {server port args}------------- 阅读全文
posted @ 2011-04-24 17:49 greencolor 阅读(150) 评论(0) 推荐(0) 编辑
摘要: class ::classname{ private variable m_device private variable m_label public method getLabel { device } { return $m_label($device) } public method getDevice { label } { return $m_device($label) } constructor { mapList } { puts "constructor $this" puts "list: $mapList" array set m 阅读全文
posted @ 2011-04-24 15:06 greencolor 阅读(198) 评论(0) 推荐(0) 编辑
摘要: use strict;use warnings;my @base = ( "A", "T", "G", "C" );my $length = 10;my $num = 2;for ( my $i = 1 ; $i <= $num ; $i++ ) { for ( my $j = 1 ; $j <= $length ; $j++ ) { my $element = $base[ rand @base ]; print $element; } print "\n";} 阅读全文
posted @ 2011-04-21 23:06 greencolor 阅读(136) 评论(0) 推荐(0) 编辑
摘要: set package_loading_result(img::jpeg) [catch {package require img::jpeg 1.3}]set package_loading_result(img::gif) [catch {package require img::gif 1.3}]set package_loading_result(img::png) [catch {package require img::png 1.3}]# Check for package loading successset l_failures 0foreach i_package [arr 阅读全文
posted @ 2011-04-20 14:00 greencolor 阅读(394) 评论(0) 推荐(0) 编辑
摘要: The method to get Date Tcltkproc GetDate { args } { #---------------------------------------------------------------#d_sum Return the date/time appropriately formatted#d_desc Uses Tcl clock command. Return the current time if the -clock \argument is not used. See Tcl clock command for explanation of 阅读全文
posted @ 2011-04-19 15:33 greencolor 阅读(355) 评论(0) 推荐(0) 编辑
摘要: # save vars and arraysproc save_state {} { uplevel 1 { set fh [open $::statefile w] foreach v [info vars] { if [array exists $v] { puts $fh [list array set $v [array get $v]] } else { puts $fh [list set $v [set $v]] } } close $fh }}# restoreproc restore_state {} { uplevel 1 { source $::statefile }} 阅读全文
posted @ 2011-04-19 15:18 greencolor 阅读(123) 评论(0) 推荐(0) 编辑
摘要: itcl class examplepackage require Itclitcl::class Animal { variable name variable knowledge variable habitat variable topSpeed variable color variable picture method answer: {aString} method name: {aString} method talk {} method habitat: {aHabitat} method learn:action: {aString aBlock} method reset 阅读全文
posted @ 2011-04-19 15:17 greencolor 阅读(543) 评论(0) 推荐(0) 编辑
摘要: if { [catch {open $filn r } f ] } { Report 3 "Could not open initialisation file $filn" return 0 } set textin [split [ read $f ] "\n"] CloseFile $f set full_text "" foreach line $textin { if { [string range $line end end] == "\\" } { append buffer [string rang 阅读全文
posted @ 2011-04-15 22:42 greencolor 阅读(142) 评论(0) 推荐(0) 编辑
摘要: proc Report { text args }{ set logfile [GetSystemVar SESSION_LOG] if { $logfile != "" } { WriteFile $logfile "$text" }}proc WriteFile { filename text args } { set file_mode "a+" for { set i 0 } { $i < [llength $args] } { incr i } { set arg [lindex $args $i] switch -r 阅读全文
posted @ 2011-04-15 00:12 greencolor 阅读(210) 评论(0) 推荐(0) 编辑
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 82 下一页