US embassy launches gay campaign in Pakistan

US embassy launches gay campaign in Pakistan.

Advertisements

Privacy groups ask US to investigate Facebook

Nine privacy groups have sent a joint letter to the Federal Trade Commission saying it should investigate the ways Facebook collects data about users’ online activity after recent changes to its site.

The Electronic Privacy Information Center, the American Civil Liberties Union and other groups sent the letter to the FTC Wednesday.

The groups say changes Facebook made last week give it far greater ability to disclose users’ personal information to businesses than it used to have.

Facebook users can now consent just once and have applications continuously share on Facebook the music they are listening to or the articles they are reading.

Facebook says that change gives users control over what apps they use and what information is shared.

The letter does not constitute a formal complaint.

How to Jailbreak iOS 5.1 on iPhone 4, iPhone 3GS, iPod Touch 4G, iPod Touch 3G & iPad 1 Using Redsn0w 0.9.10b6

It was only yesterday when Apple has released it’s new , along with Apple TV and iOS 5.1 which enables Japanese Siri for Japan users, and voice dictation for the new  users. Just like other iOS releases, the companyhas patched the security bugs which allowed hackers to publish an untethered jailbreak on iOS 5.

Today, the iPhone Dev Team has released a temporary solution for A4-chip device users and named it as Redsn0w 0.9.10b6, which allows you to jailbreak iOS 5.1 on iPhone 4, iPhone 3GS, iPod touch 4G, iPod touch 3G, and iPad 1. Unfortunately, the jailbreak is currently tethered, which means that you will have to plug-in your device to a PC or Mac and boot tethered once your device switches off for any reason. You can however, apply a semi-tethered patch once the device is jailbroken which will help you to reboot your device without connecting to the Pc or Mac.

Unfortunately, iPhone 4S, iPad 2, and the new iPad users will have to wait since there is no jailbreak solution available for them. If you have mistakenly updated your device on iOS 5.1, then you really can’t do anything except repenting

*Note: It is highly advised to upgrade to iOS 5.1 after preserving your baseband, if you rely on an carrier unlock. To preserve your baseband, open Redsn0w 0.9.10b6 select “Extras -> Custom IPSW” and locate your iOS 5.1 firmwarefile. Please wait and let Redsn0w 0.9.10b6 cook a custom IPSW firmware file for you. Once the custom firmware file is cooked navigate to Extras -> Pwned DFU and restore your device using iTunes.

Let’s get started with how to jailbreak iOS 5.1 on iPhone 4, iPhone 3GS, iPod touch 4G, iPod touch 3G, and iPad 1 using Redsn0w 0.9.10b6. Before you start with this tutorial let me mention that you can jailbreak your device either using a Mac or a Windows computer. We’ve used a Mac to perform this jailbreak, however, the steps on a Windows computer will be exactly the same

Step 1: Download iTunes 10.6 for Windows and Mac OS X.

Step 2: Once the iTunes has been installed, connect your device to the PC or Mac, and backup your device.

Step 3: Download and upgrade your firmware to iOS 5.1.

Step 4: Download Redsn0w 0.9.10b6 for Windows or Mac.

Step 5: Open the Redsn0w 0.9.10b6 and click on the “Jailbreak” button.

Step 6: Read the notice and then follow the steps accordingly, once done, click next.

Step 7: On this screen, you will be asked to put your device into DFU mode. Follow the onscreen instructions, or follow our guide on how to put your device in DFU mode.

Step 8: Next, click on Install Cydia option and press next. Your iPhone will now be rebooted and Redsn0w will begin uploading the new RAM Disk and Kernel. Once the process is completed you will be notified that Redsn0w has finished jailbreaking your device. At this point your device is only jailbroken, but you will still have to boot tethered in order to get working Cydia.

Perform Boot Tethered on iOS 5.1

Step 9: To perform a boot tethered on iOS 5.1, you first need to jailbreak your device by following the aforementioned steps. If you already have jailbroken your device simply open the Redsn0w 0.9.10b6 utility and click on Extras -> Just boot, and put your device into the DFU mode once again. Go through the onscreen steps and your device will be rebooted with working Cydia on your springboard.

Perform Semi-Tethered Jailbreak on iOS 5.1

Step 10: To perform a semi-tethered jailbreak on iOS 5.1 launch Cydia.  Go to Sources -> Edit -> Add and add the following repository.

http://thebigboss.org/semitether

Now simply search for “SemiTether” and install it. Once installed reboot your device, now your device has been successfully semi-tethered jailbroken on iOS 5.1.

 

A big thanks to iPhone Dev Team for updating their utility and making this tutorial ever possible.

 

 

Spice up Your Site With Simple PHP

You Can Learn Interactive PHP!

This incredible book by Robert Plank takes you step by step, teaching you how to:

  • Easily personalize your pages.
  • Make easy .htaccess code for yourself.
  • Code games, quizzes & other lead-building tools.
  • Create an autoresponder.
  • Mix JavaScript with PHP for a powerful combination.
click the link below :

 

What is Static and Dynamic binding in Java with Example

Static and dynamic binding  in Java are two important concept which Java programmer should be aware of. this is directly related to execution of code. If you have more than one method of same name (method overriding) or two variable of same name in same class hierarchy it gets tricky to find out which one is used during runtime as a result of there reference in code. This problem is resolved using static and dynamic binding in Java. For those who are not familiar with binding operation, its process used to link which method or variable to be called as result of there reference in code. Most of the references is resolved during compile time but some references which depends upon Object andpolymorphism in Java is resolved during runtime when actual object is available. In this Java tutorial we will see some examples of static and dynamic binding and differences between static binding and dynamic binding in Java.

public class StaticBindingTest {

public static void main(String args[])  {
Collection c = new HashSet();
StaticBindingTest et = new StaticBindingTest();
et.sort(c);

}

    //overloaded method takes Collection argument
public Collection sort(Collection c){
System.out.println(“Inside Collection sort method”);
return c;
}

   //another overloaded method which takes HashSet argument which is sub class
    public Collection sort(HashSet hs){
System.out.println(“Inside HashSet sort method”);
return hs;
}

}

Output:
Inside Collection sort method

App Coder–Learn How to Program Your Own Android Apps

Video Training And Source Code To Create Your Own Ebook App. Learn How To Program Your Own Android Apps You Can Convert Your Ebooks Into An App For The Android Marketplace.

To purchase this product click the following link :

http://cc553-cap6tp4rbjnnbj2ano89.hop.clickbank.net/

What is Encapsulation in Java and OOPS with Example

Encapsulation in Java or object oriented programminglanguage is a concept which enforce protecting variables, functions from outside of class, in order to better manage that piece of code and having least impact or no impact on other parts of program duec to change in protected code.Encapsulation in Java is visible at different places and Java language itself provide many construct to encapsulate members. You can completely encapsulate a member be it a variable or method in Java by using private keyword and you can even achieve a lesser degree of encapsulation in Java by using other access modifier like protected orpublic. true value of encapsulation is realized in an environment which is prone to change a lot and we know that in software requirements changes every day at that time if you have your code well encapsulated you can better manage risk with change in requirement. Along withabstaction in java and polymorphism in Java, Encapsulation is a must know concept. In this java tutorial  we will see How to use encapsulation in Java, advantage and disadvantage of Encapsulation and various design patterns and real life problems which makes use of Encapsulation object oriented concept. If you are looking for a quick guide on both OOPS and SOLID design principle in Java than you may find 10 Object Oriented Design principles Java programmer should know  interesting.

What is Encapsulation in Java

Encapsulation is nothing but protecting anything which is prone to change. rational behind encapsulation is that if any functionality which is well encapsulated in code i.e maintained in just one place and not scattered around code is easy to change. this can be better explained with a simple example of encapsulation in Java. we all know that constructor is used to create object in Java and constructor can accept argument. Suppose we have a class Loan has a constructor and than in various classes you have created instance of loan by using this constructor. now requirements change and you need to include age of borrower as well while taking loan. Since this code is not well encapsulated i.e. not confined in one place you need to change everywhere you are calling this constructor i.e. for one change you need to modify several file instead of just one file which is more error prone and tedious, though it can be done with refactoring feature of advanced IDE wouldn’t it be better if you only need to make change at one place ? Yes that is possible if we encapsulate Loan creation logic in one method say createLoan() and client code call this method and this method internally crate Loan object. in this case you only need to modify this method instead of all client code.
class Loan{
private int duration;  //private variables examples of encapsulation
private String loan;
private String borrower;
private String salary;
    //public constructor can break encapsulation instead use factory method
private Loan(int duration, String loan, String borrower, String salary){
this.duration = duration;
this.loan = loan;
this.borrower = borrower;
this.salary = salary;
}
    //no argument consustructor omitted here
// create loan can encapsulate loan creation logic
    public Loan createLoan(String loanType){

//processing based on loan type and than returning loan object

      return loan;
    }
}
In this same example of Encapsulation in Java you see all member variables are made private so they are well encapsulated you can only change or access this variable directly inside this class. if you want to allow outside world to access these variables is better creating a getter and setter e.g. getLoan() that allows you to do any kind of validation, security check before return loan so it gives you complete control of whatever you want to do and single channel of access for client which is controlled and managed.

Advantage of Encapsulation in Java and OOPS

Here are few advantages of using Encapsulation while writing code in Java or any Object oriented programminglanguage:
1. Encapsulated Code is more flexible and easy to change with new requirements.
2. Encapsulation in Java makes unit testing easy.
3. Encapsulation in Java allows you to control who can access what.
4. Encapsulation also helps to write immutable class in Java which are a good choice in multi-threading
environment.
5. Encapsulation reduce coupling of modules and increase cohesion inside a module because all piece of one thing
are encapsulated in one place.
6. Encapsulation allows you to change one part of code without affecting other part of code.
What should you encapsulate in code
Anythign which can be change and more likely to change in near future is candidate of Encapsulation. This also helps to write more specific and cohesive code. Example of this is object creation code, code which can be improved in future like sorting and searching logic.

Design Pattern based on Encapsulation in Java

Many design pattern in Java uses encapsulation concept, one of them is Factory pattern which is used to create objects. Factory pattern is better choice than new operator for creating object of those classes whose creation logic can vary and also for creating different implementation of same interface. BorderFactory class of JDK is a good example of encapsulation in Java which creates different types of Border and encapsulate creation logic ofBorder. Singleton pattern in Java also encpasulate how you create instance by providing getInstance() method. since object
is created inside one class and not from any other place in code you can easily change how you create object without
affect other part of code.

Important points above encapsulation in Java.

1. “Whatever changes encapsulate it” is a famous design princple.
2. Encapsulation helps in loose coupling and high cohesion of code.
3. Encpasulation in Java is achieved using access modifier private, protected and public.
4. Factory pattern , Singleton pattern in Java makes good use of Encapsulation.