How do you delete the history off MAC computers?

If you're using Safari, you can go to the History menu and at the very bottom you'll find an item that says "Clear History"; clicking it will (of course) clear the history. If you're using Firefox, go to the View menu, then Sidebar, and click on "History"; the History sidebar will open, and you can remove items from the history list by selecting them and pressing the Delete (or Backspace) key.
How do I clear my Internet browser history?

How do I clear my Internet browser history?


Question

How do I clear my Internet browser history?

Answers

As you browse the Internet, each of the items you view are saved locally on your hard drive. This helps web pages you visit frequently load faster by loading the files from you hard drive instead of having to downloading the web page again. To conserve hard drive space or to help keep their Internet browsing private, users may find it necessary to delete their Internet History, below is how to do this.
Microsoft Internet Explorer users
Tip: Users running Internet Explorer 7.0 and above will need to press the Alt key in order to access the file menu to get access to options such as File, Tools, etc.
Viewing History
  • Microsoft Internet Explorer 7 and above users can view their history files by clicking the "Tools" menu, "Internet Options", clicking the "Settings" button under the Browsing history, and then clicking the "View Files" button.
  • Microsoft Internet Explorer 6.x users can view their history files by clicking the "Tools" menu, "Internet Options", clicking the "Settings" button, and then clicking the "View Files" button.
Deleting History
Press CTRL + Shift + DEL to open the Clear Browsing History window.
or
  • Microsoft Windows users running Microsoft Internet Explorer 6 and above can delete their history files by clicking the "Tools" menu, "Internet Options", and clicking the "Delete Files" or "Delete" button. Users also have the option of automatically deleting files each time the close the browser window by clicking the "Advanced" tab and checking "Empty Temporary Internet Files folder when browser is closed" under the "Security" section.
  • Microsoft Internet Explorer 4.x users on an Apple Macintosh can delete the history by clicking the "Hard Drive" icon, "System",  "Preferences", "Explorer", and moving the history file into the trash.
  • Microsoft Internet Explorer 3.02 and lower users can delete their history by clicking the "View" menu, "Options", open the tab "Advanced", click the "Settings" tab, and click the "Empty Folder" button.
Mozilla Firefox users
Viewing History
Press Ctrl + H to open the left-side history bar.
or
Click History at the top of the window.
or
Users using earlier versions of Mozilla Firefox can also view their history by clicking "Go" and clicking "History."
Deleting History
Press CTRL + Shift + DEL to open the Clear All History window.
or
Mozilla Firefox users can clear their history by clicking the "Tools" menu, "Options", clicking the "Privacy" button, and under "History" click the "Clear" or "Clear Now" button.
Tip: If you don't see the File, Edit, View menu press the Alt key.
Google Chrome users
Viewing History
Press Ctrl + H to open the left-side history bar.
or
Click on the "wrench" icon Chrome wrench icon, which is located near the top-right side of the browser window and then click History.
Deleting History
Press CTRL + Shift + DEL to open the Clear Browsing Data Window.
or
  1. Click on the "wrench" icon Chrome wrench icon, which is located near the top-right side of the browser window.
  2. Move your mouse over Tools, then select Clear browsing data...

    Chrome file menu
  3. Select the amount of time you want to go back to delete in your history. You can choose from the past hourthe past daythe past weekthe last four weeks, and the beginning of time.
  4. Select the types of history you would like to delete. You can choose as many as you like from this list: Clear browsing history,Clear download historyEmpty the cacheDelete cookies and other site and plug-in dataClear saved passwords, and Clear saved Autofill form data.

    Chrome clear browsing data window
  5. Click the Clear browsing data button. This will clear the selected types of Internet history for the chosen time period.
Opera users
Viewing History
Click Help and then About. Within the About Opera window you'll see the full path to where the cached files are stored. Browse to that file path to view cached files.
Deleting History
Opera users can delete their history by clicking the "File" menu, "Preferences", "History", and click "Empty now" button. In addition, users can check "Empty on exit" if they wish for this task to occur each time they exit the browser.
Safari users
Viewing History
Press Ctrl + H to open the left-side history bar.
or
Click on the "gear" icon Safari gear icon, which is located near the top-right side of the browser window and then click History.
Deleting History
  1. Click on the "gear" icon Safari gear icon, which is located near the top-right side of the browser window.
  2. Click the Reset Safari... link to get the below window. Leave everything checked if you want to clear everything out or just keep Clear history checked to clear the history. Once your options have been selected click the Reset button.
Clearing Safari history
Netscape users
Viewing History
  • Microsoft Windows users can view history by first opening Netscape and click the "Edit" menu, "Preferences", "History", and view the location where Netscape is storing your files. Next, open this folder within Explorer.
Deleting History
  • Netscape users can delete their history files by clicking the "Edit" menu, "Preferences", "History", and click the "Clear History" button.

WCF data services proxy class template


  1. public interface IRepository<T>
  2. {
  3.     IQueryable<T> GetAll();
  4.     T GetSingle(int id);
  5.     IQueryable<T> FindBy(Expression<Func<T, bool>> predicate);
  6.     IQueryable<T> Where(Expression<Func<T, bool>> predicate);
  7.     void Add(T entity);
  8.     void Delete(T entity);
  9.     void Update(T entity);        
  10. }
  11.        
  12. public IQueryable<Region> Where(Expression<Func<T, bool>> predicate)
  13. {  
  14.     return _context.(something general).Where(predicate);
  15. }
  16.        
  17. public IQueryable<Region> Where(Expression<Func<T, bool>> predicate)
  18. {  
  19.     return _context.Region.Where(predicate);
  20. }

Autocomplete using JSON value in variable for source?


  1. [ "Choice1", "Choice2" ]
  2.        
  3. [ { label: "Choice1", value: "value1" }, ... ]
  4.        
  5. $('input').autocomplete({source: [ "Choice1", "Choice2" ], minLength: 0});
  6.        
  7. $('input').autocomplete({source: [ { label: "Choice1", value: "value1" } ], minLength: 0});
  8.        
  9. var source = '[ "Choice1", "Choice2" ]';
  10. $('input').autocomplete({source: source, minLength: 0});
  11.        
  12. $('input').autocomplete({source: $('input').data('json'), minLength: 0});
  13.        
  14. $('input').autocomplete({source: eval($('input').attr('data-json')), minLength: 0});
  15.        
  16. var source = '[ "Choice1", "Choice2" ]';
  17.        
  18. var source = [ "Choice1", "Choice2" ];
  19.        
  20. var source = JSON.parse( '[ "Choice1", "Choice2" ]' );
  21.        
  22. var source = $.parseJSON( '[ "Choice1", "Choice2" ]' );
  23.        
  24. [ { label: "Choice1", value: "value1" }, ... ]
  25.        
  26. [ { "label": "Choice1", "value": "value1" }, { "label": "Choice2", "value": "value2" },...]

How to add class to a listitem from code behind


  1. if (pageCount > 0)
  2.     {
  3.         pages.Add(new ListItem("First", "1", currentPage > 1));
  4.         for (int i = 1; i <= pageCount; i++)
  5.         {
  6.             pages.Add(new ListItem(i.ToString(), i.ToString(), i != currentPage));
  7.         }
  8.         pages.Add(new ListItem("Last", recordCount.ToString(), currentPage < pageCount));
  9.     }
  10.        
  11. <ul class="pages-pagina">
  12. <li class="pages previous"><a href="#">Previous</a></li>
  13. <li class="pages selected"><a href="#">1</a></li>
  14. <li class="pages"><a href="#">2</a></li>
  15. <li class="pages"><a href="#">3</a></li>
  16. <li class="pages"><a href="#">4</a></li>
  17. <li class="pages"><a href="#">5</a></li>
  18. <li>...</li>
  19. <li class="pages last"><a href="#">10</a></li>
  20. <li class="pages next"><a href="#">Next</a></li>
  21.  
  22.  
  23. </ul>
  24.        
  25. ListItem li = new ListItem(i.ToString(), i.ToString(), i != currentPage);
  26. li.Attributes.Add("class", "pages");

Removing data with tags from a vector


  1. abc<-""welcome <span class="r"><a href="abc">abc</a></span> Have fun!""
  2.        
  3. abc<-"welcome Have fun"
  4.        
  5. > gsub("(<[^>]*>)","",abc)
  6.        
  7. abc <- "welcome <span class="r"><a href="abc">abc</a></span> Have fun!"
  8. library(XML)
  9. #doc <- htmlParse(abc, asText=TRUE)
  10. doc <- htmlTreeParse(abc, asText=TRUE)
  11. xmlValue( xmlRoot(doc) )
  12.        
  13. f <- function(x) if(xmlName(x) == "span") xmlTextNode(" ") else x
  14. d <- xmlDOMApply( xmlRoot(doc), f )
  15. xmlValue(d)

Software design: where to put database open and close


  1. public class DBManager
  2. {
  3.     // Variable to hold the database instance
  4.     private SQLiteDatabase db;
  5.     // Database open/upgrade helper
  6.     private DatabaseHelper dbHelper;
  7.  
  8.     public DBManager(Context _context)
  9.     {
  10.         Log.v("DBManager", "constructor");
  11.         dbHelper = new DatabaseHelper(_context, SqlConstants.DATABASE_NAME, null, SqlConstants.DATABASE_VERSION);
  12.     }
  13.  
  14.     public DBManager open() throws SQLException
  15.     {
  16.         Log.v("DBManager", "open");
  17.         db = dbHelper.getWritableDatabase();
  18.         return this;
  19.     }
  20.  
  21.     public void close()
  22.     {
  23.         Log.v("DBManager", "close");
  24.         db.close();
  25.     }
  26.  
  27.         ...
  28.  
  29.         /**
  30.      * Query all forms available locally.
  31.      * @return A list with all forms (form.name and form.FormId) available on local db
  32.      * or null if there was a problem.
  33.      */
  34.     public ArrayList<Form> getAllForms()
  35.     {
  36.         Log.v("DBManager", "getAllForms");
  37.         ArrayList<Form> list = null;
  38.         Cursor c = null;
  39.  
  40.         try
  41.         {
  42.             c = this.getAllFormsCursor();
  43.             if (c != null)
  44.             {
  45.                 int formNameIndex = c.getColumnIndex(SqlConstants.COLUMN_FORM_NAME);
  46.                 int formIdIndex = c.getColumnIndex(SqlConstants.COLUMN_FORM_ID);
  47.  
  48.                 c.moveToFirst();
  49.                 if (c.getCount() > 0)
  50.                 {
  51.                     list = new ArrayList<Form>(c.getCount());
  52.                     do
  53.                     {
  54.                         Form f = new Form();
  55.                         f.Name = c.getString(formNameIndex);
  56.                         f.FormId = c.getString(formIdIndex);
  57.                         list.add(f);
  58.                     }
  59.                     while (c.moveToNext());
  60.                 }
  61.             }
  62.         }
  63.         catch (Exception e)
  64.         {
  65.             e.printStackTrace();
  66.             list = null;
  67.         }
  68.         finally
  69.         {
  70.             if (c != null)
  71.                 c.close();
  72.         }
  73.         return list;
  74.     }
  75.  
  76.     private Cursor getAllFormsCursor()
  77.     {
  78.         Log.v("DBManager", "getAllFormsCursor");
  79.  
  80.         return db.query(SqlConstants.TABLE_FORM,
  81.                 new String[] {
  82.                 SqlConstants.COLUMN_FORM_ID,
  83.                 SqlConstants.COLUMN_FORM_NAME}, null, null, null, null, null);
  84.     }
  85. }
  86.        
  87. private class DbFormListAsyncTask extends AsyncTask<Void, Void, ArrayList<Form>>
  88. {
  89.     private Context mContext;
  90.     private ProgressDialog loadingDialog;
  91.     private DBManager dbMan;
  92.  
  93.     DbFormListAsyncTask(Context context)
  94.     {
  95.         this.mContext = context;
  96.         loadingDialog = new ProgressDialog(mContext);
  97.         loadingDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  98.         loadingDialog.setMessage("Retriving forms. Please wait...");
  99.         loadingDialog.setCancelable(false);
  100.         loadingDialog.show();
  101.     }
  102.  
  103.     @Override
  104.     protected ArrayList<Form> doInBackground(Void... arg0)
  105.     {
  106.         dbMan = new DBManager(mContext);
  107.         dbMan.open();
  108.  
  109.         return dbMan.getAllForms();
  110.     }
  111.  
  112.     protected void onPostExecute(ArrayList<Form> forms)
  113.     {
  114.         if (forms != null)
  115.         {
  116.             ListActivity act = (ListActivity) mContext;
  117.             act.setListAdapter(new AvaFormAdapter(act, R.layout.ava_list_item, forms));
  118.         }
  119.         else
  120.         {
  121.             TextView errorMsg = (TextView)
  122.                     ((FormsListActivity) mContext).findViewById(R.id.formErrorMsg);
  123.             errorMsg.setText("Problem getting forms. Please try again later.");
  124.         }
  125.         loadingDialog.dismiss();
  126.         if (dbMan != null)
  127.             dbMan.close();
  128.     }
  129. }
  130.        
  131. protected ArrayList<Form> doInBackground(Void... arg0)
  132. {
  133.     dbMan = new DBManager(mContext);
  134.     dbMan.open();
  135.     ArrayList<Form> resutl = dbMan.getAllForms();
  136.     dbMan.close();
  137.     return result;
  138. }