pallavi utukuri

Ranch Hand
+ Follow
since Feb 10, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pallavi utukuri

Hi
Is there any mock available for 1z1-031 as most of the available mock is for 1z0-031.
Hi
Whats is the difference between 1z0-031 and 1z1-031
18 years ago
Hi
I am quite new to wml. I want to know how to display wml on midlets.My webserver is Tomcat.
18 years ago
I am using sun one studio 4 update 4 mobile edition. The following simple example quotes the problem:


import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;

public class HelloMIDlet extends MIDlet implements CommandListener {

private Command exitCommand; // The exit command
private Display display; // The display for this MIDlet

public HelloMIDlet() {
display = Display.getDisplay(this);
exitCommand = new Command("Exit", Command.SCREEN, 2);
}

public void startApp() {
StringTokenizer st=new StringTokenizer("buf","%");

TextBox t = new TextBox("Hello MIDlet", "Test string", 256, 0);

t.addCommand(exitCommand);
t.setCommandListener(this);

display.setCurrent(t);
}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}

public void commandAction(Command c, Displayable s) {
if (c == exitCommand) {
destroyApp(false);
notifyDestroyed();
}
}

}

This is the output:

HelloMIDlet.java [17:7] cannot resolve symbol
symbol : class StringTokenizer
location: class HelloMIDlet
StringTokenizer st=new StringTokenizer("buf","%");
HelloMIDlet.java [17:30] cannot resolve symbol
symbol : class StringTokenizer
location: class HelloMIDlet
StringTokenizer st=new StringTokenizer("buf","%");
2 errors
Errors compiling HelloMIDlet.
18 years ago
Hi
I am using Sun one studio for ME. To my surprise the follwing code is giving error.


StringTokenizer st=new StringTokenizer("buf","%");

i have imported java.util

still its gives the error saying
cannot resolve symbol
symbol : class StringTokenizer
StringTokenizer st=new StringTokenizer("buf","%");

i am totally failing to understand y
18 years ago
No this is not the case.... i want to display the map generated by the following code in the midle.....take a look at the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAAewKei6r67seJuJyWFSmy4hTwM0brOpm-All5BF6PoaKBxRWWERSiQwLJopnk7bfTK-ygDtPRzc_QdA" type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 500px; height: 400px"></div>
<script type="text/javascript">
//<![CDATA[

var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.centerAndZoom(new GPoint(-122.1419, 37.4419), 4);

//]]>
</script>
</body>
</html>

yep google map it is..
18 years ago
Hi
What is the procedure to display an image generated by a html page in a midlet.... does wml comes into picture here???
18 years ago
Hi
Thanks for your replies. I mailed the same query to JSR-179-TCK-RI-support@nokia.com . I got this reply
"Location API itself is agnostic of positioning technology, so as long
as a phone supports this API you should not bother too much which of
positioning techniques the phone uses."

So i guess the phone includes Hardware Support too

18 years ago
hii
I found a Nokia phone model N91 which has Jsr 179.here is the link where i found it
http://www.forum.nokia.com/main/0,,018-2630,00.html?model=N91

so my query is ....is this api in the phone sufficient to execute midlets that use jsr179 api or does it need a GPS chip to be installed in the phone... i hope someone will take a moment to reply to this..Thanks
18 years ago
well i am using Bitmap format......are zooming capabilities not applicable to Bitmap?
18 years ago
Thanks jeff....for testing i will use maps for a particlar state for example.... soo my database will have maps related to that state only...for the time being...soo your idea i will try to implement... but my main conceern is do i have to go through the exertion to adding these maps in my Db ..... there must b some Db's available which already have all the maps and related data neccessary so that i dont have to worry about updating the map database and just concentrate on developing the application.....
18 years ago
welll........it turned out the mistake am doing is not entering 'commit' after inserting rows in the table!!! anyways i found another way to retrieve images...instead of storing the actual image in the table i will only store the path of the image as normal text and according to the query from the midlet the servlet will seek in the table and return the apporipriate url to the midlet..... its almost working except am loosing the string reference out of the catch block...which am sure will work out....soo is it a good practice to do like this???
18 years ago
Performed the following steps to create table to store images
create table blobs
( id varchar2(255),
blob_col blob
);
create or replace directory MY_FILES as 'c:\images';

create or replace procedure insert_img as
f_lob bfile;
b_lob blob;
begin
insert into blobs values ( 'MyGif', empty_blob() )
return blob_col into b_lob;
f_lob := bfilename( 'MY_FILES', 'duke.png' );
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile( b_lob, f_lob, dbms_lob.getlength(f_lob) );
dbms_lob.fileclose(f_lob);
commit;
end;
BEGIN insert_img END;

I didn�t get any errors and procedures are working successfully�..

Now next task is to read this image file in a servlet, used the following code:

PreparedStatement stmnt = c.prepareStatement("select BLOB_COL from blobs");
ResultSet rs = stmnt.executeQuery();
while(rs.next())
{
try
{
// Get as a BLOB
System.out.println("in BLOB");
Blob aBlob = rs.getBlob(1);
allBytesInBlob = aBlob.getBytes(1, (int) aBlob.length());
}
catch(Exception e){}
}


"in BLOB" is never displayed in the console ��..this means the code went wrong somewhere��.???
18 years ago
well actually i want the picture to change with every change of coordinates.... soo for that storing pictures in db is not possible.... whats the good way to do that....

another thing is; user enters pincode or name or particualr city and its map should be displayed on the device....soo i thought i will store take a particualr country and store maps of it like state maps and all.... later i would updatate the database..... but my concern is pic files are of large size soo this doesnt sound like good programming to store each map in the db.... sooo ???
18 years ago
hii
I am doing a project in which i need to display geographical MAP of current location/coordinates on the midlet.... so what the best way to do it... is there any alogrithm/procedure where we can map the coordinates to map picxels ..... or any other procedure ? plz help
18 years ago