title: How to generate random number and save last random number after refreshing page
body: <p>I created simple project where I can search for images in folders and also show random image from folder.
  But here is a problem sometimes when I press "Random"  it repeats some of the pictures from folder for example after pressing button "random" image " 2 " appears and after pressing again button it can load the same image from folder. 
  How to solve this? something like variable which remember last random number generated? </p>
  
  <p>// sorry for english, it's bit too late for me.</p>