Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
zz
#tclsh 8.6 proc wapp-page-resource-link {} { wappInt-decode-query-params set publicUrl [getPublicUrl] set id [wapp-param id] set url "" db eval {SELECT attachment1 FROM Post WHERE visible=1 AND archived=0 AND id=$id} { set url $attachment1 } if {$url == ""} { wapp-trim "Invalid link" return 0 } if {[string compare $url "/public/docs/hb0837T_06March2020.pdf"] == 0} { set url [concat $publicUrl$url] } wapp-redirect $url set counter 0 db eval {SELECT count from resourceLinkCounter where postId=$id} { set counter $count } incr counter 1 set fp [open db/userhits.txt a] try { puts $fp "INSERT OR REPLACE INTO resourceLinkCounter (postId,count) Values ($id,$counter)" } finally { close $fp } db eval {INSERT OR REPLACE INTO resourceLinkCounter (postId,count) Values ($id,$counter)} }
run
|
edit
|
history
|
help
0
Convert a collection to a list
binds
binary multiplication
Different factorial implementations
r
NISP - Planning ID Unit Test
Huffman code size
Bin mul float
q1q0
Perfect neg float bin multiplier