Plz help with a simple method
hi all, i have to implement this method, that returns the string label of the given vertex in the graph . Valid numbers are 0 through numVerts(numberof vertices in graph) - 1;
public string labedOf(int vertexNum){
for (int i - 0; i !=adjlists.length; i++){ //adjlists is an array that holds the vertices
if (i = vertexNum)
break;}
return adj;
} // would this method work or there is something wrong with it, any kind of help is really appreciated.
thanks a lot
Hello,
This method will not work, the comparison operator is not rigth as another user posted here. string should be String (capital!). The variable 'adj' isn't set anywhere.
And if I understood you well you just want to return a String value of an element in the array passing the index as an argument. If this is the case there is not reason to loop through the whole array! It should be very short, something like:
public String labelOf(int vertexNum){
return adjlists[vertexNum];
assuming adjlists is defined somewhere outside the method and holds the String's.
Hope this helps,
Hans.
Similar Messages
-
Plz help!! idempotent methods stateful session beans? (failover)
plz help!! idempotent methods stateful session beans? (failover)
Hi there,
Im trying to failover my shopping cart implemented using stateful ejb, the replication
is working but the failover is not (Object not found exception....).
By design is hard to think on an stateful ejb using idempotent methods, but after
checking the documentation in detail im completely confused, so im starting to
wonder if i should use idempotent methods or manual retry in case one server is
down.
Plz take a loo at these explanations about faiolver in the WLS edocs.
"....With clustered objects, automatic failover generally occurs only in cases
where the object is idempotent.....Because of this, replica-aware stubs will not,
by default, attempt to retry a method that fails after the request is sent but
before it returns. This behavior can be overridden by marking a service idempotent..."
BUT
"By default, a stateful session bean's Home stub provides load balancing and failover
for its method invocations to any clustered server where the bean is deployed...."
So is possible to achieve automatic failover (not only load balancing) for stateful
ejb without having to worry about state-changes or manual retry. (i know the retry
is requiered if the server crashed just before finishing a transaction but this
is not what im talking about).
Any help will be highly appreciated
Alan
Ryan,
Yes, im deploying using In-memory replication and clusterable elements, when try
to invoke the method (after one of the nodes is down) i recieve an "java.rmi.NoSuchObjectException:
Bean has been deleted".
I believe all this could be related to some sort of issue with JNDI Lookup in
the cluster, but haavent been able to get a clue to make it work....(almost desesperate
by now)
Alan
"ryan upton" <[email protected]> wrote:
>Alan,
>
>If the state isn't maintained during failover I would suspect a
>configuration error. Have you set the <replication-type> element within
><stateful-session-clustering> tag in the bean's deployment descriptor?
>
>"Alan" <[email protected]> wrote in message
>news:40e17cf7$1@mktnews1...
>>
>> Ryan,
>>
>>
>> Maybe i didnt explain myself, in the scenario im dealing with I KNOW
>the
>method
>> finished succesfully (example, the user succesfully added an item to
>a
>cart).
>>
>>
>> Just after that one of the nodes goes down, and the user decides to
>add a
>new
>> item (new invocation , not a retry of failed one) on the same session.
>>
>> This is the case in which failover should work automatically as you
>say,
>meaning
>> the new method invokation should be able to retrieve the session state
>info from
>> the replica and switch the primary.....Well, this is the part wich
>isnt
>working
>> :( as i understand it should transparently
>>
>> I believe could be a config issue , but have no way to make it work.
>>
>> Regards,
>>
>> Alan
>> "ryan upton" <[email protected]> wrote:
>> >
>> >"Alan" <[email protected]> wrote in message
>news:40e06296@mktnews1...
>> >>
>> >> Ryan,
>> >>
>> >> Thanks for clearing the both conditions a bit more, in this case
>my
>> >issue
>> >has
>> >> to do with the scenario #1 in which subsequent calls (invocations)
>> >go to a
>> >node
>> >> which isnt avaliable(down), do you have any idea of in what conditions
>> >the
>> >"automnatic"
>> >> failover would fail??? (meaning why the stub would try to dispatch
>> >a call
>> >to the
>> >> same previous node)
>> >>
>> >> Thanks for the help again
>> >>
>> >
>> >Subsequent calls won't go to a node that's down. That's the whole
>> >point
>> >;-). Failover is always automatic, what you are getting confused
>on
>> >is
>> >automatic method re-execution upon failover which happens if the method
>> >has
>> >been marked as idempotent. The logic is this: if I failover to an
>EJB
>> >that
>> >I know is still alive, I can't safely call the same method again.
> Why?
>> >Because I don't know how much of the method completed the last time
>before
>> >the previous bean's failure. So if the bean can yield multiple results
>> >from
>> >multiple invocations I had better play it safe and not re-execute
>the
>> >method
>> >on the bean I failed over to (unless it's idempotent because in that
>> >case it
>> >doesn't matter how many times I call it, it always does the same thing).
>> > In
>> >scenario #1 and #2 failover is automatic and all new calls are executed
>> >against the bean the client failed over to, but only idempotent methods
>> >are
>> >re-executed.
>> >
>> >
>>
>
>
-
What's wrong with this simple method
i'm having compile troubles with this simple method, and i think it's got to be something in my syntax.
public String setTime()
String timeString = new String("The time is " + getHours() + ":" + getMinutes() + ":" + getSeconds() + " " + getIsAM());
return timeString;
this simple method calls the get methods for hours, minutes, seconds, and isAM. the compiler tells me i need another ) right before getSeconds(), but i don't believe it. i know this is a simple one, but i could use the advice.
thanks.Hi,
I was able to compile this method , it gave no error -
Need Help with a getText method
Gday all,
I need help with a getText method, i need to extract text from a JTextField. Although this text then needs to converted to a double so that i can multiply a number that i have already specified. As you may of guessed that the text i need to extract already will be in a double format.e.g 0.1 or 0.0000004 etc
Thanks for your help
ps heres what i have already done its not very good though
ToBeConverted.getText();
( need help here)
double amount = (and here)
total = (amount*.621371192);
Converted.setText("= " + total);Double.parseDouble( textField.getText() );
-
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: ");
} -
Plz help with deploying applet that uses SSL
Hi, maybe this is not the adecuate forum but ive already tried in others and i got no answer.
Im trying to use a certificate with my applet ( tha sends a lot of info to the server and also connects to another hibernate db) but im getting this error:
Server side:
username is: Panda
Registered the SSLServerSocket on port 6969
Listening ....
---- Got a connection from a client
this is an unknown client
!!!!!!Error in reading or writing from/to the client:
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at PaqueteServidor.Server$handleRequest.run(Server.java:130)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
at PaqueteServidor.Server.printClientCerts(Server.java:47)
at PaqueteServidor.Server.run(Server.java:100)
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at PaqueteServidor.Server$handleRequest.run(Server.java:130)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getSession(Unknown Source)
at PaqueteServidor.Server.printClientCerts(Server.java:47)
at PaqueteServidor.Server.run(Server.java:100)
Client side:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at Interfaz.InterfazMovil.init(InterfazMovil.java:89)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
... 14 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 19 more
19:40:34,444 INFO Environment:464 - Hibernate 3.0.5
19:40:34,444 INFO Environment:477 - hibernate.properties not found
19:40:34,444 INFO Environment:510 - using CGLIB reflection optimizer
19:40:34,454 INFO Environment:540 - using JDK 1.4 java.sql.Timestamp handling
19:40:34,645 INFO Configuration:1110 - configuring from resource: /bd/hibernate/hibernate.cfg.xml
19:40:34,645 INFO Configuration:1081 - Configuration resource: /bd/hibernate/hibernate.cfg.xml
19:40:35,045 ERROR XMLHelper:59 - Error parsing XML: /bd/hibernate/hibernate.cfg.xml(21) The content of elements must consist of well-formed character data or markup.
19:40:35,045 ERROR Configuration:1172 - problem parsing configuration/bd/hibernate/hibernate.cfg.xml
org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Nested exception:
org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
%%%% Error Creating SessionFactory %%%%
org.hibernate.HibernateException: problem parsing configuration/bd/hibernate/hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1173)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:51)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.dom4j.DocumentException: Error on line 21 of document : The content of elements must consist of well-formed character data or markup. Nested exception: The content of elements must consist of well-formed character data or markup.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1168)
... 6 more
java.lang.NullPointerException
at bd.hibernate.HibernateUtil.currentSession(HibernateUtil.java:59)
at bd.controlador.CLetrero.ListarLetreros(CLetrero.java:45)
at Interfaz.InterfazMovil.init(InterfazMovil.java:126)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Plz help and thx in advance.I know I didn't get round to replying but no need to post it so many times.
http://forum.java.sun.com/thread.jspa?threadID=666870
http://forum.java.sun.com/profile.jspa?userID=543817
http://forum.java.sun.com/thread.jspa?threadID=669965
http://forum.java.sun.com/profile.jspa?userID=543817
http://forum.java.sun.com/thread.jspa?threadID=669975
http://forum.java.sun.com/thread.jspa?threadID=669973
Could it be that the server and client need to open different keystores?
http://forums.java.sun.com/thread.jspa?threadID=573918&messageID=3272683
reply 7
My example given before should work on different machines, try to export the server key and import it into the
client keystore. Export the client key and import in the server keystore if you want the server to authenticate
the client.
http://forum.java.sun.com/thread.jspa?threadID=666870
reply 4
Check the method getSSLSocketFactory in the applet, that will open a keystore for you. -
Plz Help With Nokia 5800 XM ...... Plz
Hi everyone,
I have nokia 5800 and i like it very much... But i have a problem with it ..... the problem that when i download any thing from nokia OVI Store from my mobile like: Games, apps and videos when download finished and starting to install the games or the apps it's say's: "installation failed" and when i redownload it again nothing change and keep saying "installation failed" ........ and i noted that when i install app ( themes, apps and games ) on my mobile by ovi suite or by file manager it also say's to me "Expired Certificat" even if i signed this apps but it alwyas say's "Expired Certificat"....... for this problem i did: hard reset - format my mobile - format my sd card - update my mobile to v40 - but the problem never stops to return in a few hours ..... then i find out that when i need to install any app on my mobile (by ovi suite or ovi store in my mobile or file manager) i have to switch off the mobile and turn it on again to install what ever i want ...... so Plz help me out
PS: 1- I have 2 friends having the same problem that i have and they did what i did
2- my mobile software v. when the problem stated v31
3- my memory card 8 GB the orginal one
Thanx and Please Tell Me What to Do
ByeOption 1
NOTE
- YOU CAN ONLY INSTALL SIGNED APPLICATION WITH THIS METHOD.
- IF YOU DONT TAKE BACKUP OF YOUR DATA OR FOLLOW THE EXACT STEPS HERE YOU WILL LOSS ALL DATA.
1. With the phone switched on, press the power button key once.
2. Scroll down to and select "Remove E: Memory Card".
3. Select Yes to remove the memory card.
4. Press OK and remove memory card from phone.
5. Press the Dialler on the main screen.
6. Type *#7370#
7. Enter security code. Default is 12345 unless it has been changed.
8. The phone will reset, wait for this to complete and power back on.
9. Select your country and type in the correct time and date.
10. Wait for the phone to complete its configurations, you may receive "My Nokia" or tutorial messages.
11. Power off phone.
12. Insert the memory card.
13. Power on the phone.
14. Wait for the phone to install any pre-loaded content from the memory card.
15. Phone is ready to install applications, without "Expired Certificate" error message.
Option 2
Alternatively use this to apply for .CER and .KEY for signing applications / games.
Download SignSIS & FreeSigner (Freeware)
- http://www.2shared.com/file/10095405/d0fd4cfb/Sign_SIS_GUI.html
Signing Video Tutorial
- http://www.youtube.com/watch?v=z0mZ6d1klaU
Also, please feedback the results as the results could be useful to other members / visitors.
Thanks & best regards,
XM
I'm an Xploit - Please feel free to post your issues, feedbacks in this discussion forum and I'll do my level best to help, otherwise my knowledged friends whom are around willing to help you. Thank you ! -
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 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]. -
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.
-
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? -
Doesnt allow me to choose pressure in the brush properties plz help with pic
Hi, I have a problem in adobe illstrator CS4
it doesnt allow me to choose pressure or other properties in the brush properties it only allows me choose Fixed and Variable and it makes the colour of othe words like pressure silver so i cant select it from the menu and here is a picture for the problem
PLEEEEEEEEEEAAAAAAAAAAAAASE help me i really need to know how to solve this problm and by the way i tried on the same computer with windows xp and windows 7 but the problem remainsi dont have a tablet i ink with the mouse and i see in video tutorials when u ink sketches after u scan them on the computer and the dont say that u must have a tablet like in this video
http://www.youtube.com/watch?v=DM96tEAnbGs
plz help me -
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]. -
Dear experts,
I have a java application in form of a running thread that periodically does an activity ie running a BAPI in
SAP.I like to schedule this application at evening time.
Problem is that incase somebody remotely login to this Windows server using RDP and leave an open RDP session,
two instance starts one on RDP and other on console.
Now to overcome this problem i devised a solution myself that incase application detects session is remote
then it should exit itself. This is mentioned in forum undergiven.
http://forums.sun.com/thread.jspa?threadID=5410674&messageID=10835701#10835701
My perception behind carrying out this development was that incase session starts in remote then
app will automatically close and finally letting running only in console.
Now what happens is that scheduled task doesnot start at all on console ,incase console as well as RDP are open.
Instead it starts only on RDP failing instantly.So in nutshell,task doesnot start at all.My app log say that
service tried to open in remote session and got closed.Plz help as i have no way out.
My second question is that if i schedule task using RDP on remote server,will it run on Remote,console or both
of them.
Regards,
Aditya.Adi1000 wrote:
My app also generates a .lock file and make sure that only one instance is running.Still problem remains unresolvedAnd combining your other thread with the word "also" from this post just exacerbates your "problem". Also, the "lock" file was not to prevent two simulteneous runs (that leads to very distasteful race condition), but rather to prevent two runs within a set period of time when combined with the ServerSocket approach to prevent simulteneous runs.
Maybe you are looking for
-
System and sysdba accounts are locked
Hi System and sysdba accounts are locked I cannot connect is there a solution for it??
-
Mass Write Off - When Funds Management is active
Hi All, I am working for ISU project and we have a business requirment to do Mass Write Off. We are not able to do it as Funds Management is active. We had to activate Funds management as we need to send fund related information to Peoplesoft, whic
-
X Steps in Discreet manufacturing in Production order scenario
Hi XSTEPS guru's As i understand till now XSTEPS is posible in PP-PI however in one thread i saw it is mentioned its application for Discreet manufactring too.I will like to know is it really possible to apply XSTPES in discreet production order sce
-
PNG files don't work after iOS 7 update on iPad and iPhone
I have several PNG files stored on my CC account but when I start a new photoshop touch project and try to add the PNG it downloads as a blank image. The dotted outline is there but the image is blank. It used to work before iOS 7 and now it does not
-
Why won't my iPhone 4s connect to iCloud?
II've got an Apple ID, I've got great wifi( don't tell me I don't because I I'm using all my other apps with it like Facebook) and it keeps saying connection timed out and it won't verify my apple ID and I'm completely outta storage. Help?