Java Window Alert Help

Hi.

I’m doing some beginner homework for my scripting course, and I’ve run into a seemingly simple yet annoying problem when the pop up box appears.

Attachment 15435 (http://www.codingforums.com/attachments/javascript-programming/15435-java-window-alert-help-age-calculator-help-jpg)

It’s leaving out spaces before and after the middle string…

Posted in Codes & Scripts | Tagged , , , | Leave a comment

how to Find the largest value in the tree set in java?

I have the treeset as follows:

abcB, abcA, abcE, pqrsA, pqrsB, pqrsC, xyzE, xyzD

and I want to print output as:

abcA
pqrsA
xyzD

Posted in Codes & Scripts | Tagged , , , , | Leave a comment

a beginners question

So if I want to invent my own alphabet, how would I construct the characters or fonts or whatever you want to call them, I’m just learning python, but I am curious about things like this.

Posted in Codes & Scripts | Tagged , | Leave a comment

Facing an issue while executing Sqoop import command in Hadoop 2. 6. 0

I am using MAC Osx for Hadoop Stack. I am using MySQL as the database for it.I was am trying to execute a Sqoop import command:

sqoop import –connect jdbc:mysql://127.0.0.1/emp –table employee –username root –password reality –m 1 –target-dir /sqoop_import

But I am facing below-mentioned issue while executing it. Even in /etc/hosts, localhost is at 127.0.0.1.host file screenshot. I have tried pinging localhost and it works but the error of host is down, still prevails. Please help.

2016-02-06 17:42:38,267 INFO  [main] mapreduce.Job: Job job_1454152643692_0010 failed with state FAILED due to: Application application_1454152643692_0010 failed 2 times due to Error launching appattempt_1454152643692_0010_000002. Got exception: java.io.IOException: Failed on local exception: java.net.SocketException: Host is down; Host Details : local host is: "Mohits-MacBook-Pro.local/192.168.0.103"; destination host is: "192.168.0.105":38183;
    at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:772)
    at org.apache.hadoop.ipc.Client.call(Client.java:1472)
    at org.apache.hadoop.ipc.Client.call(Client.java:1399)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:232)
    at com.sun.proxy.$Proxy32.startContainers(Unknown Source)
    at org.apache.hadoop.yarn.api.impl.pb.client.ContainerManagementProtocolPBClientImpl.startContainers(ContainerManagementProtocolPBClientImpl.java:96)
    at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.launch(AMLauncher.java:119)
    at org.apache.hadoop.yarn.server.resourcemanager.amlauncher.AMLauncher.run(AMLauncher.java:254)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Host is down
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:454)
    at sun.nio.ch.Net.connect(Net.java:446)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:192)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:530)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:494)
    at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:607)
    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:705)
    at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:368)
    at org.apache.hadoop.ipc.Client.getConnection(Client.java:1521)
    at org.apache.hadoop.ipc.Client.call(Client.java:1438)
    ... 9 more
. Failing the application.
2016-02-06 17:42:38,304 INFO  [main] mapreduce.Job: Counters: 0
2016-02-06 17:42:38,321 WARN  [main] mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
2016-02-06 17:42:38,326 INFO  [main] mapreduce.ImportJobBase: Transferred 0 bytes in 125.7138 seconds (0 bytes/sec)
2016-02-06 17:42:38,349 WARN  [main] mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
2016-02-06 17:42:38,350 INFO  [main] mapreduce.ImportJobBase: Retrieved 0 records.
2016-02-06 17:42:38,351 ERROR [main] tool.ImportTool: Error during import: Import job failed!
Posted in Codes & Scripts | Tagged , , , , , , | Leave a comment