Help with a simple but crazymaking question!
hi there, would anyone here mind looking at my test site and
telling me what I am doing wrong?
http://presentations.patrickmeyers.com/
I am VERY new at anything web related, and trying to learn
some Dreamweaver, html, and css. Basically I want ALL my content
(which for now is just images) to stay flush left with each other
no matter what the user does with their web browser window. But
when I expand my web broswer window, two of my images (one of which
is a rollover image that I need to add a hyperlink to) bump over to
the right and up. I don't want them to do that! I want them to stay
flush left at all times.
I also want to center everything so that no matter what a
person does with their browser, the page stays in the center of the
window (i.e. the Yahoo homepage) but all the content remains left
aligned relative to the top.
I've tried every concievable setting in Dreamweaver I can
think of and nothing works. The button and bottom banner still move
over to the right and up.
Any tips? Thank you in advance!!!!!
p
<p><img src="banner.jpg" width="792" height="336"
align="left" /><a href="#"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image3','','click-button-yellow.jpg',1)"><img
src="click-button-purple.jpg" name="Image3" width="180"
height="46"
hspace="16" vspace="15" border="0" align="left" id="Image3"
/></a></p>
<p><img src="lowerbanner.jpg" width="792"
height="41" vspace="30"
align="left" /></p>
</body>
You have two elements horizontally adjacent (the banner image
at 792px
width, and the anchor tag at 180px width). Their combined
width is
792+180+32px = 1004px (the 32px comes from the hspace="16"
attribute). When
the browser viewport is less than 972px wide, the anchor tag
and its
associated image will just drop below the banner image (since
they are
contained in a <p> that has no explicit width).
Change this -
<p><img src="banner.jpg" width="792" height="336"
align="left" /><a href="#"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image3','','click-button-yellow.jpg',1)"><img
src="click-button-purple.jpg" name="Image3" width="180"
height="46"
hspace="16" vspace="15" border="0" align="left" id="Image3"
/></a></p>
to this -
<p style="width:1004px;"><img src="banner.jpg"
width="792" height="336"
align="left" /><a href="#"
onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image3','','click-button-yellow.jpg',1)"><img
src="click-button-purple.jpg" name="Image3" width="180"
height="46"
hspace="16" vspace="15" border="0" align="left" id="Image3"
/></a></p>
and see what happens.
> I also want to center everything so that no matter what
a person does with
> their browser, the page stays in the center of the
window (i.e. the Yahoo
> homepage) but all the content remains left aligned
relative to the top.
It depends on whether you are using absolute positioning on
the page, as to
which method might be best, but in either event, this will
work -
Change this -
</head>
to this -
<style type="text/css">
#wrapper { width:1004px; margin:0 auto;position:relative; }
/* 760px will display on an 800px screen maximized browser
window without */
/* horizontal scrollbars. 1004px is pretty wide, and will
display horizontal
scrollbars on 1024 screens.*/
</style>
</head>
change this -
<body
onload="MM_preloadImages('click-button-yellow.jpg')">
(the ellipsis represents any other attributes that might be
mentioned in the
body tag, and SHOULD NOT BE INCLUDED EXPLICITLY!)
to this -
<body
onload="MM_preloadImages('click-button-yellow.jpg')">
<div id="wrapper">
and this -
</body>
to this -
<!-- /wrapper -->
</div>
</body>
and see if that helps.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"patrickpmm" <[email protected]> wrote in
message
news:[email protected]...
> hi there, would anyone here mind looking at my test site
and telling me
> what I
> am doing wrong?
>
http://presentations.patrickmeyers.com/
>
> I am VERY new at anything web related, and trying to
learn some
> Dreamweaver,
> html, and css. Basically I want ALL my content (which
for now is just
> images)
> to stay flush left with each other no matter what the
user does with their
> web
> browser window. But when I expand my web broswer window,
two of my images
> (one
> of which is a rollover image that I need to add a
hyperlink to) bump over
> to
> the right and up. I don't want them to do that! I want
them to stay flush
> left
> at all times.
>
> I also want to center everything so that no matter what
a person does with
> their browser, the page stays in the center of the
window (i.e. the Yahoo
> homepage) but all the content remains left aligned
relative to the top.
>
> I've tried every concievable setting in Dreamweaver I
can think of and
> nothing
> works. The button and bottom banner still move over to
the right and up.
>
> Any tips? Thank you in advance!!!!!
> p
>
Similar Messages
-
Need help with a simple process with FTP Adapter and File Adapter
I am trying out a simple BPEL process that gets a file in opaque mode from a FTP server using a FTP adapter and writes it to the local file system using a File Adapter. However, the file written is always empty (zero bytes). I then tried out the FTPDebatching sample using the same FTP server JNDI name and this work fine surprisingly. I also verified by looking at the FTP server logs that my process actually does hit the FTP server and seems to list the files based on the filtering condition - but it does not issue any GET or RETR commands to actually get the files. I am suspecting that the problem could be in the Receive, Assign or Invoke activities, but I am not able identify what it is.
I can provide additional info such as the contents of my bpel and wsdl files if needed.
Would appreciate if someone can help me with this at the earliest.
Thanks
Jaypersiandude wrote:
Topic: Need help with if, else, and which statements and loops.
How would I display 60 < temp. <= 85 in java
System.out.println("60 < temp. <= 85 in java");
another question is how do I ask a question like want to try again (y/n) after a output and asking that everytime I type in yes after a output and terminate when saying No.Sun's [basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
Sun's [New To Java Center|http://java.sun.com/learning/new2java/index.html].Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
[http://javaalmanac.com|http://javaalmanac.com]. A couple dozen code examples that supplement [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance].
jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
Bruce Eckel's [Thinking in Java|http://mindview.net/Books/DownloadSites] (Available online.)
Joshua Bloch's [Effective Java|http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_1?ie=UTF8&s=books&qid=1214349768&sr=8-1]
Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance].
James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806]. -
Can anyone help with a simple coding problem?
I'm creating a website using Dreamweaver MX 2004 and making a
real mess of it!
I have created two pages which are identical in terms of
background, but one has a text box in the middle. What I want to
happen when you click the link to this page is the first one
without the text box appears for a couple of seconds, then the
other page automatically loads to give the impression that this
text box has magically appeared. really simple, but I can't find
any behaviour codes to make this happen!
Can anyone help me out with a code or give me a clue to how
it can be achieved really easily.
Cheers everyone!You can try just using the same page and hiding and showing
the layer using the Behaviors menu. that would acheive the same
thing without having to load another page. -
Need help with a simple program (should be simple anyway)
I'm (starting to begin) writing a nice simple program that should be easy however I'm stuck on how to make the "New" button in the file menu clear all the fields. Any help? I'll attach the code below.
====================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Message extends JFrame implements ActionListener {
public void actionPerformed(ActionEvent evt) {
text1.setText(" ");
text2.setText("RE: ");
text3.setText(" ");
public Message() {
super("Write a Message - by Kieran Hannigan");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(370,270);
FlowLayout flo = new FlowLayout(FlowLayout.RIGHT);
setLayout(flo);
//Make the bar
JMenuBar bar = new JMenuBar();
//Make "File" on Menu
JMenu File = new JMenu("File");
JMenuItem f1 = new JMenuItem("New");f1.addActionListener(this);
JMenuItem f2 = new JMenuItem("Open");
JMenuItem f3 = new JMenuItem("Save");
JMenuItem f4 = new JMenuItem("Save As");
JMenuItem f5 = new JMenuItem("Exit");
File.add(f1);
File.add(f2);
File.add(f3);
File.add(f4);
File.add(f5);
bar.add(File);
//Make "Edit" on menu
JMenu Edit = new JMenu("Edit");
JMenuItem e1 = new JMenuItem("Cut");
JMenuItem e2 = new JMenuItem("Paste");
JMenuItem e3 = new JMenuItem("Copy");
JMenuItem e4 = new JMenuItem("Repeat");
JMenuItem e5 = new JMenuItem("Undo");
Edit.add(e5);
Edit.add(e4);
Edit.add(e1);
Edit.add(e3);
Edit.add(e2);
bar.add(Edit);
//Make "View" on menu
JMenu View = new JMenu("View");
JMenuItem v1 = new JMenuItem("Bold");
JMenuItem v2 = new JMenuItem("Italic");
JMenuItem v3 = new JMenuItem("Normal");
JMenuItem v4 = new JMenuItem("Bold-Italic");
View.add(v1);
View.add(v2);
View.add(v3);
View.addSeparator();
View.add(v4);
bar.add(View);
//Make "Help" on menu
JMenu Help = new JMenu("Help");
JMenuItem h1 = new JMenuItem("Help Online");
JMenuItem h2 = new JMenuItem("E-mail Programmer");
Help.add(h1);
Help.add(h2);
bar.add(Help);
setJMenuBar(bar);
//Make Contents of window.
//Make "Subject" text field
JPanel row2 = new JPanel();
JLabel sublabel = new JLabel("Subject:");
row2.add(sublabel);
JTextField text2 = new JTextField("RE:",24);
row2.add(text2);
//Make "To" text field
JPanel row1 = new JPanel();
JLabel tolabel = new JLabel("To:");
row1.add(tolabel);
JTextField text1 = new JTextField(24);
row1.add(text1);
//Make "Message" text area
JPanel row3 = new JPanel();
JLabel Meslabel = new JLabel("Message:");
row3.add(Meslabel);
JTextArea text3 = new JTextArea(6,22);
messagearea.setLineWrap(true);
messagearea.setWrapStyleWord(true);
JScrollPane scroll = new JScrollPane(text3,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
//SpaceLine
JPanel spaceline = new JPanel();
JLabel spacer = new JLabel(" ");
spaceline.add(spacer);
row3.add(scroll);
add(row1);
add(row2);
add(spaceline);
add(spaceline);
add(row3);
setVisible(true);
public static void main(String[] arguments) {
Message Message = new Message();
}persiandude wrote:
Topic: Need help with if, else, and which statements and loops.
How would I display 60 < temp. <= 85 in java
System.out.println("60 < temp. <= 85 in java");
another question is how do I ask a question like want to try again (y/n) after a output and asking that everytime I type in yes after a output and terminate when saying No.Sun's [basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
Sun's [New To Java Center|http://java.sun.com/learning/new2java/index.html].Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
[http://javaalmanac.com|http://javaalmanac.com]. A couple dozen code examples that supplement [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance].
jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
Bruce Eckel's [Thinking in Java|http://mindview.net/Books/DownloadSites] (Available online.)
Joshua Bloch's [Effective Java|http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_1?ie=UTF8&s=books&qid=1214349768&sr=8-1]
Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance].
James Gosling's [The Java Programming Language|http://www.bookpool.com/sm/0321349806]. -
Help with a simple 1811 configuration
I have a very basic level of understanding with Cisco products and I need help with what should be simple and even doable by me.
I have a Cisco 1811 integrated router and am simply trying to use it on my home network. I can configure the router with an enable secret password, password encryption, VTY, aux, and cons logins with no issues. The router has 2 Ethernet interfaces, 0 and 1 and 8 switch ports.
The idea is to bring Comcast ISP service into one of the Ethernet ports and then have three machines on the switch ports able to access the Internet. Also I have an off-the shelf wireless router that I thought I would just plug that into an available switch port and allow a wireless AP as well.
This is so simply, that I can't believe I can't figure it out, but I can't.
I set int F1 to DHCP, performed a 'no shut', and connected the ISP's router and have an up and up indication. I have setup a static network with my three machines on the switch ports and enabled all applicable ports and have up and up indications - however, no traffic flow, even amongst my static Layer 2 switched LAN - not even a 'ping'. By my understanding of Layer 2, this should work right now, whether the ISP service is working or not - WHAT AM I DOING WRONG?
The addressing scheme I have ended up on is 172.16.1.0/28
Obviously without the first hurdle cleared, of why the switched LAN doesn’t work, I haven't got any deeper. Do I need to configure NAT? I don't think I would need to in the scenario right?
All of my experience, and none at the CCNA level, has been with larger Cisco equipment. One thing I noticed on the 1811 was that when trying to create a new VLAN, it appears to work yet does not do anything and the 'sh vlans' output returns nothing, not even the VLAN1 I can see with 'sh ip int brief".
Anyway, if anyone has time to help a newbie out I would appreciate it; I’m lost.
Thanks,
JoshThanks for the help Andrew! You know, I think if this was two separate devices (switch and router) I think I would be up and running, but this integrated stuff is throwing me off, not to mention that the IOS is a much older version (I guess) than what I'm used to.
They were throwing this 1811 in the trash can at work, so I just emptied the trash can. I have no documentation at all but I have since found the 1800 series documentation on Cisco.com and have tried to implement the basic configurations cited; with what seems like success, but still no joy. I did have to recover the password and did so with 0x2142, I bypassed the setup and compared the default configuration with what is listed in the documentation and they DO NOT match; I also tried to go through setup mode with the same indications. Additionally I've also learned that the 1800 series is pre-configured on certain options (DHCP, VLAN), which is new to me - I thought Cisco routers were not configured by default - isn't that kind of the point? (By the way, the below port status may not be correct since I now have all the ports unplugged)
Anyway, here is the 'show run' command, the 'sh ip int brief' command, followed by the 'sh version' command:
Show Run
Casino#sh run
Building configuration...
Current configuration : 2006 bytes
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
hostname Casino
boot-start-marker
boot-end-marker
enable secret 5 $1$meWw$nsMTp6US7axi/uE0MWULK.
enable password 7 06535E741C1B584C55
no aaa new-model
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 172.16.1.1
ip dhcp pool Casino
import all
network 172.16.1.0 255.255.255.240
default-router 67.165.208.1
dns-server 68.87.89.150
domain-name hsd1.co.comcast.net
no ip domain lookup
ip domain name GinRummy.localhost
ip name-server 68.87.85.102
ip name-server 68.87.69.150
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
multilink bundle-name authenticated
archive
log config
hidekeys
interface Loopback0
ip address 172.16.1.1 255.255.255.240
interface FastEthernet0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet1
ip address dhcp
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
pppoe enable
pppoe-client dial-pool-number 1
interface BRI0
no ip address
encapsulation hdlc
shutdown
interface FastEthernet2
interface FastEthernet3
interface FastEthernet4
interface FastEthernet5
interface FastEthernet6
interface FastEthernet7
interface FastEthernet8
interface FastEthernet9
interface Vlan1
no ip address
ip nat inside
ip virtual-reassembly
interface Dialer0
ip address negotiated
ip mtu 1492
encapsulation ppp
dialer pool 1
ppp authentication chap
ip forward-protocol nd
no ip http server
no ip http secure-server
ip nat pool Casino 172.16.1.2 172.16.1.14 netmask 255.255.255.240
ip nat inside source list 1 interface Dialer0 overload
access-list 1 permit 172.16.1.0 0.0.0.15
dialer-list 1 protocol ip permit
control-plane
line con 0
password 7 080E5916584B4442435E5C
login
line aux 0
password 7 013C135C0A59475A70191E
login
line vty 0 4
password 7 09635B51485756475A5954
login
end
Show IP Interface Brief
Casino#sh ip int brief
Interface IP-Address OK? Method Status Prl
FastEthernet0 unassigned YES NVRAM administratively down do
FastEthernet1 unassigned YES DHCP up do
BRI0 unassigned YES NVRAM administratively down do
BRI0:1 unassigned YES unset administratively down do
BRI0:2 unassigned YES unset administratively down do
FastEthernet2 unassigned YES unset up do
FastEthernet3 unassigned YES unset up do
FastEthernet4 unassigned YES unset up do
FastEthernet5 unassigned YES unset up do
FastEthernet6 unassigned YES unset up do
FastEthernet7 unassigned YES unset up do
FastEthernet8 unassigned YES unset up do
FastEthernet9 unassigned YES unset up up
Vlan1 unassigned YES NVRAM up up
Loopback0 172.16.1.1 YES manual up up
Dialer0 unassigned YES manual up up
NVI0
'show version'
Casino#sh ver
Cisco IOS Software, C181X Software (C181X-ADVIPSERVICESK9-M), Version 12.4(15))
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Thu 24-Jan-08 13:05 by prod_rel_team
ROM: System Bootstrap, Version 12.3(8r)YH12, RELEASE SOFTWARE (fc1)
Casino uptime is 52 minutes
System returned to ROM by reload at 17:09:25 UTC Fri Jul 1 2011
System image file is "flash:c181x-advipservicesk9-mz.124-15.T3.bin"
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
Cisco 1812 (MPC8500) processor (revision 0x400) with 118784K/12288K bytes of m.
Processor board ID FHK120622J3, with hardware revision 0000
10 FastEthernet interfaces
1 ISDN Basic Rate interface
31488K bytes of ATA CompactFlash (Read/Write)
Configuration register is 0x2102
Thanks again for your help,
Josh -
Hello
I am very new to Java and am currently studying a course in the language.
I am working through a tutorial at the moment and a question has been asked and I am struggling a bit
I have been given the code to a program that creates a window with a ball bouncing around inside the window.
There are 2 classes (code below) - Call class - this contains all the code need to create the ball and BallWorld Class (the main Class) this create the window and moves the ball, it also detects if the ball hits the edge of the window, whne this happens it redirects the ball. I understand how all this code works
I have been asked the following:-
Rather than testing whether or not the ball has hit the wall in the nmain program, we could use inhertitance to provide a specialized forom of Ball. Create a class BoundedBall that inherits from the class Ball. The constructor for this class should provide the height and width of the window, which should be maintained as data fields in the class, rewrite the move method so that the ball moves outside the bound, it automatically reflects its direction. Finally rewrite the BallWorld class to use an instance of BoundedBall rather than ordianary Ball, and elimiante the bounds test in the main program.
I am having trouble with this and I can not get my code to work, I think I may be going in completly the wrong direction with the code can sombody please provide me with a simple working code for both the BoundedBall and ammended BallWorld class, as this will help me understand whare I am going wrong
Ball class
//a generic round colored object that moves
import java.awt.*;
public class Ball {
public Ball (Point lc, int r) { //constructor for new ball
//ball centre at point loc, radius rad
loc = lc;
rad = r;
protected Point loc; //position in window
protected int rad; //radius of ball
protected double changeInX = 0.0; //horizontal change in ball position in one cycle
protected double changeInY = 0.0; //vertical change in ball position in one cycle
protected Color color = Color.blue; //colour of ball
//methods that set attributes of ball
public void setColor(Color newColor) {color = newColor;}
public void setMotion(double dx,double dy)
{changeInX = dx; changeInY = dy;}
//methods that access attributes of ball
public int radius() {return rad;}
public Point location() {return loc;}
//methods to reverse motion of the ball
public void reflectVert(){ changeInY = -changeInY; }
public void reflectHorz(){ changeInX = -changeInX; }
//methods to move the ball
public void moveTo(int x, int y) {loc.move(x,y);}
public void move(){loc.translate((int)changeInX, (int)changeInY);}
//method to display ball
public void paint (Graphics g) {
g.setColor(color);
g.fillOval(loc.x-rad, loc.y-rad, 2*rad, 2*rad);
BallWorld class
//A bouncing ball animation
import java.awt.*; //import the awt package
import javax.swing.JFrame; //import the JFrame class from the swing package
public class BallWorld extends JFrame{
public static void main (String [] args){
BallWorld world = new BallWorld(Color.red);
world.show();
for(int i = 0; i < 1000; i++) world.run();
System.exit(0);
public static final int FrameWidth = 600;
public static final int FrameHeight = 400;
private Ball aBall = new Ball(new Point (50,50),20);
private BallWorld(Color ballColor) { //constructor for new window
//resize frame, initialize title
setSize(FrameWidth, FrameHeight);
setTitle("Ball World");
//set colour and motion of ball
aBall.setColor(ballColor);
aBall.setMotion(3.0, 6.0);
public void paint (Graphics g) {
//first draw the ball
super.paint(g);
aBall.paint(g);
public void run(){
//move ball slightly
aBall.move();
Point pos =aBall.location();
if ((pos.x < aBall.radius()) ||
(pos.x > FrameWidth - aBall.radius()))
aBall.reflectHorz();
if ((pos.y < aBall.radius()) ||
(pos.y > FrameHeight - aBall.radius()))
aBall.reflectVert();
repaint();
try{
Thread.sleep(50);
} catch(InterruptedException e) {System.exit(0);}Here - you can study this :0))import java.awt.*;
import javax.swing.*;
public class MovingBall extends JFrame {
mapPanel map = new mapPanel();
public MovingBall() {
setBounds(10,10,400,300);
setContentPane(map);
public class mapPanel extends JPanel {
Ball ball = new Ball(this);
public void paintComponent(Graphics g) {
super.paintComponent(g);
ball.paint(g);
public class Ball extends Thread {
mapPanel map;
int x = 200, y = 20, xi = 1, yi = 1;
public Ball(mapPanel m) {
map = m;
start();
public synchronized void run(){
while (true) {
try{
sleep(10);
catch(InterruptedException i){
System.out.print("Interrupted: ");
move();
public void move() {
map.repaint(x-1,y-1,22,22);
if (x > map.getWidth()-20 || x < 0) xi = xi*-1;
if (y > map.getHeight()-20 || y < 0) yi = yi*-1;
x = x + xi;
y = y + yi;
map.repaint(x-1,y-1,22,22);
public void paint(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setColor(Color.red);
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.fillOval(x,y,20,20);
g2.dispose();
public static void main(String[] args) {
new MovingBall().show();
} -
Need help with a simple basketball game.
Hi im new here and I need help with making this simple basketball game.
Im trying to recreate this game from this video. Im not sure if he is using as2 or as3
Or if anyone could help me make a game like this or direct me to a link on how to do it It would be greatly appreciated.If you couldn't tell whether it is AS2 or AS3, it is doubtful you can turn it from AS2 into AS3, at least not until you learn both languages. There is no tool made that does it for you.
-
Need help with a simple application
hi guys, i am doing a school project. i used studio enterprise 8 to create a j2ee application, using mysql as the database. i believe i have installed all the encessary and the classpaths are right.
i coded, build and run the application, but it isnt working...to be sure the database is working, i wrote a simple code just to connect to the database and insert datas. it worked. but when i run the application, everything complied correctly, and when i use cmd to run the test file, it executed with no errors. but the database didnt changed.
can someone guide me along? as there are a few files, i have uploaded it to http://www.comp.nus.edu.sg/~ngjianfe/IRMS.zip
thanks!hihi, there has been much progression but i am having problem again. i dont know what went wrong also. checked everything i could, including ejb-jar.xml, sun-cmp-mappings.xml, sun-ejb.jar.xml, sun-web.xml, web.xml.
i wrote 3 entity beans, with 3 respective session beans. 2 of them i tested and works perfectly fine. but for the other way, which i have coded the same way, did not work. below is the errors from the server log...
[#|2006-02-10T16:00:42.656+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5004: UnExpected error occured while creating ejb container
java.lang.ClassNotFoundException: com.sun.ejb.containers.TimerBean_2100919770_ConcreteImpl
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:710)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:267)
at com.sun.ejb.containers.EntityContainer.<init>(EntityContainer.java:219)
at com.sun.ejb.containers.TimerBeanContainer.<init>(TimerBeanContainer.java:39)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:234)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:481)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:95)
at com.sun.enterprise.server.AbstractManager.loadSystem(AbstractManager.java:287)
at com.sun.enterprise.server.SystemAppLifecycle.loadSystemApps(SystemAppLifecycle.java:134)
at com.sun.enterprise.server.SystemAppLifecycle.onStartup(SystemAppLifecycle.java:75)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
|#]
[#|2006-02-10T16:00:42.656+0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=10;|CORE5021: Application NOT loaded: [__ejb_container_timer_app]|#]
[#|2006-02-10T16:00:43.156+0800|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.ejb|_ThreadID=10;|Instantiated container for: ejbName: UsersManagerBean; containerId: 74682042230767621|#]
[#|2006-02-10T16:00:43.312+0800|INFO|sun-appserver-pe8.2|javax.enterprise.system.container.ejb|_ThreadID=10;|Instantiated container for: ejbName: UserPositionsManagerBean; containerId: 74682042230767619|#]
[#|2006-02-10T16:00:43.406+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.ejb|_ThreadID=10;|EJB5090: Exception in creating EJB container [java.lang.ClassNotFoundException: irmsEB.UserHierarchyBean_1449721501_ConcreteImpl]|#]
[#|2006-02-10T16:00:43.406+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.ejb|_ThreadID=10;|appId=irms moduleName=irms-EJBModule_jar ejbName=UserHierarchyBean|#]
[#|2006-02-10T16:00:43.406+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.core.classloading|_ThreadID=10;|LDR5004: UnExpected error occured while creating ejb container
java.lang.ClassNotFoundException: irmsEB.UserHierarchyBean_1449721501_ConcreteImpl
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:710)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:267)
at com.sun.ejb.containers.EntityContainer.<init>(EntityContainer.java:219)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:273)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:481)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:95)
at com.sun.enterprise.server.AbstractManager.load(AbstractManager.java:185)
at com.sun.enterprise.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:200)
at com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
|#]
[#|2006-02-10T16:08:15.781+0800|WARNING|sun-appserver-pe8.2|javax.enterprise.resource.corba.ee._CORBA_.util|_ThreadID=16;|"IOP00100006: (BAD_PARAM) Class com.sun.ejb.containers.EJBLocalObjectInvocationHandler is not Serializable"
org.omg.CORBA.BAD_PARAM: vmcid: OMG minor code: 6 completed: Maybe
at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:989)
at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1004)
at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:718)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:652)
at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:259)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:462)
at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:131)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:724)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:790)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:204)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:573)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:159)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:225)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:207)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:147)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:801)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:864)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:647)
at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:259)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:462)
at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:131)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:138)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:605)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:571)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:159)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:225)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:207)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:147)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:801)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:864)
at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:242)
at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:39)
at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:34)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:718)
at javax.rmi.CORBA.Util.copyObject(Util.java:316)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:169)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at irmsSB._UserHierarchyManagerRemote_DynamicStub.findJunior(_UserHierarchyManagerRemote_DynamicStub.java)
at org.apache.jsp.UserHierarchyTest_jsp._jspService(UserHierarchyTest_jsp.java:100)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
|#]
[#|2006-02-10T16:08:15.796+0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=16;|java.rmi.MarshalException: CORBA BAD_PARAM 1330446342 Maybe; nested exception is:
java.io.NotSerializableException:
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:230)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.wrapException(Util.java:651)
at javax.rmi.CORBA.Util.wrapException(Util.java:279)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:185)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
at irmsSB._UserHierarchyManagerRemote_DynamicStub.findJunior(_UserHierarchyManagerRemote_DynamicStub.java)
at org.apache.jsp.UserHierarchyTest_jsp._jspService(UserHierarchyTest_jsp.java:100)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
Caused by: java.io.NotSerializableException:
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:223)
... 42 more
Caused by: org.omg.CORBA.BAD_PARAM: vmcid: OMG minor code: 6 completed: Maybe
at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:989)
at com.sun.corba.ee.impl.logging.OMGSystemException.notSerializable(OMGSystemException.java:1004)
at com.sun.corba.ee.impl.orbutil.ORBUtility.throwNotSerializableForCorba(ORBUtility.java:718)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:652)
at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:259)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:462)
at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:131)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:724)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:790)
at com.sun.corba.ee.impl.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:204)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:573)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:159)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:225)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:207)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:147)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:801)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:864)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_abstract_interface(CDROutputStream_1_0.java:647)
at com.sun.corba.ee.impl.encoding.CDROutputStream.write_abstract_interface(CDROutputStream.java:259)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.writeAbstractObject(Util.java:462)
at javax.rmi.CORBA.Util.writeAbstractObject(Util.java:131)
at com.sun.corba.ee.impl.io.IIOPOutputStream.writeObjectOverride(IIOPOutputStream.java:138)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:287)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.corba.ee.impl.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:605)
at com.sun.corba.ee.impl.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:571)
at com.sun.corba.ee.impl.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:159)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:225)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValueWithVersion(ValueHandlerImpl.java:207)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:147)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.writeRMIIIOPValueType(CDROutputStream_1_0.java:801)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:850)
at com.sun.corba.ee.impl.encoding.CDROutputStream_1_0.write_value(CDROutputStream_1_0.java:864)
at com.sun.corba.ee.impl.encoding.CDROutputStream.write_value(CDROutputStream.java:242)
at com.sun.corba.ee.impl.copyobject.ORBStreamObjectCopierImpl.copy(ORBStreamObjectCopierImpl.java:39)
at com.sun.corba.ee.impl.copyobject.FallbackObjectCopierImpl.copy(FallbackObjectCopierImpl.java:34)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.copyObject(Util.java:718)
at javax.rmi.CORBA.Util.copyObject(Util.java:316)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.copyResult(DynamicMethodMarshallerImpl.java:414)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:169)
... 39 more
|#]
anyone got any idea? thanks -
Help with a simple program.
I need some help writing a simple program. Can anybody help??
thanks to all.
2. HTML Java Source Code Reserved Word Highlighter
Write a program that inputs a Java source code file and outputs a copy of that file with Java keywords surrounded with HTML tags for bold type. For example this input:
public class JavaSource
public static void main ( String[] args )
if ( args.length == 3 )
new BigObject();
else
System.out.println("Too few arguments.");
will be transformed into:
<B>public</B> <B>class</B> JavaSource
<B>public</B> <B>static</B> <B>void</B> main ( String[] args )
<B>if</B> ( args.length == 3 )
<B>new</B> BigObject();
<B>else</B>
System.out.println("Too few arguments.");
In a browser the code will look like this:
public class JavaSource
public static void main ( String[] args )
if ( args.length == 3 )
new BigObject();
else
System.out.println("Too few arguments.");Here is something that may get you started...
import java.io.*;
import java.util.*;
public class HtmlJava{
public static void main(String arg[]){
if(arg.length!=1){
System.out.println("Usage java HtmlJava sourceFile");
else
new HtmlJava(arg[0]);
HtmlJava(String source){
try{
BufferedReader sourceReader=new BufferedReader(new InputStreamReader(new FileInputStream(source)));
BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(source+"Html.txt")));
Vector keywords=new Vector();
addKeywords(keywords);
String line;
StringTokenizer tokenizer=null;
String word;
while((line=sourceReader.readLine () )!=null){
tokenizer=new StringTokenizer(line);
while(tokenizer.hasMoreTokens()){
word=tokenizer.nextToken();
if(keywords.contains(word)){
writer.write(""+word+" ");
else{
writer.write(word+" ");
writer.write("\r\n");
writer.close();
sourceReader.close();
System.out.println("Output File written to "+source+"Html.txt");
catch(Exception ex){
ex.printStackTrace();
private void addKeywords(Vector keywords){
keywords.addElement ( "abstract");
keywords.addElement( "boolean");
keywords.addElement( "break");
keywords.addElement( "byte");
keywords.addElement( "byvalue");
keywords.addElement( "case");
keywords.addElement( "cast");
keywords.addElement( "catch");
keywords.addElement( "char");
keywords.addElement( "class");
keywords.addElement( "const");
keywords.addElement( "continue");
keywords.addElement( "default");
keywords.addElement( "do");
keywords.addElement( "double");
keywords.addElement( "else");
keywords.addElement( "extends");
keywords.addElement( "false");
keywords.addElement( "final");
keywords.addElement( "finally");
keywords.addElement( "float");
keywords.addElement( "for");
keywords.addElement( "future");
keywords.addElement( "generic");
keywords.addElement( "goto");
keywords.addElement( "if");
keywords.addElement( "implements");
keywords.addElement( "import");
keywords.addElement( "inner");
keywords.addElement( "instanceof");
keywords.addElement( "int");
keywords.addElement( "interface");
keywords.addElement( "long");
keywords.addElement( "native");
keywords.addElement( "new");
keywords.addElement( "null");
keywords.addElement( "operator");
keywords.addElement( "outer");
keywords.addElement( "package");
keywords.addElement( "private");
keywords.addElement( "protected");
keywords.addElement( "public");
keywords.addElement( "rest");
keywords.addElement( "return");
keywords.addElement( "short");
keywords.addElement( "static");
keywords.addElement( "super");
keywords.addElement( "switch");
keywords.addElement( "synchronized");
keywords.addElement( "this");
keywords.addElement( "throw");
keywords.addElement( "throws");
keywords.addElement( "transient");
keywords.addElement( "true");
keywords.addElement( "try");
keywords.addElement( "var");
keywords.addElement( "void");
keywords.addElement( "volatile");
keywords.addElement( "while");
}Hope it helped -
Hi, I'm quite new to AS so this is actually quite simple but
is something I've yet to figure out.
My flash movie comprises of several sections, and all these
can be accessed from the main menu. Right now, what I'm doing is to
preload all the sections at once before starting the clip. However,
as more sections are added on, I found that it takes longer and
longer to preload. Therefore, I wish to preload just the main menu
first. Only after the user selects the section he wanted to enter
will that section be loaded. I understand this is what a lot of
websites are doing now but I'm still trying to understand the
mechanics...greatly appreciated for any help rendered!Hi, thanks for the help, I worked it out to be something like
this:
this.onRelease= function(){
loadMovieNum(section2.swf, 0)
My site works in such a way that there're many big buttons on
the main page, and clicking on them leads to a sub-section which
will replace the main page. Using the loadMovieNum() function
works, but how do I access some of the variables that I declared on
the main clip? For example, I've got a soundvol variable that I
want to decrease as I load section2.swf...this is to fade out the
background music of the main clip...thanks for any help! -
I need help with iTunes 7, but its a little more complex than that
I share a computer with my brother, which makes my situation a little trickier than usual. You see, I want to install the new version of iTunes, but when the setup was done, and it as ready to install, an error occured. I forget the number of the error but it said that I had not given it verification of ownership and that the program could not be stopped. i have a vague idea of what i have to do, i have to wipe my comp clean of iTunes and then download the new version. The problem with that is that my brother is an arrogant idiot who has little patience for anything that he doesn't understand. That's why I'm reluctant to wipe iTunes clean. I know that we can just save our iTunes library in some folder or on a disk, but it'll take me a while to get it through to him that no harm will come. That being, does anyone know how to wipe iTunes off my account only, and then install iTunes 7 on my account only. I got my iPod video for X-mas and its proven to be utterly useless so far. I really hope that one of you can assist me because otherwise, i'll have to deal with a lumbering b
a few questions before proceeding.
are you getting an error message? if so, what does it say? include error message numbers if you're getting any.
or are you getting no error messages whatsoever when you try to launch itunes?
if you're getting no error messages whatsoever, do you just see the wee hourglass for a few seconds, and then nothing? if so, do you also have Norton Internet Security 2005 installed on that PC?
or are you seeing a brief "flash" of the itunes license screen (and then nothing)? if so, do you also see similar behavior when you try to launch your QuickTime? -
Sql gurus help needed.. simple but awkward
Im trying to use dates stored in a char field...field called segment1
2006/09/11 00:00:00 This is the format they are being stored as
When i select this data im converting to date format to make it look good to_date(tppc.segment1,'YYYY-MM-dd:HH24:MI:SS')
The problem is in the where clause, when i goto put a condition in its like it does not recognise the date format.....
so where to_date(tppc.segment1,'YYYY-MM-dd:HH24:MI:SS') = '31-OCT-2008' ..... error - ORA-01841: (full) year must be between -4713 and +9999
so where to_date(to_date(tppc.segment1,'YYYY-MM-dd:HH24:MI:SS'),'DD-MON-YYYY') = '31-OCT-2008' again error ORA-01841
I have checked all the data and the format 2006/09/11 00:00:00 is the same in all records...
Does someone know what to do ....
Data Output ---- TO_CHAR(to_date(tppc.segment1,'YYYY-MM-dd:HH24:MI:SS'),'DD-MON-YYYY') - 11-SEP-2006Hi Sharky,
Are you completely sure that all of the records in your table contain properly formated date strings in segment1?
you can check it with a simple function:
create or replace FUNCTION "VALIDATE_DATE"
( date_String VARCHAR2,
format VARCHAR2 := 'dd-mon-yyyy' )
RETURN VARCHAR2
DETERMINISTIC
IS
dt DATE;
BEGIN
dt := to_date( date_string, format );
RETURN 'Y';
EXCEPTION
WHEN OTHERS THEN
RETURN 'N';
END;
/which you use to select records which have invalid dates like so:
select *
from your_table
where validate_date(segment1, 'YYYY-MM-dd:HH24:MI:SS')='N';The next thing to consider is that when you use a to_date function on segment1 you are converting it to a date data type, but in your comparisson you are comparing that data data type to a string constant. To perform the equality test Oracle needs to change the data type of one side of the equality to match the data type on the other side of the equality. Generally speaking you should explicitly convert one of them to match the other. For example you should wrap your string constant in a to_date function so you end up comparing two dates, or since the segment1 value is already in a canonical date format, you could change your string constant to the same canonical date format removing the to_date off of segement1 so you are just doing a string comparison. -
Can someone help with this simple application
I am taking my first java class and there are limited resourses for the class as far as getting help with coding.
Any hoo if any one can point me in the correct direction from the following information listed below I would be greatfull. I am trying to use the set and get methods on the instance veriables and then I am goign to post the results once I get them workign to a JOption pane window.
examples are most welcome thanks
// Invoice.java
// Homework assignment 3.13
// Student Arthur Clark
public class Invoice // public class
String partNumber;// instance veriable quantity
String partDescription;// instance verialbe partDescription
//constructors
public void setpartNumber( String number, String description )
partNumber = number; //initalize quantity
partDescription = description; // initalize partDescription
}// end constructors
//method getpartNumber
public String getpartNumber()
return partNumber;
}//end method getpartNumber
public String getpartDescription()
return partDescription;
}// end method getpartDescription
public void displayMessage()
//this is the statement that calls getpartNumber
System.out.printf(" part number # \n%s!\n the description", getpartNumber(), getpartDescription() );
} // method displaMessage
}// end method main
// Fig. 3.14 InvoiceTest.java
// Careate and manipulate an account object
import java.util.Scanner;
import javax.swing.JOptionPane;//import JOptionPane
public class InvoiceTest{
// main method begins the exciution of the program
public static void main ( String args [] )
// create Scanner to obtain input from mommand window
Scanner input = new Scanner ( System.in );
// create a Invoice object and assig it to mymethod
Invoice myMethod = new Invoice();
Invoice myMethod2 = new Invoice();
// display inital value of partName, partDescriptoin
System.out.printf( "inital partname is %s\n\n", myMethod.getpartNumber() );
// prompt for and read part name, partDescription
System.out.println( "please enter the Part Number:" );
String theNumber = input.nextLine(); // read a line of text
myMethod.setpartNumber( theNumber ); // set the part name with in the parens
System.out.println();// outputs blank line
myMethod.displayMessage();
System.out.println( "please enter the Part Description" );
String theDescription = input.nextLine(); // read a line of text
myMethod2.setpartDescription( theDescription );// set the part description
System.out.println();// outputs blank line
myMethod2.displayMessage();
}// end main mehtod
}// end class//constructors
public void setpartNumber( String number, String description )
partNumber = number; //initalize quantity
partDescription = description; // initalize partDescription
}// end constructorsThe above code is not a constructor. You do not include a return type, void or anything else. Also, the constructor should be called the same as your class.
public Invoice( String number, String description )
partNumber = number;
partDescription = description;
} Another thing, comments should only be used when it isn't bleedingly obvious what your code is doing.
P.S. is your middle initial C? -
Im DROWNING! need help with a simple java assignment! plz someone help me!
i need help with my java assignment, with validating a sin number. easy for must who know java. im drowning... please help!
You will need to store each digit of the social insurance number in a field of its own. To validate the entry you will:
1. Multiply the 2nd, 4th, 6th and 8th digit by 2.
2. If the product of any of the four multiplications result in a value greater than 9, add the two resulting digits together to yield a single-digit response. For example 6 * 2 = 12, so you would add the 1 and the 2 to get a result of 3.
3. Add these four calculated values together, along with the 1st, 3rd, 5th, and 7th digits of the original number.
4. Subtract this sum from the next highest multiple of 10.
5. The difference should be equal to the 9th digit, which is considered the check digit.
Example of validating S.I.N. 765932546
1st digit 7
2nd digit (6*2 =12 1+2=) 3
3rd digit 5
4th digit (9*2 = 18 1+8 =) 9
5th digit 3
6th digit (2*2 = 4) 4
7th digit 5
8th digit (4*2 = 8) 8
Total 44 next multiple of 10 is 50
50-44 = 6 which is the 9th digit
Therefore the S.I.N. 765932546 is Valid
********* SIN Validation *********
Welcome - Please enter the first number: 120406780
Second digit value multiplied by 2 4
Fourth digit value multiplied by 2 8
Sixth digit value multiplied by 2 12
Eighth digit value multiplied by 2 16
Value derived from 6th digit 3
Value derived from 8th digit 7
The total is 30
Calculated digit is 10
Check digit must be zero because calculated value is 10
The SIN 120406780 is Valid
this is my assignemtn this is what i have! i dont know where to start! please help me!
/* File: sinnumber.java
Author: Ashley
Date: October 2006
Purpose: Lab1
import java.util.Scanner;
public class Lab1
public static void main(String[] args)
Scanner input = new Scanner(System.in);
int sin = 0;
int number0, number1, number2, number3, number4, number5, number6, number7, number8;
int count = 0;
int second, fourth, sixth, eighth;
System.out.print("\t\n**********************************");
System.out.print("\t\n**********SIN Validation**********");
System.out.print("\t\n**********************************");
System.out.println("\t\nPlease enter the First sin number: ");
sin = input.nextInt();
count = int.length(sin);
if (count > 8 || count < 8)
System.out.print("Valid: ");
} -
Help with a simple question-please
Forgive me if this has been covered already, it seems like such a simple request but I can not find any simple answers...
I am currently using the trial version of acrobat 9.. I am considering buying. I want to create fillable PDF forms(for personal use). When I fill them them out I want to be able to email the filled out form, and save a copy of the filled out form. Can I do this? If yes how?
Basically, i want to take all my personal forms that I now send out via snail mail(some are order forms, some are claim forms that I send to my insurance co, etc...). I want to make them into fillable pdf's so i can fill them out on my computer and then email them to whoever I choose. Can I do this? How?Do you want them to be filled0in with Reader, or Acrobat? To create a form in the first place, you'll need Acrobat. Once you've added the fields and entered the form data, you just have to save it as a new document. You can then attach the document to an email as you would any other type of file. You can also set up a "submit" type button to partially automate the process of saving and attaching a document to an email.
If you want to create a form that Reader users can fill-in and save, you will have to Reader-enable the document. In Acrobat 9, you do this by opening the document in Acrobat and selecting "Advanced > Extend Features in Adobe Reader...".
Regarding locking the document, you cannot do it securely with Reader, but you can set up the form so that the fields are set to read-only after it is filled-in but before it is saved. This may require a bit of programming in JavaScript, but it's not too complicated.
George
Maybe you are looking for
-
BUG: LR5 Quits when I use keyboard arrows to adjust saturation of Split Toning colors.
File: Canon .CR2 raw LR Module: Develop When attempting to adjust saturation of colors in Split Toning, LR immediately stops working. Specifically, when attempting to manually select a Split Toning color --> Click Color Box to open full range of Hue
-
Hi, I am getting error like unable to open when i am clicking IR. please let me know the details. Thanks, Ganesh
-
My iMac G5 also won't burn or even accept discs, keeps spitting them out
It first stopped burning discs, and today it started throwing the DVDs and CDs back out. When I originally called up within warranty (it ended at the end of last month), I was told something could be done as an exception (they apparently can't pick u
-
"the attachment size exceeds the allowable limit" when trying to move email
I am just trying to archive deleted items yet when I even highlight a small range and try to move them to the archive I get the attached error. I've done and advanced find in the deleted items folder for attachments larger than 1MB and already moved
-
After the iOS8 update I can't put my music back on my phone
So I updated my iPhone 5s to iOS8, but I was short of storage so I erased all the music from my phone since I have it backed up on my Mac. Now, when I connect my phone to the Mac it won't synchronize the music from the computer to my phone. Also, acc