comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* Lot of good questions on WML, WAP [Push] / HTTP, Cell-carrier / Telco, SMSC /
 MMSC, Servlet for wireless developer experts to answer ... - 2 messages, 2 
authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/766626e1173bafb4
* newbie question - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b7086796e66a836
* Vector takes a lot memory - 2 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f00ea165043778e1
* Nested xml tag - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/af8d1dae60232a83
* Change your Fortune with Genuine Feng-Shui items - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fe6852e024f943f8
* set classpath for jar file - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/49416430ef8125f3
* Send and retrieve pictures from my computer at home using my cell - 1 
messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6e9842e6a7341b7
* Descending Order Problem - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9d8d928c7ca732
* Let a runtime exception go beyond a Thread? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd0b7eae55d576e3
* Iterator - 'for' or 'while' (was: Which is better... performance- and 
memory-wise?) - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb866c6ac7a64180

==============================================================================
TOPIC: Lot of good questions on WML, WAP [Push] / HTTP, Cell-carrier / Telco, 
SMSC / MMSC, Servlet for wireless developer experts to answer ...
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/766626e1173bafb4
==============================================================================

== 1 of 2 ==
Date: Thurs, Nov 25 2004 7:26 pm
From: [EMAIL PROTECTED] (Jimmy) 

- Does WML has post method like in HTML?  So it's just really sending
a HTTP request.
- Or WAP [Push] only?  Is WAP widely use and common-standard in the
wireless world these days?
- Whether is HTTP or WAP [Push], can I send binary?  Or need encoded
with Base64?

- Does cell-carrier (or telco) accept HTTP? WAP [Push]?
- If so, which one? Bell Mobility, AT&T Rogers Wireless, or Telus
Mobility?
- Does any of them (carriers) accept virtual SMS or MMS #?
- Will they (carriers) forward the cell request as HTTP? Email? to a
server (i.e. pre-defined IP ... say my little linux box at home?).
- Will they (carriers) have public API (i.e. through HTTP or even
Push-Proxy-Gateway) to accept request then forward request (may
contain just text or even binary) back to cell phone?
- Do any of them (carriers) have SMSC and/or MMSC to be access
publicly?

- Is there such as thing as WAP [Push] servlet?  If so, do I need to
implement one or there's already an open-source library (i.e. say in
Java) I can use?

Hope some of you experts out there can help me answer these questions.
Jimmy-the-wirless-newbie



== 2 of 2 ==
Date: Fri, Nov 26 2004 8:01 am
From: Andrew Thompson  

On 25 Nov 2004 19:26:42 -0800, Jimmy wrote:

> sub: Lot of good questions..

Lot of bad multi-posting.  Please don't
<http://www.physci.org/codes/javafaq.jsp#xpost>

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane




==============================================================================
TOPIC: newbie question
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b7086796e66a836
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 10:27 pm
From: "Hal Rosser"  

> excuse for the question of newbie, but I cannot install the plugins of
> eclipse, any help to be appreciated

please don't take it the wrong way, but a newbie should really learn java
without an IDE like eclipse.
most folks suggest using notepad, editpad, or some minimal ide like JGrasp
or BlueJ
 I don't use eclipse myself, so I can't help you there.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 11/19/2004






==============================================================================
TOPIC: Vector takes a lot memory
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f00ea165043778e1
==============================================================================

== 1 of 2 ==
Date: Fri, Nov 26 2004 4:08 am
From: "Thomas G. Marshall"  

Michael Borgwardt coughed up:
> homecurr wrote:

...[rip]...


>> Another good data structure than Vector?
>
> Your problem is not with Vector, though it shouldnÄt be used anymore
> (instead, ArrayList).

In general, switching from "legacy" classes to the collections framework is
a good idea, but you need to be aware that you will be unable to extend a
synchronized version of ArrayList.  You can only grab a synchronized version
of ArrayList at runtime, which means that if you wish to extend ArrayList
/and/ have it synchronized, you must override every method with a
synchronized one.


-- 
"Gentlemen, you can't fight in here! This is the War Room!"






== 2 of 2 ==
Date: Fri, Nov 26 2004 4:08 am
From: "Thomas G. Marshall"  

Michael Borgwardt coughed up:
> homecurr wrote:

...[rip]...


>> Another good data structure than Vector?
>
> Your problem is not with Vector, though it shouldnÄt be used anymore
> (instead, ArrayList).

In general, switching from "legacy" classes to the collections framework is
a good idea, but you need to be aware that you will be unable to extend a
synchronized version of ArrayList.  You can only grab a synchronized version
of ArrayList at runtime, which means that if you wish to extend ArrayList
/and/ have it synchronized, you must override every method with a
synchronized one.


-- 
"Gentlemen, you can't fight in here! This is the War Room!"






==============================================================================
TOPIC: Nested xml tag
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/af8d1dae60232a83
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 10:54 pm
From: Sudsy  

terry wrote:
> Hi,
> 
> Why could I get the incorrect count of tag elements when the tag is
> nested?
> 
> I just write some codes for testing in the following. The debug output
> count is 6 but I expect that it is 3 as the next 3 are nested. How to
> solove this?
<snip>

Back to the javadocs where you can find in org.w3c.dom.Element
the following:

getElementsByTagName

public NodeList getElementsByTagName(java.lang.String name)

Returns a NodeList of all descendant Elements with a given tag name,
in the order in which they are encountered in a preorder traversal
of this Element tree.

Emphasis on "all descendant Elements". The fact they they're nested
makes no difference to this method. IOW the method is doing EXACTLY
what it's supposed to do, even if it's not what you want.
Perhaps you want to walk the top-level nodes using getChildNodes and
increment your counter if getNodeName().equals( "name" ).

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.





==============================================================================
TOPIC: Change your Fortune with Genuine Feng-Shui items
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fe6852e024f943f8
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 9:24 pm
From: "smart_mundial"  

Feng-Shui items available to change your Fortune - millions have
benefited. Genuine items available with free home delivery. Guaranteed
quality - reasonably priced.
For details please contact: [EMAIL PROTECTED]





==============================================================================
TOPIC: set classpath for jar file
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/49416430ef8125f3
==============================================================================

== 1 of 1 ==
Date: Fri, Nov 26 2004 6:58 am
From: Oscar kind  

HS1 <[EMAIL PROTECTED]> wrote:
> Hello
> 
> I have an application that uses some jar files in different folders. For
> example, it needs
> 
> c:\folder1\file1.jar
> c:\folder1\file2.jar
> c:\folder2\file1.jar
> 
> I want to create classpath for those files. Do I have point out the exact
> jar files as above in classpath or I can create by doing something like:
> 
> c:\folder1
> c:\folder2

Neither: the references in the Class-Path: header work the same as the
classpath to javac and java, but they only allow relative paths, and the
directory separator is '/'.

See the JAR File Specification, under section "Main Attributes":
        http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html

PS: The directory separator doesn't seem to be mentioned, but I prefer '/'
because '\' also denotes special characters (tab, newline, unicode, ...).


-- 
Oscar Kind                                    http://home.hccnet.nl/okind/
Software Developer                    for contact information, see website

PGP Key fingerprint:    91F3 6C72 F465 5E98 C246  61D9 2C32 8E24 097B B4E2




==============================================================================
TOPIC: Send and retrieve pictures from my computer at home using my cell
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6e9842e6a7341b7
==============================================================================

== 1 of 1 ==
Date: Thurs, Nov 25 2004 10:40 pm
From: marcus  

Java does not run in a sandbox.  What an absurd statement.

Why are you asking about telco services in a java newsgroup?
If you have email and can write a cgi, what question are you asking?
Sounds like you got a cheap phone with too little storage.
Hmm, maybe you can setup a website to brouse your pictures remotely -- 
and you can post questions on how to do that on a c++ group.

MaSTeR wrote:
> "Jimmy" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>Just wondering if anyone know if telcos (Bell, AT&T Rogers, Telus,
>>etc.) provide public WAP Push Gateway or MMS Gateway service in the
>>Greater Toronto Area?
>>Just recently picked-up a cell phone with camera.  I like to send
>>pictures directly to my linux box at home, whether is re-directed
>>through email or http by telco, so I can delete them from my phone to
>>save space.  Or, I can load it back from my server at home and see on
>>my cell again.
>>My linux box already has mail and web server running so I can recieve
>>as email or have a little cgi script to save pictures to file.
> 
> 
> You need C++. Java executes in a sandbox and cannot access anything on the
> file system except its RMS. Unless you take picture with the program you
> intend to use to do the transfers you have to llok somewhere else.
> 
> 





==============================================================================
TOPIC: Descending Order Problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c9d8d928c7ca732
==============================================================================

== 1 of 2 ==
Date: Fri, Nov 26 2004 7:10 am
From: "Robert Scheaffer via JavaKB.com"  

Hello everybody!

I am completely lost with this. I am a newbie with Java and am stuck on how to 
change this file to descending order? 


import java.util.Random;

public class BinarySearch
{
  public static void main(String[] args)
  {
// The first command line argument specifies the length of the data list.
    int n = Integer.parseInt(args[0]), searchValue, searchLoops = 0, 
foundLocation = -1, first = 0, last = n - 1, mid;

// Create a data list of integers with n entries, with values in ascending 
order between and including 0 and n-1.
    int[] dataList = new int[n];
    for (int i = 0; i < n; i++) dataList[i] = i;

// Randomly choose a search value as an integer between and including 0 and n-1.
    Random generator = new Random();
    searchValue = generator.nextInt(n);

// Check the first entry in the list to see if it equals the search value.
    while (first <= last)
    {
      searchLoops++; 
      mid = (first + last)/2; 
      if (searchValue == dataList[mid]) 
      { 
        foundLocation = mid;           // searchValue is found
        System.out.println("Found search value = " + searchValue + " in " + 
searchLoops + " while loops at index = " + mid);
        return;
      }
      else if (searchValue < dataList[mid])
        last = mid - 1;               // searchValue is in the first half 
      else
        first= mid + 1;               // searchValue is in the second half
    }

    System.out.println("The search value of " + searchValue + " isn't in the 
data list. Performed " + searchLoops + " while loops.");     
  }
}

-- 
Message posted via http://www.javakb.com



== 2 of 2 ==
Date: Fri, Nov 26 2004 7:59 am
From: Andrew Thompson  

On Fri, 26 Nov 2004 07:10:56 GMT, Robert Scheaffer via JavaKB.com wrote:

> I am completely lost with this. I am a newbie with Java 

People who are new to Java are better off posting to a different group.
<http://www.physci.org/codes/javafaq.jsp#cljh>

Note that at the web-interface to usenet that you are using.
it is referred to (incorrectly) as 'Set-Up'.

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane




==============================================================================
TOPIC: Let a runtime exception go beyond a Thread?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cd0b7eae55d576e3
==============================================================================

== 1 of 1 ==
Date: Fri, Nov 26 2004 8:30 am
From: Gordon Beaton  

On Thu, 25 Nov 2004 21:49:04 +0100, Jaap de Bergen wrote:
> I'm using a O/R framework which throws a runtimeexception when
> something goes wrong (for example a column is missig from the
> database).

[...]

> That was a good idea, but it doesn't work. I guess because when i
> launch a thread:

That's because each thread has its own call stack, and exceptions only
propagate up the call stack.

> Does anybody know how i can get the runtimeexception reach the root
> of my application?

There is a way you can be notified of exceptions occurring in other
threads. Have a look at ThreadGroup.uncaughtException(), or (if you're
using 1.5) Thread.setUncaughtExceptionHandler(). 

/gordon

-- 
[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e




==============================================================================
TOPIC: Iterator - 'for' or 'while' (was: Which is better... performance- and 
memory-wise?)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb866c6ac7a64180
==============================================================================

== 1 of 1 ==
Date: Fri, Nov 26 2004 9:44 am
From: Stanimir Stamenkov  

/Gerbrand van Dieijen/:
> On Wed, 24 Nov 2004 11:47:22 -0500, Dave Stallard wrote:
> 
>> for (Iterator i=c.iterator();i.hasNext();)
>>   Object o = i.next();    // You don't need the coercion for Object
>>
>> Of course, in the new Java you should be able to write something like:
>>
>> foreach (Object : c)
> 
> It's not the same, and the first (for (Iterator i) is even incorrect: it 
> will fail when c is empty.

I fail to see how it would fail if the iterator "is empty"?

> You should always use Iterator it=..;while 
> (it...) or the new (and much indeed much better) construct for (... :..)
> except when you're very sure the collection can never be empty.

The 'for' construct has the same effect as with the previous example 
- it just hides the Iterator's visibility making it the preferred 
for me.

-- 
Stanimir



==============================================================================

You received this message because you are subscribed to the Google
Groups "comp.lang.java.programmer" group.

To post to this group, send email to [EMAIL PROTECTED] or
visit http://groups-beta.google.com/group/comp.lang.java.programmer

To unsubscribe from this group, send email to
[EMAIL PROTECTED]

To change the way you get mail from this group, visit:
http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

To report abuse, send email explaining the problem to [EMAIL PROTECTED]

==============================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to