Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

26 Apr 2011

Inviting all friends to a Facebook event

Selecting all Facebook contacts one by one before sending an invitation to an event takes a big effort and large doses of patience.

After a quick google powered search for some insight on the procedure I came up with this little script which does the trick of selecting all the contacts for you.

This involves three simple steps:


  1. Open the contacts dialog 'Select guests to invite'
  2. Scroll to the bottom of the contacts list to make sure all contacts are loaded
  3. Copy and paste this javascript code to your browser's location toolbar

javascript:(function(){
  var elms=document.getElementsByName("checkableitems[]");
  for(var count=0;count<elms.length;count++){
   elms[count].click();
   var d = new Date();
   var n;
   var diff = 0;
   while(diff < 10) {n = new Date(); diff = n.getTime()- d.getTime();}
  }
})();

  1. Hit enter and wait for the code to execute and select all your contacts. Note that it takes approximately 1 second for each 100 contacts in your list.
  2. Click on the 'Submit' button and all your Facebook friends will receive the event invitation

This code was verified to work with Firefox and Chrome web browsers with Facebook actual version.

19 Nov 2009

Access restriction error on Eclipse - type resouce not accessible

Mounting an old project on a fresh install of Eclipse I got a few errors regarding access restriction to some methods and types from Sun's java 6 library.


Description Resource Path Location Type
Access restriction: The method createJPEGEncoder(OutputStream) from the type JPEGCodec is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 43 Java Problem

Description Resource Path Location Type
Access restriction: The method encode(BufferedImage) from the type JPEGImageEncoder is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 45 Java Problem

Description Resource Path Location Type
Access restriction: The type JPEGCodec is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 16 Java Problem

Description Resource Path Location Type
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/rt.jar ImageCaptchaServlet.java «path» line 17 Java Problem




This situation can be solved as follows:

1 - Goto to the Java Compiler section of the Project Properties dialog and then Errors and Warnings.
2 - Check Enable project specific settings
3 - Inside Deprecated and restricted API change the Forbidden reference (acess rule) to Warning or Ignore
Enhanced by Zemanta