Kasak Tahilramani

Ranch Hand
+ Follow
since Apr 06, 2006
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 Kasak Tahilramani

This problem will require you to create a single page that takes images from a directory and display them on a single page using a class. The page will show the smaller images in a table format. When an image is clicked it will open the larger version of the image in a new window.

Display six images per page by default. The user should be able to select between 4, 6, 8, or 10 images per page.

Here is the basic structure of the class I created. Created the file Gallery_class.php


PHP script. Create the file :- gallery.php



ANd third file will be gallery.html where I will have my interface.

I am not able to configure how my .html .php and third file gallery_class.php will interact with each other.
I have images in a directory called images .And in gallery.html file I want to do two things:

1: Their is select button which says how many images you want to select like 4 6 8 10 .And if I select 4 it shloud display 4 images in grid/table/frame format.

How can I do that?

[Bear edit: removed the extraneous question marks from the title. One is quite sufficient.]
[ February 01, 2007: Message edited by: Bear Bibeault ]
Thanks Anton.I tried running my code and it is working fine.Appreciate for your help.

But one question that is bothering me is that,If I cannot instantiate a normal final class, how I am able to do it with method-local class which is final.
Thank all .But I had edited the post so please correct where I am going wrong.
final keyword in method local inner class:

Is I declare my method-local inner class as final,I cannot instantiate it then how can I access method of it ?

public class HHH
{

public static int sampleMethod()
{
final class AC {
int m(){
return 0;}
}

class CC {
int m() {
return 42;
}
}


AC c = new AC();
// cannot instantiate final class then how can I instantiate in method local //class.Is it valid to do ?
return c.m();

}

public static void main(String[] args) {
System.out.println(sampleMethod());
}
}
[ February 01, 2007: Message edited by: Kasak Tahilramani ]
Please give explanation regarding my question?
Hello Sanjit-

It is Miss Kasak Tahilramani NOT Mr Kasak Tahilramani....

Thanks a lot for the explanation.
1:

// Source

public class ObjectTest {

public static void main(String[] args) {
byte b = 0;
(true) ? b = b + 1 : b = 100;// at this line it is giving error why?

System.out.println("Output: " + b);
}
}

Please explain what can I do to make it compilable???
Does Prior-Bit gets changed in Signed right shift and unsigned right shift???
public class ObjectTest {

public static void main(String[] args) {
System.out.println(0 < 1 << 2 >> 1 >>> 2);
System.out.println(1<<130);
}
}

can someone explain how precedance is in shift operators???
Ans:false.

I had tried executing it from right to left ....and got my final statement as 0<4....which gives me true as answer.
It is getting really confusing really appreciate if you can explain in detail.
Please reply to the edited line.........Now what will happen???
public class ObjectTest {

public static void assertVoid(int x) {
System.out.print("assert 1 ");
}

public static int assertInt(int x) {
System.out.print("assert 2 ");
return x;
}

public static void main(String [] args ) {
int t = 0;
assert t > 1 : assertInt(1);//line 1
System.out.println("complete");
}
}

1 :In line1 t>1 is false:

So will it execute assertInt(1)???

2:If in line1 t>1 is true:

So will it execute assertInt(1)???


How will I get output as "assert 2 complete"?
class Parent {
String s = "Parent";

public Parent(){
method();
}

public void method(){
System.out.println(s);
}
}

class Child extends Parent {
String s = "Child";

public Child(){

}

public void method(){
System.out.println(s);
}
}

public class ObjectTest {

public static void main(String[] args) {
Child child = new Child();
Parent p=new Parent();//Added line

}
}

ans:null

According to my point of veiw ,Child() constructor will call Parent() constructor which will call method() of Parent class and output will be Parent .

Now //If I add this line Parent p=new Parent(); then my Parent constructor will call Child class method() or Parent class method().
[ January 28, 2007: Message edited by: Kasak Tahilramani ]
1:


ANs:"in run" can you explain how
I know as suspend() and resume() are not in use lately ,how will I get output as "in run last run".

2:

Can anyone explain join() and how it works, I had read Books but not able to get much please explain?

EDIT by mw: Added much-needed Code Tags. Please use these in the future. Also, made the subject line more descriptive than simply "Threads."
[ January 22, 2007: Message edited by: marc weber ]