You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Jason Wyatt <jw...@itree.com.au> on 2005/05/20 03:24:00 UTC

mail archive

Hi,
 
I noticed that I started getting spam a couple of weeks ago on my "work"
email account, for the first time in three years of using that work email
address. 
 
The reason is, I "only" use this email address for work, not normally for
anything else such as online registrations etc. I use a ''junk" hotmail
accout for online forms. It's been successful at preventing spam on the work
email account up until now.
 
So I did a google search for the work email address, and the only hits it
came up with were from the mail archive this list goes into:
 
<http://www.google.com.au/url?sa=U&start=3&q=http://mail-archives.eu.apache.
org/mod_mbox/xml-rpc-user/200301.mbox/%253CHNEDKACOGHCDHBFFIAHDKEGFCGAA.jwya
tt%40itree.com.au%253E&e=10313>
mail-archives.eu.apache.org/mod_mbox/xml-rpc-user/... 
 
I didn't realise the list was archived, so that was my own mistake... just
thought others might want to know.
 
Kind regards
Jason
 
 
--
Falun Gong: A peaceful meditation practice under persecution in China
http://www.faluninfo.net

Truth - Compassion - Forbearance


Re: String compare

Posted by Adam Taft <ad...@hydroblaster.com>.
You're not comparing strings with the == (equality) operator, are you??

You'll always get false this way since you're comparing two different 
string objects (with the same string value).

Try, the equals() method on your strings.  Ie.

System.out.println(mediaData.getMediaName().equals(name));


Indra Syafruddin wrote:
> I tried to compare two String, one comes from parameter that is sent via 
> xmlrpc, one comes from arraylist data.
> 
> Both String have exactly same data. But why the comparation value return 
> false??
> 
> import java.util.*;
> 
> public class ListMedia {
> 
>  private MediaData mediaData;
> 
>  private MediaData[] listData;
> 
>  private List list = new ArrayList();
> 
>  public ListMedia() {
>   this.createMediaList();
>   mediaData = getMediaData("test.avi");
>   System.out.println(mediaData.getMediaName());
>  }
> 
>  private void createMediaList() {
>   mediaData = new MediaData("Nyoba.avi", "c:/fans/Nyoba.avi", "video",
>     "audio");
>   list.add(mediaData);
> 
>   mediaData = new MediaData("test.avi", "c:/fans/test.avi", "videoTest",
>     "audioTest");
>   list.add(mediaData);
> 
>   mediaData = new MediaData("testjuga.avi", "c:/fans/test.avi",
>     "videoTest", "audioTest");
>   list.add(mediaData);
>  }
> 
>  public void addMediaList(String name, String url, String video, String 
> audio) {
>   mediaData = new MediaData(name, url, video, audio);
>   list.add(mediaData);
>  }
> 
>  public void removeMediaList(Iterator i) {
>   i.remove();
>  }
> 
>  public MediaData getMediaData(String name) {
>   System.out.println("name = " + name);
>   ListIterator i = list.listIterator();
>   for (int no = 0; i.hasNext();) {
>    mediaData = (MediaData) i.next();
>    System.out.println(mediaData.getMediaName() + " = " + name);
>    System.out.println(mediaData.getMediaName() == name);
>    if (mediaData.getMediaName() == name) {
>     System.out.println("found");
>     break;
>    }
> 
>    // mediaData = null;
>   }
> 
>   System.out.println(mediaData.getMediaName());
>   return mediaData;
>  }
> 
>  public static void main(String[] args) {
>   new ListMedia();
> 
>  }
> }
> 
> Here's the output when I run server:
> 
> Starting server on port 1234
> 
> server running
> 
> name = test.avi
> 
> Nyoba.avi = test.avi
> 
> false
> 
> test.avi = test.avi
> 
> true
> 
> found
> 
> test.avi
> 
> test.avi
> 
> And here's the output when I create request :
> 
> name = test.avi
> 
> Nyoba.avi = test.avi
> 
> false
> 
> test.avi = test.avi    // Why it is false???
> 
> false
> 
> testjuga.avi = test.avi
> 
> false
> 
> testjuga.avi
> 
>  
> 
> Anyone knows why it can happen??
> 
> thanks
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 

String compare

Posted by Indra Syafruddin <in...@yahoo.com>.
I tried to compare two String, one comes from parameter that is sent via xmlrpc, one comes from arraylist data.

Both String have exactly same data. But why the comparation value return false??

import java.util.*;

public class ListMedia {

 private MediaData mediaData;

 private MediaData[] listData;

 private List list = new ArrayList();

 public ListMedia() {
  this.createMediaList();
  mediaData = getMediaData("test.avi");
  System.out.println(mediaData.getMediaName());
 }

 private void createMediaList() {
  mediaData = new MediaData("Nyoba.avi", "c:/fans/Nyoba.avi", "video",
    "audio");
  list.add(mediaData);

  mediaData = new MediaData("test.avi", "c:/fans/test.avi", "videoTest",
    "audioTest");
  list.add(mediaData);

  mediaData = new MediaData("testjuga.avi", "c:/fans/test.avi",
    "videoTest", "audioTest");
  list.add(mediaData);
 }

 public void addMediaList(String name, String url, String video, String audio) {
  mediaData = new MediaData(name, url, video, audio);
  list.add(mediaData);
 }

 public void removeMediaList(Iterator i) {
  i.remove();
 }

 public MediaData getMediaData(String name) {
  System.out.println("name = " + name);
  ListIterator i = list.listIterator();
  for (int no = 0; i.hasNext();) {
   mediaData = (MediaData) i.next();
   System.out.println(mediaData.getMediaName() + " = " + name);
   System.out.println(mediaData.getMediaName() == name);
   if (mediaData.getMediaName() == name) {
    System.out.println("found");
    break;
   }

   // mediaData = null;
  }

  System.out.println(mediaData.getMediaName());
  return mediaData;
 }

 public static void main(String[] args) {
  new ListMedia();

 }
}


Here's the output when I run server:

Starting server on port 1234

server running

name = test.avi

Nyoba.avi = test.avi

false

test.avi = test.avi

true

found

test.avi

test.avi

And here's the output when I create request :

name = test.avi

Nyoba.avi = test.avi

false

test.avi = test.avi    // Why it is false???

false

testjuga.avi = test.avi

false

testjuga.avi

 

Anyone knows why it can happen??

thanks

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com