pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin - collaborative debugging tool View Help


Posted by Roger Browne on Mon 10 Dec 13:45
report abuse | View followups from test | download | new post

  1. function Show_Books(search_query) is priority medium distributed
  2.  
  3.     page = new page_builder
  4.  
  5.     if search_query.is_empty
  6.         page.add_paragraph(internationalize(response("empty_search_query"))
  7.     else
  8.         database_connection.open_or_reuse(global_settings)
  9.         database_connection.find_matching_records("book", search_query)
  10.         if database_connection.has_results
  11.             table = new html_table_builder
  12.             database_connection.for_each_result as row
  13.                 table.add_row(row.substring(1, 30))
  14.             end
  15.             page.add(table)
  16.         else
  17.             page.add_paragraph(internationalize(response("sorry")))
  18.         end
  19.         database_connection.close
  20.     end
  21.  
  22.     if time - old time > 0.5
  23.         send_email(global_settings.admin_email, database_server.status,
  24.                    webserver.status)
  25.     end
  26.  
  27. end

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post