Saturday, November 6, 2010

WGET magic

http://mrhassell.wordpress.com/

wget –referer=”http://www.google.com” –user-agent=”Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6″ –header=”Accept:text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5″ –header=”Accept-Language: en-us,en;q=0.5″ –header=”Accept-Encoding: gzip,deflate” –header=”Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7″ –header=”Keep-Alive: 300″ -dnv -r –html-extension –convert-links http://www.somedomain.com

obviously you should change the http://www.somedomain.com to the relative site that you wish to download. As I’m lead to believe this is basically how Mark Elliot “Zuck” Zuckerberg downloaded the contents of the pictures from Harvard University and started “thefacebook.com” – at least according to the Hollywood side of things, in the move “The Social Network” – this would be the WGET magic mentioned. Enjoy!

Wednesday, June 9, 2010

Linked blogs

http://mrhassell.spaces.live.com/ - strange having a Microsoft blog and a Google blog! Need to look into merging these two with a single post..

Monday, February 15, 2010

"Search For" function SSRS Report Manager.

Unfortunately Microsoft in their wisdom decided that the search box should not be removable easily. It is possible with a little javascript and editing of a few aspx pages.

First we hide the label for the search box. This is easy enough as it is stored in the css file.

  1. Open ReportingServices.css - (C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Styles)
  2. Replace the Label of search box with the css below (basically I am just adding the "display: none" to it)

    /* Label of search box*/
    .msrs-search {
    font-family: Verdana, serif;
    font-size: x-small;
    color: black;
    font-weight: normal;
    text-decoration: none;
    display:
    none;
    }
  3. Use JavaScript to hide the Search textbox and button;

    a. Browse to the folder
    C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Pages (SQL 2008)

    b. Create a new file using notepad (text file)


    function HideSearchPanel()
    {
    var txtSearch= document.getElementById('ui_txtSearch');
    var btnGo= document.getElementById('ui_btnGo');
    if(txtSearch && btnGo)
    {
    txtSearch.style.display = "none";
    btnGo.style.display =
    "none";
    timer=setTimeout(HideSearchPanel,1);
    }
    }
    var timer;
    timer=setTimeout(HideSearchPanel,1);


    c. Save the file with filename HideSearchPanel.js (include the extension name .js)
    d. Now, open the Folder.aspx with notepad, add the following code to this page, and then save this file:



    e. Repeat step ( d ) in other pages such as Report.aspx, DataSource.aspx

    That should do it!