oldSoftDev -3 Junior Poster in Training

That post didnt help but thanks!

oldSoftDev -3 Junior Poster in Training
 Private networkAvailableEventHandler As NetworkAvailableEventHandler = AddressOf NetworkConnectionChanged

 Private Sub NetworkConnectionChanged(sender As Object, e As NetworkAvailableEventArgs)
        If Not disposed Then
            OnPropertyChanged("IsNetworkAvailable")
        End If
 End Sub

 Dim disposed As Boolean = False
    Public Overloads Sub Dispose() Implements IDisposable.Dispose
        Dispose(True)
        MyBase.Dispose()
        GC.SuppressFinalize(Me)
    End Sub

    Protected Overridable Overloads Sub Dispose(disposing As Boolean)
        If disposed = False Then
            If disposing Then
                RemoveHandler My.Computer.Network.NetworkAvailabilityChanged, networkAvailableEventHandler
                networkAvailableEventHandler = Nothing
                disposed = True
            End If
        End If
    End Sub

    Protected Overrides Sub Finalize()
        Dispose(False)
    End Sub

I have something close to above, my problem is, even after disposing the whole object the EventHandler invoke the NetworkConnectionChanged method even after removing the address.

any clues?

oldSoftDev -3 Junior Poster in Training

Hey guys,
I am trying to use TextInputPanel for passwordbox but since its part of WPF it does not allow us to use TextInputPanel. I followed the following link

http://interactiveasp.net/blogs/natesstuff/archive/2008/10/01/ink-in-wpf-using-textinputpanel-for-text-input.aspx

this works fine with the textbox but not with passwordbox, I modified the class to accept password boxes but when I focus on the passwordbox the TextPanelInput icon does not appear, can anyone help?

oldSoftDev -3 Junior Poster in Training

that is great if you could explain the logic in words? I know for loop is simple for loop that is just iterating through the list until the end, then if prev is not equal d then check if prev? what is that if doing? Thanks

oldSoftDev -3 Junior Poster in Training

this is third time I am trying to post,

can you explain

if prev != d:
    if prev:
        print prev, count
    prev = d
    count = 0
count += 1

how that is working?

oldSoftDev -3 Junior Poster in Training

I guess this would explain better, following is my output that is printing each element in the list and printing the count of the element its working fine if you see 2.0 just had one occurance and so it was printed with 1 and rest of that had more occurances they were printed with their count. What I want is to keep the count same but instead of printing duplicates just print one unique

2.0 1     2.2 3     2.2 3     2.2 3    2.3 4    2.3 4    2.3 4    2.3 4    2.4 3    2.4 3    2.4 3    2.5 8    2.5 8    2.5 8    2.5 8    2.5 8    2.5 8    2.5 8    2.5 8    2.6 5    2.6 5    2.6 5    2.6 5    2.6 5

desired output 

2.0 1     2.2 3     2.3 4    2.4 3   2.5 8    2.6 5
oldSoftDev -3 Junior Poster in Training

I am reading from a file and creating two lists, then sorting them after sorting I am trying to compare each elements number of occurances in a list but printing them with that number for example if a list is something like {1,2,3,3,3,5,5,5,6} then I want to print a report like 1 count =1 2 count =1 3 count = 3 5 count = 5 6 count =6.

this is what I have so far just one small thing I need to get it done.

def main():
    data = open("Iris.csv",'rU')
    petalWidths = []
    sepalWidths = []
    for line in data:
        line =  line.split(',')
        sepalWidths.append(line[1])
        petalWidths.append(line[3])
    sepalWidths.sort()
    checkForWidthCount(sepalWidths)
    petalWidths.sort()
    print sepalWidths

##        print petalWidths

def checkForWidthCount(mylist):


    for x in range(0,len(mylist)-1):
            count = 0
            for y in range (0,len(mylist)-1):

                    if mylist[x] == mylist[y]:
                            count+=1
                    else:
                            y+=count

            #x+=count                                
    print mylist[x],count

main()
oldSoftDev -3 Junior Poster in Training

Hey guys,

I am setting my viewmodel as datacontext in my xaml but I override it to my view to make few functions work however to achieve the visibility on some grids and I have a property in my VM can I override my datacontext back to my VM? If so how? I have a stackpanel that has datacontext overriden as my grid and within that stackpanel I need to change the datacontext for a button.

Any help will be appreciated thanks

oldSoftDev -3 Junior Poster in Training

She does not know anything about it someone created the site for her, can you specify how can I change the permlink type and turn the rewrite on?
I believe .htaccess is something that should be created automatically? correct me please if I am wrong.

oldSoftDev -3 Junior Poster in Training

Hey guys,
Recently a friend of mine asked me to help her with her magazine website. I gave this website a look and figured out that it might be that tabs are not directing to the right URL or there are some files missing from the server. I have never worked on PHP before and therefore I have no clue whatsoever, where to start from? I need help

website is http://www.pakistanzindabad.pk
please help me

oldSoftDev -3 Junior Poster in Training

What programming language?

Android is java based

Nick Evan commented: Yeah, I got that from the post made above yours. 3 months ago... -3
oldSoftDev -3 Junior Poster in Training

I am new to android and just set up my SDK etc. but there are not much examples available for creating an android game. can you guys help me how should I start?

oldSoftDev -3 Junior Poster in Training

Hi guys,
I am planning to jump into android development and also into Game development for now I am planning to develop a Battleship game can you guys help me out how to start and develop from scratch.

Any help would be appreciated thanks

oldSoftDev -3 Junior Poster in Training

Hi Guys does anyone here ever used apache Ivy. I need help here, I am a newbie in Ivy and trying to set up local repository and apache website is not useful at all.

oldSoftDev -3 Junior Poster in Training

Seems that p.getEmployees() is returning a List. You will have to iterate that list and than use the getName() method for each 'Employee' object in the list

Thanks man I got it :D

[code=java]for(Object object : result){
				Project p = (Project) object;
				System.out.print(p.getName()+" worked on by ");
				Iterator itr = p.getEmployees().iterator();
				if(!(itr.hasNext())){
					System.out.print("no employees.");
				}
				while(itr.hasNext()){
					Employee emp = (Employee) itr.next();
					System.out.print(emp.getName()); 
					if (itr.hasNext()){
						System.out.print(", ");
					}
				}
				System.out.println(); 
			}
oldSoftDev -3 Junior Poster in Training
[code=java]import java.util.*;
import java.util.Scanner;
import java.io.*;

public class ListList{

	public static void main(String [] args){

		LinkedList ll = new LinkedList();	
		Scanner in = new Scanner(System.in);
		int n = 0;
		while (!(n<0)){
			System.out.println("Enter a number: ");
			n = in.nextInt();

			ll.add(n);
		}
		System.out.println(ll);

	}
}

Try this and tell me if that is what you are trying to do.

oldSoftDev -3 Junior Poster in Training
List result = q.list();
		if (result.isEmpty()){
			System.out.println("No Projects");
		}
		else{
			for(Object object : result){
				Project p = (Project) object;
				System.out.println(p.getName()+" worked on by "+p.getEmployees().getName());
			}
		}

error :
CompanyReports.java:303: cannot find symbol
symbol : method getName()
location: interface java.util.List<Employee>
System.out.println(p.getName()+" worked on by "+p.getEmployees().getName());
^
1 error

Can anyone help what is my stupid mistake here? And how can I deal with it?

oldSoftDev -3 Junior Poster in Training
/**
     * Displays a report listing all companies that have no departments.
     */
    public void displayCompaniesWithoutDepartments() {
        System.out.println("---- All Companies Without Departments ----");
		Session session = sessions.getCurrentSession();
		session.beginTransaction();
		Query q = session.createQuery("from Company c where c.id not in (select d.company from Department d)");
		List result = q.list();
		for (Object object : result){
			Company company = (Company) object;
			System.out.println(company.getName());
			
		}
		session.getTransaction().commit();
        
    }

Stupid me I was using wrong Query but it took me long to figure it out.

oldSoftDev -3 Junior Poster in Training

Hi everybody,

I'm trying to write a function that takes in 2 values, a min and a max, that prompts the user to enter a value within that range, and uses 0 as a sentinel to quit the loop.

My issue is, I also want the loop to continue prompting the user when the user enters nothing (i.e. hits enter) until a value between the range is entered. How do I go about doing this with the code I have already written? Thanks!

def getValidNum(min, max):
    QUESTION = "Enter a value, 0 to quit: "

    num = input(QUESTION)

    while num != 0:
        if num in range(min, max + 1):
            return num    
        else:
            print("Sorry %d - %d or 0 only") % min, max
            print("Try again.")
            num = input(QUESTION)

try using a Boolean variable and put it in condition of while when you want to break the loop say it false and when you think it should keep running say it true.
something like

flag = True
while num != 0 and flag

then you can also use flag to control your loop

oldSoftDev -3 Junior Poster in Training

I am having trouble figuring out how to read input from the keyboard and inserting that into a LinkedList. Any help or suggestions would be greatly appreciated.

import java.util.*;
import java.util.Scanner;
import java.io.*;

public class listlist{

        public static void main(String [] args){
                 
             LinkedList ll = new LinkedList();
             Scanner in = new Scanner(System.in);
             System.out.println("Enter a number: ");
             int n = in.nextInt();

             ll.add(n);

        }
}

I think your program is working fine it is adding number to the linked list if you want to add more than one number try using some sort of loop.
if you are trying to do something else let me know.

oldSoftDev -3 Junior Poster in Training

hi I am working on HQL queries and writing an application in Java it is just in development phase so I am using a dummy database.
But I am having troubles with displaying result using HQL queries.

/**
     * Displays a report listing all companies that have no departments.
     */
    public void displayCompaniesWithoutDepartments() {
        System.out.println("---- All Companies Without Departments ----");
        Session session = sessions.getCurrentSession();
        session.beginTransaction();
        Query q = session.createQuery("select comp.id , comp.name from Department as dept left outer join dept.Company as comp");
        List result = q.list();
        for (Object object : result){
            Company company = (Company) object;
            System.out.println(company.getName());

        }
        session.getTransaction().commit();
        // Finish this
    }

I know some part of my function is incorrect but at first the query is not running it self I have search on google It seems to be in the right order but I dont understand what is the problem.

I get this error

Error: could not resolve property: company_id of: Department

when department has many to one relation ship with Company.

oldSoftDev -3 Junior Poster in Training
int a = 4, b = 3;
String code = "a*b+a+2*b";
int result = unknown_function(code);
System.out.println(result);//expecting 22

Any ideas how to do that please?

if you can post ur full code it will help better.

oldSoftDev -3 Junior Poster in Training

Please if you could put your code here it will be really helpful for me to understand along with the errors messages thanks

oldSoftDev -3 Junior Poster in Training

I am considering your suggestion but I am going step by step first I am trying to learn how to handle arrays and how to handle the entries of array then I will surely go for Object Orientation.

oldSoftDev -3 Junior Poster in Training

i tried something similar in python it worked for me now its not working for me here is what i triend in python

def main():
    p=["12. My name is Furqan by Awesome Publisher"]
    name=p[0]
    i=0
    temp=""
    while (name[i]!="."):
        temp=temp+name[i]
        i+=1
    print temp
main()

it worked for me but is not working in java may be its different way to do it in java

oldSoftDev -3 Junior Poster in Training
public static int Rank(String line)
	{
        String [] ArrayEntry=new String[200];
		ArrayEntry[0]=line;
		int lineCounter=0;
		String tempRank="";

		while(!ArrayEntry[lineCounter].equals("."))
		{
			tempRank+=ArrayEntry[lineCounter];
			lineCounter++;
		}
		int rank = Integer.valueOf(tempRank).intValue();
		return rank;
	}

I am totally confused now its saying no error but not working

oldSoftDev -3 Junior Poster in Training

ok I admit its wrong because according to my problem it wont work for name and sports
it will become complicated but do comment on this method

oldSoftDev -3 Junior Poster in Training
public int Rank(array[counter])
	{
		String ArrayEntry=line[counter];
		int lineCounter=0;
		String tempRank="";

		while(!ArrayEntry[lineCounter].equals("."))
		{
			tempRank+=ArrayEntry[lineCounter];
			lineCounter++;
		}
		int rank = Integer.valueOf(tempRank).intValue();
		return rank;
	}

I tried this as a method to retrieve rank from the line but it is giving me bunch of errors
help me out i know it wont work without array but tell me if my syntax and logic is correct

oldSoftDev -3 Junior Poster in Training

First of all loop through the existing array like you are already doing and try to "extract" the 3 values from each element. Write separate methods for that.After you are successful you can create 3 arrays and put these inside with each loop:

String [] name = new String[i]; //remember the "i" ?
....
for(int counter=0;counter<i;counter++) {
 System.out.println(LineArray[counter]);
 
  name[i] = getName(LineArray[counter]);
 ...
}

The getName(LineArray[counter]); will take as argument the element of the array and return the name. You will have other methods for the "sport" and the "rank".

The best way is to create an object "Athlete" with attributes name, rank, sport and have a method that takes as argument the element of the array and return that object. Then you will put that in an array of "Athlete" objects. If you are not familiar with that leave for now

It certainly looks difficult to me but I can give it a try and if I had any problem I will post here ... by the ways thanks for helping so far I really appreciate what I am learning through you...

oldSoftDev -3 Junior Poster in Training

now can you help me determining how to split this array and save the ranking and name and sports in separate arrays.

oldSoftDev -3 Junior Poster in Training

well about the counter and for loop I was just checking if everything is going in the array or not I will remove it when my actual goal is achieved.

oldSoftDev -3 Junior Poster in Training
[code=java]package Test;
import java.io.*;
public class MainTest{

	public static void main(String[] args){

		String [] LineArray=new String[201];
		BufferedReader read = null;
		try
		{
			read = new BufferedReader(new FileReader("filename"));
			String lineRead=read.readLine();
            //lineRead=lineRead.split(".");
			int i=0;

			while (!(lineRead.equals(null)) && (i<LineArray.length))//lineRead !=null did not work
			{
				//System.out.println(lineRead);
				LineArray[i]=lineRead;
				i++;
				lineRead=read.readLine();
			}for(int counter=0;counter<LineArray.length;counter++)
				System.out.println(LineArray[counter]);
		}catch (IOException e)
		{
			System.out.println(e.getMessage());
		}finally
		{
			try
			{
				if (!(read.equals (null))) read.close();
			}catch (IOException e)
			{
				System.out.println(e.getMessage());
			}
		}
	}
}

here I fixed it now, now I have to break each entry in three parts ranking name and sports

oldSoftDev -3 Junior Poster in Training

Thank you very much sir I really appreciate your help but I was trying to play with it i know i made some mistake but I did not wanted to copy your code so I tried to write a similar one I am so confused I have a exam coming and professor said he will ask us to write a code to manipulate arrays selection sort and I dont know anything neither he taught anything I know what I did was stupid but I am learning and again really appreciate your help...

oldSoftDev -3 Junior Poster in Training

well I took your Idea and just doing an extra thing that it reads the line and add it to array now I cleaned up my code here it is

[code=java]
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



import java.io.*;
public class Main{

	public static void main(String[] args){
		BufferedReader read=null;
        String[] line=new String[205];
		try{

			read
			= new BufferedReader(new FileReader("filename"));
			String test= read.readLine();
            
            int i=0;
            
			while (line != null ){
                //System.out.println(test);
                if (test.equals("")){
                    test=read.readLine();
                }
                else{
                    line[i]=test;
					i++;
                    System.out.println(line[i]);
                }

                    
			}//while (in.readLine()!=null);
		}catch (IOException e)
        {
             // Some problem reading the data from the input file.
            System.out.println("Input Error: " + e.getMessage());
        }finally {

            try {
                if (read!=null) read.close();
            }catch(Exception e) {
                System.out.println("Input Error: " + e.getMessage());
        }

        }


	}

}
oldSoftDev -3 Junior Poster in Training
[code=java]
import java.io.*;
public class MainTest{
	
	public static void main(String[] args){
		BufferedReader read=null;
        String[] line=new String[201];
		try{
			
			read 
			= new BufferedReader(new FileReader("filename"));
			String test = read.readLine();
            //line[0]=test;
            //System.out.println(line[0]);
            int i=0;
			while (test!=null ){//&&(i<line.length)){//do{
				
                    test=read.readLine();
                    line[i]=test;
					i++;
                    System.out.println(line[i]);
			}//while (in.readLine()!=null);
		}catch (IOException e)
        {
             // Some problem reading the data from the input file.
            System.out.println("Input Error: " + e.getMessage());
        }finally{
			try{
				if (read!=null) read.close();
			}catch (IOException e){
				System.out.println(e.getMessage());}
		}
        
		
	}

}

I have tried couple of things now I am dealing two types of error one is out of bounds and other one is its giving me only nulls.

oldSoftDev -3 Junior Poster in Training
BufferedReader reader = null;
try {
    reader = new BufferedReader(new FileReader("fileName"));
    String line = reader.readLine();
    while (line!=null) {
        System.out.println("The Line is: "+line);

        // do calculations with line

         line = reader.readLine();
    }
} catch (Exception e) {

} finally {
  if (reader!=null) reader.close();
}

If you are unfamiliar with using arrays, I would suggest to concentrate on that first, before going to write the code for reading from the file. Once you have understood the arrays very well, you may proceed.

I got this error when I tried the code
MainTest.java:31: unreported exception java.io.IOException; must be caught or declared to be thrown
read.close();

oldSoftDev -3 Junior Poster in Training

ok I will try.. thanks

oldSoftDev -3 Junior Poster in Training

I have never used arrays in Java, although I used them in Python but whatever u wrote up there i understand some of it because I have reading lots of blogs and online articles about java arrays.
and about the line problem my file is formatted in this way
1. JOHN CARTER in Sprint Race.

oldSoftDev -3 Junior Poster in Training

I am trying to figure out how to read a multi line txt file with a data like ranking, athlete name and Athletic sports name with two different year records like 2007 and 2008

like
1. JOHN CARTER in Sprint Race
19. JOHN CARTER in Sprint Race

I am trying to strip three things a part ranking in 2d array, 2d name array with first name and last name separated and event name.

lets say first 50 athletes ranking for 2007 and 2008 goes like this
1.
2.
3.
4.
.
.
.
.
50.
1.
2.
3.
4.
.
.
.
.
.50
I am totally lost I read couple of articles dealing with reading from from txt file articles and creating arrays but could not do extract anything fruitful.

oldSoftDev -3 Junior Poster in Training

here you go for odd and even values u can modify this code for largest and smallest.

[code=python]
Even=[]
Odd=[]
def IsEven(a):
    even=False
    while not even:
        calculate=a%2
        if calculate==0:
            even=True
        return even
    
def find_Even():
    for val in range (1,50):
        found_Even=IsEven(val)
        if found_Even==True:
            Even.append(val)
        else:
            Odd.append(val)

def output():
    print "\t\t\t  THE EVEN NUMBERS ARE\n"
    count=0
    while count<len(Even):
        print "%3i"%Even[count],"\t",
        count+=1
  
    print"\n"
    print "\t\t\t  THE ODD NUMBERS ARE\n"
    i=0
    while i<len(Odd):
        print "%3i"%Odd[i],"\t",
        i+=1
find_Even()
output()
oldSoftDev -3 Junior Poster in Training

oh well Thanks I got it actually I was calling wrong get method to read last point I needed to call
data.getlnDouble();
thanks

oldSoftDev -3 Junior Poster in Training

so any suggestions do I have to get all values as string and then change them as float or double???

oldSoftDev -3 Junior Poster in Training
[code=python]
import string
S = raw_input("Enter Sentence: ")
countSpace=string.count(S," ")
countTotal= len(S)
totalCharacter=countTotal-countSpace
print totalCharacter

you can also try this

oldSoftDev -3 Junior Poster in Training

I am trying to read some numerical values from a file and getting this error:
Input Error: Error in input: Floating point number not found.; Expecting Real number in the range -1.7976931348623157E308 to 1.7976931348623157E308

[code=java]
import java.io.*;
public class TriangleMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        TextReader data;
        
        //String name;
        double x1,y1,x2,y2,x3,y3;

      try 
      {  // Create the input stream.
         data = new TextReader(new FileReader("points.txt"));
      }
      catch (FileNotFoundException e) {
         System.out.println("Can't find file points.txt!");
         return;  // End the program by returning from main().
      }
      try {
      
          // Read numbers from the input file and print them out
          
          while ( data.eof() == false ) {  // Read until end-of-file.
             //name=data.getWord();
             x1 = data.getDouble();
             y1 = data.getDouble();
             x2 = data.getDouble();
             y2 = data.getlnDouble();
             x3 = data.getlnDouble();
             y3 = data.getlnDouble();
             System.out.println("The end points are ("+x1+", "+y1+") and ("+x2+", "+y2+")");//) and ("+x3+", "+ y3+")");
          }
       
       }
       catch (IOException e) {
             // Some problem reading the data from the input file.
          System.out.println("Input Error: " + e.getMessage());
       }

        
    }

}

txt file is attached with this thread.

oldSoftDev -3 Junior Poster in Training
[code=java]

import java.io.*;
public class LineMain
{
     public static void main(String[] args)
     {
        // TODO code application logic here
         TextReader data;

         double x1,y1,x2,y2;//declaring variables
         try//use try catch to avoid FileNotFound error
         {  // Create the input stream.
         data = new TextReader(new FileReader("points.txt"));
         }
         catch (FileNotFoundException e)
         {
         System.out.println("Can't find file points.txt!");
         return;// End the program by returning from main().
         }
         try {

          // Read numbers from the input file and print them out
          
          
       
             x1 = data.getDouble();
             y1 = data.getDouble();

             Point p1=new Point(x1,y1);// create point object

             x2 = data.getDouble();
             y2 = data.getlnDouble();

             Point p2=new Point(x2,y2);// create point object

             LineSeg seg1=new LineSeg(p1,p2);// create line object
             System.out.println("The end points of line 1 are ("+seg1.getPoint1().getX()+","+seg1.getPoint1().getY()+") and ("+seg1.getPoint2().getX()+","+seg1.getPoint2().getY()+")");
             System.out.println("The length of line segment 1 is: "+seg1.getLength());
             System.out.println("The Slope of line segment 1 is: "+seg1.getSlope());
             System.out.println();
             x1 = data.getDouble();
             y1 = data.getDouble();

             Point p3=new Point(x1,y1);// create point object

             x2 = data.getDouble();
             y2 = data.getlnDouble();

             Point p4=new Point(x2,y2);// create point object

             LineSeg seg2=new LineSeg(p3,p4);// create line object
             System.out.println("The end points of line 2 are ("+seg2.getPoint1().getX()+","+seg2.getPoint1().getY()+") and ("+seg2.getPoint2().getX()+","+seg2.getPoint2().getY()+")");
             System.out.println("The length of line segment 2 is: "+seg2.getLength());
             System.out.println("The Slope of line segment 2 is: "+seg2.getSlope());
             
             System.out.println();

             x1 = data.getDouble();
             y1 = data.getDouble();

             Point p5=new Point(x1,y1);// create point object

             x2 = data.getDouble();
             y2 = data.getlnDouble();

             Point p6=new Point(x2,y2);// create point object

             LineSeg seg3=new LineSeg(p5,p6);// create line object
             System.out.println("The end points of line 3 are ("+seg3.getPoint1().getX()+","+seg3.getPoint1().getY()+") and ("+seg3.getPoint2().getX()+","+seg3.getPoint2().getY()+")");
             System.out.println("The length of line segment 3 is: "+seg3.getLength());
             System.out.println("The Slope of line segment 3 is: "+seg3.getSlope());
             System.out.println();
             
             System.out.println("Now we have the slope …
oldSoftDev -3 Junior Poster in Training

i think this works fine and i tried it removing str before (m) and it worked to so i can say its good do you have any question?

oldSoftDev -3 Junior Poster in Training

your while loop is keep on going I give a value or not it keep on going but I am not sure what kind of help you are seeking can you explain ?

oldSoftDev -3 Junior Poster in Training

thanks man I am going to try that just tell me if I am on right track

oldSoftDev -3 Junior Poster in Training

back again
now I am creating the LineEquation class please help me out

[code=java]
public class LineEquation
{
    private double slope;
    private double x;
    private double y;
    private double x1;
    private double y1;
    
    public LineEquation(double slope,double x,double y,double x1,double y1){
            
        this.slope=slope;
        this.x=x;
        this.y=y;
        this.x1=x1;
        this.y1;
    
    }









} //End of class

here is my LineSegment class

public class LineSeg{

  // these are the attributes of a LineSeg object
    private Point end1;
    private Point end2;
    private double length;
    private double slope;
  

    // the constructor
    public LineSeg(double x1, double y1, double x2, double y2) {

        end1 = new Point(x1,y1);
        end2 = new Point(x2,y2);
        this.length = length;
        length=Math.sqrt((Math.pow(x2-x1,2))+(Math.pow(y2-y1,2)));
        
    }
    public double Slope(double x1, double y1, double x2, double y2){
        
        slope= (double)(y2-y1)/(x2-x1);
        
        return slope;
    
    }
    public double getLength(){
        
        return length;
    }
    
    //public double EquationLine(double slope,double x1,double y1,double x,double y){
    //}
    
}
oldSoftDev -3 Junior Poster in Training

you can also do like this:

a=0
b=0
c=0
d=0

if not(a==0 and b==0 and c==0 and d==0):
    print "go home"
else:
    print "come here"