bibiki 18 Posting Whiz

Hey there,
I am aware of GridLayout, BorderLayout and FlowLayout classes. However, I find them not to work satisfactorily well for me when trying to layout the entire content in a frame.

What I usually do is this:

I identify parts that I want in my window. For each part, I build a panel that holds what buttons, input, and other controls I deem needed. I then put these panels on my frame, where I use a grid layout with one column and a suitable number of rows. Basically, after laying out panels using GridLayout, BorderLayout, and FlowLayot, I put them one after one in a horizontal order on my frame.

I was wondering if someone more experienced could give me some insight on whether there is any other, more suitable method to do layouts in Java views.

thank you.

bibiki 18 Posting Whiz

Dmiller071,
you left too much to be assumed. try posting your code, or maybe the entirety of the compiler complaint you get so that one can know where to look for an issue. first off you assumed you coded correctly, but turns out you have not. you are assuming your problem is inside your try-catch, but may turn out it is not.

Anyways, in this line:
if(board[j+1].getLife() == 1) you are comparing board[][].getLife() against an int. Are you sure your getLife method returns an int. Hope this is of any help.

bibiki 18 Posting Whiz

hey mKorbel,
thank you for your reply. I will take your advise and proceed that way. appreciate it.

P.S. Let me congratulate you for how fast and how much you improved your English. Best regards.

bibiki 18 Posting Whiz

hey there,

I am trying to build a small around soccer/football matches. So, I have built a class that models a Match (Match.java). It only contains field variables like hostid, guestid, matchid, result, and such, and setter and getter methods.

When I retrieve matches from my sqlite database, I build a Match object out of each row, and add the object to an ArrayList<Match>.

So far so good. Now, when I want to put my arraylist on a JTable, I am having difficulties. I find JTable's constructor that accepts two parrameters JTable(Object[][] rowData, Object[] columnNames) very interesting, but I haven't built a method to put my Match fields onto an array to build the Object[][] rowData array.

I was wondering if someone could advise me on whether I should just build this two-dimensional array out of my Matches and their fields, or is there perhaps a completely different method to better display the info of my matches onto a table (something different from JTable).

thank you.

bibiki 18 Posting Whiz

JeffGrigg,
thank you for your response. sounds like restful web services is something I'll need to look into. thank you again.

bibiki 18 Posting Whiz

Hey there,

I have taken earlier this tutorial on adobe's site for building an application for mobile devices. The tutorial provides a war file. After deploying the war file on my tomcat server, a few directories are built. Most importantly, WEB-INF folder. This folder contains some java files on one subdirectory and the corresponding java classes on another subdirectory. It also contains other files and directories.

I might have understood it wrong, but I think the entirety of the WEB-INF folder is what 'data service' means. I think I need some instruction on how to proceed for build a data service.

I now want to build another application. I built my MySQL tables and java classes to retrieve info from the tables and to build my desired objects. However, I now do not know how to build the 'data service'.

I am trying to do some research centered around 'build data service' key-phrase, but I can't seem to find anything pleasing.

My questions, though, are:
are there maybe better key words to base my research on?
when building data services, do I go coding and creating directories one by one, or is there maybe a better way to do that?

thank you in advance.

bibiki 18 Posting Whiz

for what? to do your home work? no one will help you. you ought to show some work and tell us where exactly it is you are having difficulties before anyone will help you. otherwise, you might get price offers for doing you homework.

bibiki 18 Posting Whiz

try in the jsp forum. you'll find it under web development section

bibiki 18 Posting Whiz

I wouldn't want to highjack the OP's post. however, I'll have your advice in mind when I get to that part of my project. thanks a lot. otherwise, I am just building the first project in PHP, so I more than welcome advice. thank you!

bibiki 18 Posting Whiz

thank you for your reply Insensus. I am sorry to say that that won't work either because $rows in that case will be null. however, I solved my problem. this is how:

function xmlToAray($file, $end_delimit){
		$s = sizeOf(file("elementet.txt"));
		for($t = 0; $t < $s; $t++){
			$rez[$t] = array("<anetari>");
		}
		$lines = file($file);//array; hold file
		$k = 0;//counts rows for $rows
		$rows;
		$count = 0;//counts rows for $rez
		for($i = 0; $i < sizeOf($lines); $i++){
				$rows[$k] = $lines[$i];
				$k++;
				if(strrpos($lines[$i], $end_delimit) === 0){//once the end of the xml element is reached
					$k = 0;//start a new row
					$rez[$count] = $rows;//save current row on the two-dimensional array
					$count++;//prepare next row of the (main) two-dimensional array
				}
		}
		return $rez;
	}
bibiki 18 Posting Whiz

you can also look for the first post in this java forum, and you'll find there some very good resources. even free books, some really good, as I have heard people say. you should look and see what you like.

bibiki 18 Posting Whiz

hey there,

in Java, I can take a text file and build a two dimensional array out of it. I hope I can do that in PHP as well but I can't seem to be able to do it.

these are the specifics of my problem:

I have an xml file. for simplicity:

<person>
   <name>john</name>
   <last>smith</last>
</person>
<person>
   <name>ana</name>
   <last>smith</last>
</person>

I want to generate a two dimensional array, such that it's first row contains the array (<person>, <name>john</name>,<last>smith</last>, </person>) and it's second row contains (<person>, <name>ana</name>,<last>smith</last>, </person>)


what I tried is this:

//I use $end_delimit to know when to move to the next row of my two-dimensional array
	function xmlToAray($file, $end_delimit){
		$rez = array();
		$lines = file($file);
		$k = 0;//
		$rows = array();
		for($i = 0; $i < sizeOf($lines); $i++){
			array_push($rows[$k], $lines[$i]);
			if(strrpos($lines[$i],$end_delimit) === 0 || strrpos($lines[$i], $end_delimit) === 0){
				$rez[$k] = $rows;
				$k++;
			}
		}
		return $rez;
	}

what I get is a complaint: array_push() expects parameter 1 to be array, null given... I understand what this means, but I don't know how to avoid it. can you please tell me. thank you!

bibiki 18 Posting Whiz

I have been having this same problem these days. This is how I intend to go about it. if you do it this way, let me know how it turns out:

I am assuming you have a tree (or multiple trees). determine the greatest depth of the tree/trees. build a mental column (use divs) for ever depth level. the deepest nodes, put them on the rightmost div. the least deepest, on the leftmost div. hope this helps.

bibiki 18 Posting Whiz

thank you ardav for trying to help. I know that xml is not the most suitable solution for this kind of a problem, but...

I found a solution for my problem. I needed to trim $elem on line 7 of my first file. as well as $l variable in my second file, and it all works fine.

thank you again.

bibiki 18 Posting Whiz

ok, yes. there are around three to five lines that do nothing.

this is what I am trying to do. I am trying to build a small app for genealogy. Initially, I identified info I needed: name, last name (for wives/mothers; patriarchal based), date of birth, place of birth, a node id, a parent id (lest two individuals have the same name, based on a parent's node id, I'd identify who is whose father), and such. however, I thought of making the app expandable by increasing the number of elements that represent information on an individual. so, i though I should just save the elements I want to be available on a separate text file, and then, when I build the form for taking in information, I would build an input box for each line/element on the elementet.txt file. AND, I thought I could use the same list of elements from that file to build indices for $_POST[]. however, seems like info extracted from the file and saved on to the array with file($file) is different from what I assumed it would be. or am I wrong on this too?

bibiki 18 Posting Whiz

thank you for your reply ardav,
however, this problem seems to come up in other places to. see this code:

first page:

<form method="post" action="form.php">
			<table>
				<?php
					$lines = file("elementet.txt");
					foreach($lines as $num => $elem){
						echo "<tr><td>".$elem.":"."</td>";
						echo "<td><input type='text' name='{$elem}' /></td></tr>";//I GENERATE HERE NAMES FOR INPUT BOXES BASED ON MY elementet.txt file
						echo $elem;
					}
				?>
			</table>
			<input type="submit" value="Shto anetarin" />
		</form>

form.php is the following:

$lines = file("elementet.txt");
	$length = sizeof($lines);
	echo $length;
	$file = "family.xml";
	$fh = fopen($file, 'a');
	fwrite($fh, "\n<anetari>\n");
	$emri = 'emri';
	foreach($lines as $num => $l){
		fwrite($fh, $_POST[$l]);//I GENERATE HERE INDEXES BASED ON MY ELEMENTET.TXT FILE, BUT I GET THE COMPLAINT THAT THE INDEX IS UNDEFINED
	}
	
	fwrite($fh, "</anetari>");
	fclose($fh);

any idea what's going on?

bibiki 18 Posting Whiz

I just modified the echo line inside my if statement, and realized that the selected element and what I thought it's corresponding element should be differ in length, the selected being one character longer. I guess I will just add an empty space in front of the character's from my file before comparison.

this is how I modified my file, and it works. (however, I believe there should be a better way and if you know of any, please let me know):

<?php
	if(isset($_POST['elem'])){
		$lines = file("elementet.txt");
		$file = "elementet.txt";
		$fh = fopen($file, 'w');
		
		foreach($lines as $num => $l){
		$l = " ".$l;//I added a leading blank character
			if(trim($_POST['elem']) != trim($l)){//I trimed both of the strings. I had to trim because putting the $l back on file without trimming messes the file up.
				fwrite($fh, trim($l)."\n");//put back newline character to make sure one line-one element file is what I get
				echo $_POST['elem'].":".$l.":".strlen($_POST['elem']).":".strlen($l)."<br />";
			}
		}
		fclose($fh);
	}
?>
bibiki 18 Posting Whiz

hey there,

I am trying to write a simple script that lets me remove lines from a file.

I have an elementet.txt file that contains one-word lines. I thought that if I put the file lines onto an array, and then put back the array elements back on file, excluding the one I select from a drop down list, I would effectively remove a line from my file. But that is not working.

<?php
	if(isset($_POST['elem'])){//this executes if the element to be removed is selected
		$lines = file("elementet.txt");//I read the file onto an array
		$file = "elementet.txt";
		$fh = fopen($file, 'w');//open the file for writing
		
		foreach($lines as $num => $l){
		//if the line being read is not the one selected, put it back on file
			if($_POST['elem'] != $l){
				fwrite($fh, $l);
				echo $_POST['elem'];
			}
		}
		fclose($fh);
	}
?>

for some reason, my if($_POST != $l) statement is always returning true. what am I missing?

thank you!

bibiki 18 Posting Whiz

and i didn't understand what you meant by printing out of loop..

it's good to keep track of how your variables change. to do that, you can use System.out.println(variable_to_be_tracked).

you should be able now to decide what variable you want to track and decide where to put your println statements. hope this is of any help.

bibiki 18 Posting Whiz

Norm,
what he has is a diverging code (I hope I said it correctly). he never gets out of the while loop that's why it outputs nothing... it does not ask for input. it just while-loops.

UPDATE: My bad. I mistakenly thought of num = i as i = num, AND derived wrong conclusions.

bibiki 18 Posting Whiz

your main method is wrongly written, in the first place.

public static void main(String[] args)

because I find it hard to read through code that uses no indentation I haven't read it all, so you perhaps might have other problems as well.

bibiki 18 Posting Whiz

thank you hielo.

bibiki 18 Posting Whiz

Hey there,
seems like this part of DaniWeb is not as active as other parts, but in hope I get an answer, I'm asking.

I have this xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="site.xsl"?>
<navigation>
	<link>
		<name>About</name>
		<content></content>
		<target>www.google.com</target>
	</link>
	<link>
		<name>Friends</name>
		<content></content>
		<target>www.google.com</target>
	</link>
	<link>
		<name>Archive</name>
		<content></content>
		<target>www.google.com</target>
	</link>
	<link>
		<name>Blog</name>
		<content></content>
		<target>www.google.com</target>
	</link>
	<link>
		<name>Contact</name>
		<content></content>
		<target>www.google.com</target>
	</link>
</navigation>

and this XSL file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<html>
	<body>
		<div id="navigation" style="background-color:black; width:100px">
			<xsl:for-each select="navigation/link">
				<a href="how to extract link from xml"><xsl:value-of select="name"/></a><br />
			</xsl:for-each>
		</div>
	</body>
</html>

</xsl:template>

</xsl:stylesheet>

so, inside my xsl file, I want to be able to extract the vale of link element from my xml file. can anyone please direct me on how to do this? thank you!

bibiki 18 Posting Whiz

Hey there,
I hope you have solved your problem already. But just in case you haven't, I thought I'd reply.

I am very new to XML, but I think you have some problems in your code. You open and close your X12Summary twice within the code.

As far as extracting unique elements from your xml file, google for XML unique and I believe you will be able to find a solution.

bibiki 18 Posting Whiz

this sounds like a nice idea. I tried some brief googleing, and turns out that java can be used for this kind of purposes. There even seems to be a java audio to text api, and such. try this and see if you may utilize this for your idea, or maybe learn from it. http://cmusphinx.sourceforge.net/sphinx4/

bibiki 18 Posting Whiz

Hey there,
I might not be able to accurately describe my problems, but I'll do my best.

I am taking these tutorials on adobe website that walks me through building a flex web application. In order to take the tutorials, I needed to previously deploy a war file that sets up a data service. the service consists of five classes. one of the classes models Employee objects and another Department objects.

Another class defines getter and setter methods, so there are getEmployees and getDepartments methods. both are defined such that they return a List object as a result.

I have deployed the file correctly because I have effectively built the Mobile Flex Development tutorial offered in adobe, so I do not suspect my issue has to do with deployment.

My issue is this:
I am using Flash Builder 4.5. When I connect to the Data/Service, it works fine. However, when I need to configure the return type for getDepartments method, in the process, I need to look in a drop down list for available types, and Department and Department[] types should be available as options, but they are not. (for my mobile and web development tutorials, I had to configure getEmployee method's return type, and I did it well).

I need help to determine what I need to be looking at. I don't even know what to inspect for eventual problems. What I tried is compiling the source code of the java classes …

bibiki 18 Posting Whiz

I would like to put in my two cents.
I took a java class the first time in 2003. I was told in class to use cmd and notepad only. After a week, I dropped the class.

I quit my job in 2007 in a bank. I decided I wanted to learn programming. I went back to school, enrolled in a Java class. I was introduced to jGRASP (an IDE). I am at the end of the second year of my studying CS now. Just yesterday I started internship/probation in a firm as a Java programmer. Meanwhile, I dropped jGRASP and use no IDE at all now. :) you judge!

bibiki 18 Posting Whiz

alright, I have my issue solved. the problem was:
after runing startup.bat (because I assumed the cmd windows should close itself), I'd assume that something was wrong since the cmd would not close, and I'd close it. no wonder it did not work then :)

bibiki 18 Posting Whiz

hey there,
I am trying to set up tomcat on my computer (I am so new to this, I am not even sure I am explaining my problem correctly.)

I was told to install XAMPP. I did using the installer that appache's web site offers. It says that the installer installs tomcat too. I can see the tomcat folder inside my XAMPP folder, but when I check for status on localhost index page, I see 'tomcat deactivated'. and when I check for status under J2EE section I see the following:

Warning! Tomcat is not started on port 8080.

one of the links in this page is: http://127.0.0.1:8080/. when I click on it, the page that comes up says: Firefox can't establish a connection to the server at 127.0.0.1:8080.

What is wrong? what am I missing. I kindly ask you to help me. thank you in advance!

bibiki 18 Posting Whiz

I compiled the code and ran it. I got a frame with three tabs, no pictures... I missed the FilePermission error posted here, no error when I compiled/ran the code. my bad!

bibiki 18 Posting Whiz

if you run an applet once via a browser, the browser will remember your applet, and will output what it has in its memory instead of the new version of the applet. therefore, you need to clean your browser's memory to run the new version of your applet if you've changed it. otherwise, everything seems to be fine. one more thought: are you sure you've saved your html file with an html suffix?

bibiki 18 Posting Whiz

I might be wrong, but I think you should do your research on image recognition instead of pattern recognition, and you might find a solution easier that way. otherwise, I don't know anything about either recognition, just thought I'd give an idea.

bibiki 18 Posting Whiz

hey there,
I have this java 3D home assignment I need help with. I would greatly appreciate it if someone could direct me to a solution.

I need to build create a 3 D digital clock and add some key navigation to it. I managed to add the key navigation (I removed the code for key navigation to make for less code), but I can't seem to make the necessary animation going... the scene should change every second, or else it will be a frozen clock.

what I did is this:

I built two classes. One to build the clock, and another, behavior class, that I hoped would 'repaint' the scene. I know the classes are interacting, but I am getting a:

javax.media.j3d.RestrictedAccessException: Group: only BranchGroup nodes may be set

error when I try to reset the child (a 3d shape representing time) of the TransformGroup in my code. However, I get no error when I invoke the createSceneGraph() method through my behavior class, but the clock remains frozen.

here is my code:

import java.awt.*;
   import java.applet.*;
   import java.awt.event.*;
   import javax.media.j3d.*;
   import javax.vecmath.*;
   import com.sun.j3d.utils.universe.*;
   import com.sun.j3d.utils.geometry.*;
   import com.sun.j3d.utils.applet.MainFrame;
   import com.sun.j3d.utils.behaviors.keyboard.*;
   import java.util.*;

   public class Detyra3D extends Applet{
      Shape3D shape;
   	
   	
      public void init(){
         setLayout(new BorderLayout());
         Canvas3D canv = new Canvas3D(null);
         add(canv, BorderLayout.CENTER);
      	
         BranchGroup bg = createSceneGraph();
        
         SimpleUniverse su = new SimpleUniverse(canv);
         su.getViewingPlatform().setNominalViewingTransform();
         

         
        
            su.addBranchGraph(bg);
 
      
      
      	
      }
   	
      public BranchGroup createSceneGraph(){
         BranchGroup scene = new BranchGroup();
      	
      	
      	
      	
      	
         Transform3D tr = new Transform3D();
         tr.setScale(0.45);
         tr.setTranslation(new Vector3f(-0.9f, -0.2f, 0f));
      	
      	
      
      	
      	
         TransformGroup tg …
bibiki 18 Posting Whiz

hey Norm,
thank you for your help. I put all the code of my actionPerformed inside a try-block (except for the firs line)), and added a catch block (I am not sure if I am using the right words to describe what I did), and everything is working just fine. thank you very much.

bibiki 18 Posting Whiz

hey there again,
I am trying to build a small mechanism that lets me store product names and prices on a produktet.txt file. the file should hold lines as follows:

product1 price1
product2 price2
.
.
productN priceN

So, I built a small panel with three rows and one column. first row holds a label for product and a text field allowing a user to input the name of a product, and the second row holds a label for price and a text field for inputing the price. row 3 holds the button.

when button is pushed, information given on the fields should be read and concatenated to form a string, which is then saved as the last line on the produktet.txt file. however, I am getting an "unreported exception" error. I tried adding 'throws IOException' to my button's constructor method, but it won't work. I can't just add it to actionPerformed method headline, because then actionPerformed method of ActionListener is not being overridden. can someone please tell me how to go about declaring the exception, or perhaps my way of building the mechanism is wrong.

here is my code:

//this is my panel class
import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.util.*;

public class ShtoProdukte extends JPanel{

	public JLabel emri;//product name
	public JLabel cmimi;//product price
	public JTextField em;//product name text field
	public JTextField cm;//product price text field
	public int i = 0;//this variable will hold the number of products …
bibiki 18 Posting Whiz

@Ahmed, this last you posted is a little wrong, I think. because, assume the string is a valid one, then according to the way you described in this last post, the count variable should be 4 at the end, not five (if there are six characters, and five of them are letters, count would be five for counting letters, and subtract one for the number in the string, you get four)

however, I believe that using regular expressions are what are used for string validation most of the time, but this way you one learns using java classes, not so much thinking as a programmer.

bibiki 18 Posting Whiz

Alright, I managed to solve my issue... at least to some extent.

Java 3d API 1.5 won't work, but 1.4 is working. I also happened not to have graphics drivers installed as necessary. these two solved my issue (for anyone that might ever read this).

bibiki 18 Posting Whiz

hi again,
I think I installed Java 3d correctly... I can compile code, but the code won't run.

this is the error I am getting:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0949c964, pid=3832, tid=3604
#
# JRE version: 6.0_16-b01
# Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [j3dcore-d3d.dll+0x5c964]
#
# An error report file with more information is saved as:
# D:\everything\javatesting\GUIchapter\hs_err_pid3832.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

anyone knows what's going on? any solution?

bibiki 18 Posting Whiz

give me an upvote then... two days trying to get one off of you :P

bibiki 18 Posting Whiz

see this part of the code in your Graphics code:

else if (ring1ColChoice != ring1ColAns || ring2ColAns != ring2ColChoice || ring3ColAns != ring2ColChoice){

the last comparison is wrong. I assume you want to have ring3ColChoice as the last part...

bibiki 18 Posting Whiz

try putting the println statement that Norm mentioned inside your paintComponent method, and if you only see one set of values showing in your standard output, what you are actually doing is that you are only drawing a picture with only the last set of values you have calculated. just try putting the System.out inside your paintComponent.

bibiki 18 Posting Whiz

:$ my bad. haven't looked at the code, just assumed he didn't put it in. I beg your pardon.

bibiki 18 Posting Whiz

before I highjack the thread:

import javax.swing.*;
   import java.awt.*;

   public class Println extends JPanel{
   
      public void paintComponent(Graphics g){
         System.out.println("It's happening");
      }
      
      public static void main(String[] args){
         JFrame frame = new JFrame();
         JPanel pan = new Println();
      
         frame.getContentPane().add(pan);
         frame.setSize(500, 500);
         frame.setVisible(true);//if I comment out this line, paintComponent is not invoked. only when this line is executed is paintComponent invoked (seems like).
      
      }
   }

anyways, sirlink, try puting as the first line in your paintComponent this line: super.paintComponent(g); this line clears everything in the pane before it draws what follows in your paintComponent.

bibiki 18 Posting Whiz

I could be wrong, but when you add a panel onto a frame, the panels paintComponent is automatically called. the other more experienced guys should correct me if I'm wrong.

bibiki 18 Posting Whiz

see, LongitudinalWaveProgram is your frame. you have this extending JFrame, right? that just means it is the frame. then, your LongitudinalWaveGraphics is your panel, because it extends JPanel, right? I don;t see why do you need line 13 in your LongitudinalWaveProgram file. And, I might be wrong, but I think you do not need to invoke repaint() inside your DrawLong(). hope this will be of any help. I don't think Vista should be a problem for the flashing.

bibiki 18 Posting Whiz
public LongitudinalWaveProgram (){
JFrame frame = new JFrame ("Longitudinal Wave - Adam");//instead of this, I believe you want to reach the effect that super(Longitudinal Wave - Adam); would reach. In addition, why do you need another frame named frame when LongitudinalWaveProgram is itself a frame?
JPanel pane = new JPanel ();
 
 
LongitudinalWaveGraphics lwg = new LongitudinalWaveGraphics ();
lwg.LongDraw();
pane.add(lwg);//here, you are adding a frame onto a panel. you should add a panel onto a frame

you're constructor method is a little messy, James explained a little earlier this what I am trying to explain. fix you're constructor method, or at least write comments, instead of actual methods, explaining what you want your constructor method to doo, one step at a time

bibiki 18 Posting Whiz

by any chance you're using jGRASP? I know that using jGRASP this happens frequently. If so, look for a Run menu on your menu bar, and there you have 'Make this main project' or something... this is of course assuming you are sure you're not adding Resistor... instead of Longitude... panel to your frame.

bibiki 18 Posting Whiz

your maintextarea variable does not hold anything. just assign it something, I guess new JTextArea();

Eiting: it's null. that's what your error message is telling you.

bibiki 18 Posting Whiz

have you picked what language to study? I assume you want java since you posted in a java forum. you can start with this, or start reading the topmost thread in this forum.

bibiki 18 Posting Whiz

@James, @Norm,
I compiled with Xlint option. Everything is clearer now. Seems like deprecation complaint has more to do with some parts of the GUI implemented in the file than with Machine file. The error for Machine file is that it's missing, and this seems to have nothing to do with deprecation. thanks a lot.