Saturday, April 21, 2007

C# - Using out Access to Parameters

The return type enables you to send back a single variable from a method; however,sometimes you will want more than one value to be returned. Although reference variables could be used to do this, C# has also added a special attribute type specifically for returning data from a method. You can add parameters to your method header specifically for returning values by adding the out keyword. This keyword signifies that a value is being returned out of the method but is not coming in. When you call a method that has an out parameter, you must be sure to include a variable to hold the value being returned. ex: int a,b; public void out_test(x, out y, out z) { y=x+1; z=x+2; } out_test(4, out a, out b);

C# properties - enable "get" and "set" in class

C# provides a concept called properties to enable you to create object-oriented fields within your classes. Properties use the reserved words get and set to get the values from your variables and set the values in your variables. class Point { int my_X; // my_X is private public int x { get { return my_X; } set { my_X = value; } } }

Tuesday, April 17, 2007

Google AutoPager (Greasemonkey)

Firefox with Greasemonkey: AutoPager enables "infinite scrolling" on Google search-results pages.

Typically, when you get to the bottom of a search page, you have to click Next to view the next batch of results. Not so with AutoPager: It fetches and appends the next batch as you scroll down, creating the illusion of infinite scrolling. Obviously you could just increase the number of results that appear when you search, but that makes for longer load times. AutoPager retrieves extra results a page at a time, as needed. Great little script; works like a charm.

Google AutoPager Userscripts.org source

Tuesday, April 10, 2007

Monday, April 9, 2007

10 flagrant grammar mistakes that make you look stupid

Most of them are obvious for me, but it's good to keep them as a note for the future reference.

#1: Loose for lose No: I always loose the product key. Yes: I always lose the product key.

#2: It's for its (or god forbid, its') No: Download the HTA, along with it's readme file. Yes: Download the HTA, along with its readme file.

No: The laptop is overheating and its making that funny noise again. Yes: The laptop is overheating and it's making that funny noise again.

#3: They're for their for there No: The managers are in they're weekly planning meeting. Yes: The managers are in their weekly planning meeting.

No: The techs have to check there cell phones at the door, and their not happy about it. Yes: The techs have to check their cell phones at the door, and they're not happy about it.

#4: i.e. for e.g. No: Use an anti-spyware program (i.e., Ad-Aware). Yes: Use an anti-spyware program (e.g., Ad-Aware).

Note: The term i.e. means "that is"; e.g. means "for example". And a comma follows both of them.

#5: Effect for affect No: The outage shouldn't effect any users during work hours. Yes: The outage shouldn't affect any users during work hours. Yes: The outage shouldn't have any effect on users. Yes: We will effect several changes during the downtime.

Note: Impact is not a verb. Purists, at least, beg you to use affect instead:

No: The outage shouldn't impact any users during work hours. Yes: The outage shouldn't affect any users during work hours. Yes: The outage should have no impact on users during work hours.

#6: You're for your No: Remember to defrag you're machine on a regular basis. Yes: Remember to defrag your machine on a regular basis.

No: Your right about the changes. Yes: You're right about the changes.

#7: Different than for different from No: This setup is different than the one at the main office. Yes: This setup is different from the one at the main office. Yes: This setup is better than the one at the main office.

#8 Lay for lie No: I got dizzy and had to lay down. Yes: I got dizzy and had to lie down. Yes: Just lay those books over there.

#9: Then for than No: The accounting department had more problems then we did. Yes: The accounting department had more problems than we did.

Note: Here's a sub-peeve. When a sentence construction begins with If, you don't need a then. Then is implicit, so it's superfluous and wordy:

No: If you can't get Windows to boot, then you'll need to call Ted. Yes: If you can't get Windows to boot, you'll need to call Ted.

#10: Could of, would of for could have, would have No: I could of installed that app by mistake. Yes: I could have installed that app by mistake.

No: I would of sent you a meeting notice, but you were out of town. Yes: I would have sent you a meeting notice, but you were out of town.

Source

Recover GMail, AOL, Yahoo! or Windows Live Passwords

MessenPass is a free password cracking tool that will easily reveal passwords of your AOL, Yahoo! Messenger, Google Talk, MSN or any other instant messenger clients. Since most messengers (like Google Talk or Yahoo! Messenger) require the same username / password combination to login as the mail account, MessenPass can effectively be used to recover your (or someone else's) Google Account, AOL or Yahoo! Mail password. And it works like a charm. [I was absolutely shocked to see my GMail password on the screen the moment I ran this 47 kb utility] MessenPass works only if you have selected the "Remember Password" setting while logging into your messenger program. It detects the Instant Messenger applications installed on your computer, decrypts the passwords they store, and displays all user name/password pairs in a text or Excel file. This may be a useful but quite dangerous tool as well - it's so small that it can run off your USB drive and requires no installation - imagine while you are on a trip to the pantry for a cup of coffee and anyone can access your login credentials by plugging in the USB drive. The only workaround is to deselect the "Remember password" while starting your IM client. MessenPass doesn't crack Skype or Hotmail passwords yet. Download MessenPass [IM Password Recovery Software] Source

Poor Man's WiFi

http://www.usbwifi.orcon.net.nz
mirror http://www.exe64.com/mirror/wokfi/ (Italy)
Make 2.4GHz parabolic mesh dishes from cheap but sturdy Chinese cookware scoops & a USB WiFi adaptor ! The largest (300mm diam) shows 12-15dB gain (enough for a LOS range extension to 3-5km), costs ~US$5 & comes with a user friendly bamboo handle that suits WLAN fieldwork- if you can handle the curious stares!

List of Google Search Strings for Finding MP3

Note: This info works just great for ebooks as well just change mp3 to pdf, djvu, ps, etc... ---------------------------------------------------------------------- = Index ---------------------------------------------------------------------- 0) Key 1) Directories 2) Xitami Servers 3) Directory Listing 4) Andromeda Servers (depricated) 5) Zina Artists (depricated) 6) Apache mp3 Servers 7) Individual Songs 8 ) Saving Shoutcasts 9) Social Bookmarking

---------------------------------------------------------------------- = Section 0 - KEY ---------------------------------------------------------------------- This are just some definitions I will use below.

[Directory String] can be any of the following : 1) "index of" 2) "last modified" 3) "parent of"

[file type] can be any of the following : 1) "mp3" 2) "shn" 3) "wma"

[mp3 name] can be any of the following : 1) the name of the album in quotes 2) the name of the artist in quotes 3) be daring and leave it blank and have lots of links 4) be creative!

[limitors] 1) -html -htm -php -asp -txt -pls

(inurl:) is optional and may be omitted and in fact most be omitted if not using a search tool other than google.

(intitle:) can be used in place of (inurl:) and has a similar effect again you must be useing google.

(-filetype:txt) adding this to the end of your search string can filter some false positives.

(-playlist) adding this to the end of your search string can filter some false positives.

---------------------------------------------------------------------- = Section 1 - Directories ---------------------------------------------------------------------- These are the most common way that mp3s are stored on the www, you should try these strings first.

String Format : Type 1 : [Directory String] + (inurl:)[file type] + [mp3 name] Type 2 : [Directory String] + (intitle:)[file type] + [mp3 name] Type 3 : [Directory String] + [file type] + [mp3 name] + [limitors]

Example Strings : - intitle:index.of + mp3 + "grandaddy" -html -htm -php -asp -txt -pls - "index of" + "mp3" + "radiohead" -html -htm -php - "index of" + mp3 + "grandaddy" - "index of" + inurl:mp3 + "beatles" -txt -pls - "index of" + intitle:mp3 + beatles - "last modified" + "shn" + "dylan" - "last modified" + inurl:shn + "bob dylan" - "parent of" + inurl:wma + "grandaddy"

Suggestions : - Try (intitle:index.of + "mp3" + "band name" -htm -html -php -asp) first it is usually the most effective.

Another Little Trick: - If you have been getting alot of results on google but the pages don't seem to be there try adding dates and the "apache" string to your search i.e.

- intitle:index.of + mp3 + "grandaddy" -html -htm -php -asp apache feb-2005 - intitle:index.of + mp3 + "grandaddy" -html -htm -php -asp apache 2005

or if you just want a big list of mp3' doing a search like this every month - intitle:index.of + mp3 + -html -htm -php -asp apache mar

or if you want to condense the search try - intitle:index.of + (mp3|ogg) + "grandaddy" -(html|php|asp) +apache mar-2007

---------------------------------------------------------------------- = Section 2 - Xitami Servers ---------------------------------------------------------------------- String Format : Type 1 : "xitami web server" + (inurl:)[file type] + [mp3 name] Type 2 : "xitami web server" + (intitle:)[file type] + [mp3 name]

Example Strings : - "xitami web server" + "mp3" + "radiohead" - "xitami web server" + intitle:shn + "beatles" - "xitami web server" + inurl:mp3 + "magnetic fields"

---------------------------------------------------------------------- = Section 3 - Directory Listing ---------------------------------------------------------------------- String Format : Type 1 : "directory listings" + (inurl:)[file type] + [mp3 name] Type 2 : "directory listings" + (intitle:)[file type] + [mp3 name] Type 3 : "directory listings of" + (inurl:)[file type] + [mp3 name] Type 4 : "directory listings of" + (intitle:)[file type] + [mp3 name]

Example Strings - "directory listings" + "mp3" + "radiohead" - "directory listings" + intitle:shn + "beatles" - "directory listings" + inurl:mp3 + "magnetic fields" - "directory listings of" + "mp3" + "radiohead" - "directory listings of" + intitle:shn + "beatles" - "directory listings of" + inurl:mp3 + "magnetic fields"

---------------------------------------------------------------------- = Section 4 - Andromeda Servers ---------------------------------------------------------------------- String Format : Type 1 : "scott matthews" + andromeda + [mp3 name] Type 2 : "scott matthews" + andromeda + [file type] + [mp3 name] Type 3 : "powered by andromeda" + [mp3 name] Type 4 : "powered by andromeda" + [file type] + [mp3 name] Type 5 : inurl:andromeda.php + [mp3 name] Type 6 : inurl:anromeda.php + [file type] + [mp3 name] Type 7 : "scott matthews" Type 8 : "powered by andromeda" Type 9 : inurl:andromeda.php

Examples : - "scott matthews" + andromeda + "radiohead" - "scott matthews" + andromeda + "mp3" + "fitter" - "powered by andromeda" + "gradaddy" - "powered by andromeda" + "mp3" + "just like women" - inurl:andromeda.php + "shn" - inurl:anromeda.php + "wma" + "dylan" - "scott matthews" - "powered by andromeda" - inurl:andromeda.php

---------------------------------------------------------------------- = Section 5 - Zina Artists ---------------------------------------------------------------------- String Format : Type 1 : "zina artists"

Examples : - "zina artists"

---------------------------------------------------------------------- = Section 6 - Apache mp3 Servers ---------------------------------------------------------------------- String Format : Type 1 : "stream all" + apache + [mp3 name] Type 2 : "stream all" + apache Type 3 : "shuffle all" + apache + [mp3 name] Type 4 : "shuffle all" + apache

Examples : - "stream all" + apache - "stream all" "shuffle all" mp3 - "stream all" + apache + radiohead - "shuffle all" + beatles

---------------------------------------------------------------------- = Section 7 - Individual Songs ---------------------------------------------------------------------- Format : [mp3 name].mp3 -playlist -filetype:txt

Examples : - "ok_computer_live.mp3" -playlist -filetype:txt - "*ok_computer*.mp3" -playlist -filetype:txt - kid*a.mp3 -playlist -filetype:txt

---------------------------------------------------------------------- = Section 8 - Shoutcasts ---------------------------------------------------------------------- 0) Streamripper is a free shoutcast recorder

1) Find a shoutcast that you would like to save.

2) Download and open the .pls file, to discover the stream url File1=http://example.site:80/stream/1074

3) Open up a terminal (DOS or xterm)

4) break up the url into its parts (site,port,locations) so here we have site: example.com port: 80 location: /stream/1074

5) Uset telnet to Send HTTP GET message and redirect output. The request is

prompt$ telnet site port > output.mp3 GET location HTTP/1.0 PRESS_ENTER_KEY PRESS_ENTER_KEY

so in the example abovePublish

prompt$ telnet example.site 80 > output.mp3 GET /stream/1074 HTTP/1.0

---------------------------------------------------------------------- = Section 9 - Social Bookmarking ---------------------------------------------------------------------- Social Bookmarks sites, are site where people can leave links to other interesting sites given a certain "tag." Tags are sort of like search terms and categories combined. Searching anyone of these bookmark sites for the type or music or band you like is almost sure to bring up lots of links to free mp3s. There are two links at the top of this page digg and del.ici.us, I use and there are others. If you do join a site make sure to give me a thanks by adding a link to this site!

Source