|
|
|
|
|
Tuesday, 02 November 2010 04:00 |
 | About USB Backup
Allows you to backup your pendrives & other removable media on an automatic basis in the background so that you don‘t have to worry about loosing files again. No matter if your memory pen becomes corrupt, looses all data or ends up in the wash, USB backup can restore all the data to any device/folder you want.
USB Backup is a lifesaver: Memory loss on flash drives is a common problem. Flash cells (which store the data) wear out and fail after a period of time,removing the pendrive without ejecting, frequent usage and frequent formatting are only a few of the causes of memory loss on flash drives.This is where USB Backup comes in - it sits in the background and watches the devices being plugged in and backs them up, so even if your pendrive fails or gets destroyed, you will always have the most recent version of the files ready to be restored. Many more features, |
Read more: |
|
|
Sunday, 25 April 2010 21:54 |
The following example is a possible alternative to the Rack::Session.
def new_session(user_id)
Thread.new{Thread.current[:name] = user_id; puts 'hi'; sleep 40; puts 'beep'}
end
def renew_session(user_id)
Thread.list.detect {|x| x[:name] == user_id}.kill
new_session(user_id)
end
# initialise a memory store for user g234
# ...
# then start the timer
new_session('g234')
# initialise a memory store for user g238
# ...
# then start the timer
new_session('g238')
# ... 30 seconds later the user g234 makes another request which means
# we need to keep this session alive
renew_session('g234')
# user has already disconnected which means their session will
# automatically timeout and their memory store will erased.
Note: The 'puts "beep"' would be replaced by the storage clean-up code. Read more: |
|
|
|
|
|
|
|