How to use interface and abstract class in the real time sennario ?

how to validate password and reenter password fields in the struts through the xml files?

Here is a modified dealForm.jsp that merges the 2 steps - both symbol submission and Yahoo convert is done by it. Play with it and add your DB code to it:
<html>
<head><title>IPIB Database Selection</title></head>
<body bgcolor="#DFDFFF">
<H1><CENTER>IPIB Database Selection</CENTER></H1>
<font size=4>
<%@ page language="java" %>
<%@ page import="java.net.*,java.io.*,java.util.*" %>
<%
String symbol = request.getParameter("symbol");
if (symbol != null) {
String urlString = "http://finance.yahoo.com/download/javasoft.beans?SYMBOLS=" + symbol + "&format=ab";
try {
URL url = new URL(urlString);
URLConnection con = url.openConnection();
InputStream is = con.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line = br.readLine();
StringTokenizer tokenizer = new StringTokenizer(line,",");
String name = tokenizer.nextToken();
name = name.substring(1, name.length()-2);
String price = tokenizer.nextToken();
price = price.substring(1, price.length()-2);
%>
<p>
Original line from yahoo <%= line %>
</p> <p>
Name: <%= name %>
</p> <p>
Price: <%= price %>
</p> <p>
Pub DB processing code from dealLoad.jsp here
</p>
<%
} catch (IOException exception) {
System.err.println("IOException: " + exception);
} else { %>
<form action="dealForm.jsp"method="GET">
<p>Enter Symbol: <input size="20" name="symbol">
<inputtype="submit" value="Submit">
</p></form>
<% } %>
</font>
</body>
</html>

Similar Messages

  • [SOLVED] How to use timidity++ and other programs at the same time?

    I have installed timidity following arch wiki instructions - I have soundfont, and I start it in /etc/rc.conf
    It works properly with tuxguitar (and tuxguitar-alsa) or kmid, but I cannot play MIDI and - for example - oggs in amarok at the same time.
    I suspect that the problem is that timidity doesn't use dmix alsa plugin I have made in my ~/.asoundrc.
    The question is: how to tell timidity to use my dmix plugin?
    Last edited by senjin (2007-11-19 19:53:50)

    but they don't define "default" there, but "!default"...
    anyway, I have already both "default" and "!default" defined exactly the same way:
    pcm.!default
    type plug
    slave.pcm "dmixer"
    pcm.default
    type plug
    slave.pcm "dmixer"
    pcm.dmixer
    type dmix
    ipc_key 1024
    slave
    pcm "hw:0,0"
    format "S32_LE"
    channels 2
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 44100
    bindings
    0 0
    1 1
    ctl.dmixer
    type hw
    card 0
    pcm.w_y_h
    type hw
    card 0
    device 0
    pcm.what_you_hear
    type plug
    ttable.0.10 1 # digital mix left
    ttable.1.11 1 # digital mix right
    slave.pcm w_y_h
    pcm.skype
    type asym
    playback.pcm "dmixer"
    capture.pcm "skype_input"
    pcm.skype_input
    type dsnoop
    ipc_key 2048
    slave
    pcm "hw:0,0"
    period_time 0
    buffer_time 0
    period_size 1024
    buffer_size 8192
    rate 44100
    and it doesn't work!
    Last edited by senjin (2007-11-18 17:49:21)

  • Win 8 - How to use StereoMix and Headphones Mic at the same time?

    I am using Windows 8 64 bit and believe I may have an IDT driver problem.
    I need to enable StereoMix and my Headphones Mic at the same time. I know this was previously possible with windows xp and windows 7.
    What happens is If I enable either Headphones Mic (Logitech headphones with Mic) or StereoMix the other one becomes " current;ly unavailable"  I cannot get them both to work together. I can get StereoMix and the Internal Mic to work together ( both enabled at the same time) but the sound quality is bad because the internal mic picks up noises from the PC. I need to have both my headphones mic and stereo mix enabled at the same time.
    The driver I'm using is the one provided by HP with the laptop. It is called sp59620.exe
    Would another IDT driver solve the problem? Can you think of another reason this is not working?
    Here are my specs.
    System Manufacturer/Model Number HP Pavillion G7-2251dx
    OS Windows 8 64 bit
    CPU AMD A-8 4500M
    Memory 8 Gigabytes DDR3 sdram
    Graphics Card Discrete ATI Radeon HD 7640G with 2 Gigs
    Sound Card IDT Audio
    Monitor(s) Displays 17.3
    Screen Resolution 1600x900
    If you cannot help, where else should I look? i have tried Windows and Microsoft forums and no one can give me an answer.
    Thank you.

    I have tried the instructions in that video and I cant get passed the very bad feedback i get when telling my recording device to Listen.  His secone instruction from his notes here
    ["Right Click the Realtech HD audio device and set as default if its not already.
    (note you may want to turn off any powered speakers you may have to prevent feedback.)
    -Select the Recording Tab at the top of the window.
    -Select the Stereo Mix device and set it to default if its not already.
    -Right click and select Properties.
    -Select the Listen Tab at the top of the window.
    -Change the drop-down box to the entry for USB headset and check the Listen to this device checkbox.
    -click ok to dismiss the window.
    -Right click on the USB headset microphone device and select properties.
    -Select the Listen Tab at the top of the window.
    -Change the drop-down box to the entry for the Realtech HD Audio device and check the Listen to this device checkbox.
    -click ok to dismiss the window.
    So, essentially, the game audio will play through the Realtec, your mic is also set to play to the Realtec. both audio streams are now part of Stereo Mix. Stereo Mix is being listened to by your headset allowing you to hear the game and your voice.]
    ~~~~~~~~~~~~~~~~~
    Don't know about turning off any powered speakers.. the only speakers I have besides the headphones are the internal laptop speakers.  I get the same feedback if i have the headphones plugged in or not.

  • Interfaces and abstract classes

    can anyone pls tell me where exactly an abstract class is used and where exactly an interface is to be used.
    i think the main difference between an abstract class and an interface is that an interface will have all the abstract methods whereas an abstract class can have one or more abstract methods--- if i am not wrong.
    anything to add? -- pls let me know on this....
    and also how they might be useful for us....

    Inheritance is the most popular feature of the OOP. By organising classes into class hierachy it gives an extra dimension to the encapsulation of abstract data types becauase it enables classes to inherit attributes/methods from other classes.
    There are two complementary roles of inheritance in OOP application.
    1. Specialisation: Extending the functionality of an existing class.
    2. Generalisation: Sharing commonality between two or more classes.
    So adding functionality by extending what exists at each level to create more specialized classes. This would create a hierarchy and would be helpful even later on in maintenance.
    Now when to have an abstarct class and when an interface. An interface just defines the basic functionality to be implemented by all the subclasses, though the way they are implemented may be different. e.g an interfaca animal can have all those functionalities common to all animals in basics but different in implementation. e.g all animals walk however some walk on two legs and some on four. All animals can see but they might have a different colour spectrum visible. So all such methods general but common can be in an interface.
    Abstract classes come into play at a more defined level e.g in an abstract class human though walk would be the same so implemented there and then but talking can be left abstract since there may be different languages involved.
    For more details refer to a good OOP book.

  • Interface and Abstract class difference

    An interface can be used in such a way that we don't know the class of object assigned to a reference of that interface type until runtime. Can we use the abstract class in a similar way too?
    The difference between an abstract class and interface can be listed as
    1. Interface can not have implementation of any method
    2. The usage of interface and class is one other difference
    3. What other differences we have?

    Yes an abstract class can be used in a similar way. The main issue with an abstract class is that you extend it and you can only extend one class so that can be a huge limitation that an interface does not give you.
    Here's another one that is often overlooked: use both.
    public abstract class SomeBaseClass implements Runnable {
      public abstract void someAbstractMethod();
      public void someMethodWithADefaultImplementation(){
        System.out.println("Hello!");
    }Any class that extends SomeBaseClass (and is not abstract) will need to implement the run() method of the Runnable interface.

  • How to Use Pattern and Matcher class.

    HI Guys,
    I am just trying to use Pattern and Matcher classes for my requirement.
    My requirement is :- It should allow the numbers from 1-7 followed by a comma(,) again followed by the numbers from
    1-7. For example:- 1,2,3,4,5 or 3,6,1 or 7,1,3 something like that.
    But it should not allow 0,8 and 9. And also it should not allow any Alphabets and special characters except comma(,).
    I have written some thing like..
    Pattern p = Pattern.compile("([1-7])+([\\,])?([1-7])?");
    Is there any problem with this pattern ??
    Please help out..
    I am new to pattern matching concept..
    Thanks and regards
    Sudheer

    ok guys, this is how my code looks like..
    class  PatternTest
         public static void main(String[] args)
              System.out.println("Hello World!");
              String input = args[0];
              Pattern p = Pattern.compile("([1-7]{1},?)+");
              Matcher m = p.matcher(input);
              if(m.find()) {
                   System.out.println("Pattern Found");
              } else {
                   System.out.println("Invalid pattern");
    }if I enter 8,1,3 its accepting and saying Pattern Found..
    Please correct me if I am wrong.
    Actually this is the test code I am presenting here.. I original requirement is..I will be uploading an excel sheets containg 10 columns and n rows.
    In one of my column, I need to test whether the data in that column is between 1-7 or not..If I get a value consisting of numbers other than 1-7..Then I should
    display him the msg..
    Thanks and regards
    Sudheer

  • Can I Use HDMI and Thunderbolt Outputs At The Same Time? And Mac App Store Issues

    I have a Mid-2011 Mac Mini. I am currently using the HDMI output with an HDMI to Digital Input for a dell monitor. If I wanted to have a second monitor, can I use the Thunderbolt output with a MiniDisplayport to VGA adapter? I know it may sound a little unclear, so if you need a clarification, pelase let me know.
    Also, on the same macine, I am having trouble connecting to the Mac App Store. My internet connection is working, and I've tried going into the Keychain Access and there isn't anything with a blue plus. When I go to Store --> Sign In , the sign in widnow doesn't appear.
    Thanks
    Joey

    Yes, that is exactly how to use dual monitors.
    Optionally:
    if the second monitor has DVI input, use the MiniDisplay Port to DVI adapter.
    or if it has Display Port input, then all you need is a straight MiniDisplay Port to Display Port cable.
    In Quick Links try Account if Sign In does not work.

  • Interface and abstract class

    why we have constructor for abstract class and not for interface,

    When you call a constructor of a class which is extended by abstract class. It runs first the abstract class constructor and then child class constructor and initialize the member variables.
    while interface has no variable all final data so interface is no need to implement a constructor.
    Regards,

  • How to use Landmark in a Class outside the Parsley Context

    Hi all,
    Is there anyway to get the Landmark metadata work without adding the annotated Class in the Parsley Context file?
    I mean, I have a Class such as:
    [Landmark(name="content.foo")]
    public class MyClass extends ManagedClass {
    [Enter(time="every")]
    public function enter():void
    LOG.info("content.foo:Enter");
    Problem:
    Enter method is never fired although ManagedClass( the super class ) has a <parsley:Configure /> tag ( and, of course, all injections happen ).
    Adding MyClass to the Parsley Context file makes everything work but is there anyway to make this Landmark work without doing that?
    Thanks.

    That's more of a Parsley question than C3 and AFAIK it's not feasable. The other way around is with i.e. the ProcessSuperclass object definition in Parsley. Check out Parsley's developer manual on that (chapter 3 should explain this)

  • How to use 2 webcam for java at the same time?

    hi there,
    I have a question to ask regarding webcam and java. Basically i want to know whether is it possible to have 2 web cam running in java at the same time? I have no problem when running one usb webcam since i m using "
    ml = new MediaLocator("vfw://0") ;
    what parameter must i use to specify when using 2 web cam
    many thanks
    sun

    Hi
    I am making a project in which i have to capture a image through webcam. How can I do it will you please guide me or if can provide me code. Many thanks for your support. My email id is [email protected]

  • How to have amounts and amounts splitted at the same time

    Hi everybody, I need to show data as in the example (4 fields):
    Product Category           Number of tickets by category               Product               Number of tickets by product
    Category 1                              100                            product A                             50
                                                                           product B                              50
    Category 2                               10                             product C                              8
                                                                           product D                               2As you can see I need to see the total of tickets for each product category, and then splitted by product.
    In order to try to have this result, I take the following fields from the business area:
    Product Category
    count(tickets_id)
    Product
    but I'm not able to have the amount of tickets by category and the amount of tickets by product at the same time inside the report.....because as soon as I split by product I loose the total of tickets by Category.....
    How can I have this two amounts together ? The first referred to the total of tickets by Category and the second splitted by product at the same time?
    I tried to do a calculation count(count(tickets_id))....but it's not possible...I have the error "Nested Aggregated functions are not allowed"..
    Any help will be appreciated
    Thanks in advance
    Alex

    Tamir, thank you so much !!!
    It work perfectly ! but...just the last question...How can I group these records ?
    I explain to you better. Now, the situation, after using the analytic functions (as you mentioned) is the following:
       Product_Category      Count                  Product             Count      
         Category 1          100                   Product A              40
         Category 1          100                   Product A              40
         Category 1          100                   Product A              40
         Category 1          100                   Product B              60
         Category 2          10                    Product C              8
         Category 2          10                    Product D              2
         Category 2          10                    Product D              2 If I use the SORT (order by), I have empty records (blank) as below:
       Product_Category      Count                  Product             Count      
         Category 1          100                   Product A              40
         blank               blank                 blank                  blank
         blank               blank                 blank                  blank
         Category 1          100                   Product B              60
         Category 2          10                    Product C              8
         Category 2          10                    Product D              2
         blank               blank                 blank                  blank ...but I like to have the data grouped as:
       Product_Category      Count                  Product             Count      
         Category 1          100                   Product A              40
                                                   Product B              60
         Category 2          10                    Product C              8
         Category 2          10                    Product D              2 So, my question is this: how can I group the data using Discoverer ?
    Thanks again
    Alex

  • How to use DAQ to control Mindstorms NXT in real time?

    I have a project in which I must use a a biosignal to control a Lego robot in real time.  My group is using a DAQ to read an EMG signal into the computer.  We are trying to use the RMS of this signal to control the power of the Servo motors that drive the robot.  However, the DAQ assistant can not be loaded into the NXT (the error message says something about password protection).  
    Is there any way to read the RMS from another vi and feed it into the vi that is loaded into the NXT?  
    In general terms, what I would like to do is use the root mean square of a biosignal read by a DAQ to control the power of the Servo motors, in real time.
    Any help would be greatly appreciated. 
    Attachments:
    Master File.vi ‏65 KB

    You won't be able to run DAQmx VIs on the NXT. The error message is misleading -- the problem is that the DAQ VIs weren't written to run in the NXT's virtual machine.
    Instead, you should create two separate VIs. The first VI will run completely on the PC, will acquire the EMG signal, and then pass messages to the NXT over Bluetooth indicating how much power the motors should get.
    The second VI will run completely on the NXT, will read messages from one of the Bluetooth mailboxes, and then feed that power value into a motor control VI.
    If Bluetooth is not an option for you, you could use just one VI running on the PC, and use the NXT direct command VIs to set motor power over USB. (The drawback is that your NXT is now tethered to the computer.) 
    James Blair
    NI R&D

  • Airport express: use internet and air tunes at the same time?

    Hi,
    I'd like to use and airport express to create a wirelss network (and so use the internet) AND stream music to my stereo with air tunes - at the same time. Is this possible? So far, I have been able to create a wireless network (and use the internet) OR use the airport express to play music. But whenever my internet works, itune can't find the base station - claiming it "can't be found on the network?"
    Can you do both at once?
    I'm connecting to an ethernet jack (I'm at a college). It's not a cable modem or DSL. Is this the problem?
    Under "music" in the utility configuration. I've selected "Enable Air tunes at the base station." I can't select "Enable Airtunes over ethernet port." When i try to change the network options to allow me to select this "ethernet port" option, I have to tell it how to "distribute IP" addresses. i don't know how to do this, and everything I've tried destroys my internet connection.
    I appreciat any help you have to offer. thanks
    1.5 GHz PowerPC G4, 12'' powerbook   Mac OS X (10.4.4)  

    solution:
    My problem ended up being specific to the network I'm using. There is evidently another router on the ethernet system that was assigning my airport express an IP address (192. ...), rather than letting the network DCHP give me a direct IP address (something like 160. ...). The 192 address made it impossible for iTunes to see my express base station, but I was getting internet, passed through this other router.
    The fix - and I'm not sure if this is totally kosher - was to manually enter a correct IP address for my base station. I got the IP address by seeing what this other router was sending my computer to get onto the internet. It gave me the correct router and a workable (160. ...) IP address. I'm not sure if I'm supposed to manually pick an IP address on the ethernet, but this one is working for the time being, and now iTunes can find my base station.

  • HP Docking (VB041AA) - Using DVI and Display Port at the same time

    Hello,
    is it supported to use the DV and the Display Port of a HP 90W Docking (VB041AA) at the same time? I use this setup with two LA2405wg and a 6450b for a couple of weeks and I encounter a couple of problems:
    - flickering and switching during bootup, same output on both displays, no output
    - hibernation resume fails, if notebook was hibernated undocked (hiberfil.sys corrupt)
    - sometimes Win7 crashs during startup with corrupt drivers
    - spooky display lockups were a display goes into standby and can't be switchec on or off. I have to pull the power cord
    Some of them are really strange (corrupt drivers, but after a restart the notebooks starts without problems). During operation I don't have any problems, no BSoDs etc. 
    Thanks for advice.

    Your notebook is an Enterprise/Business model. I would recommend posting this in the HP Enterprise Support Forums for better coverage, as this is the consumer support forums.
    You can access the enterprise support forums at the following link.
    http://goo.gl/LsnuK
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to play midi and update graphics at the same time?

    hello
    I want to begin playing a midi file and then immediately while the music is still playing I want to update the screen, for ex. panel.update();It now seems that that whole screen freezes until the music has finished. How can I simultaneously update UI and play midi. Please help. Thanx!
    -Wonderful-

    http://www.google.com/search?q=java+thread+tutorial
    Plenty of tutorials and examples out there.

Maybe you are looking for

  • IPod Touch music vanished

    I have an iPod Touch which I've used reliably for the last three or four years. I was using it four hours prior to writing this post, in fact. When I got home, I plugged it into my computer so I could start listening to music from my iPod Touch and m

  • Master details report/form

    Hi Friends, I want to create a Master-Detail report/form. I have one Master Table and it has 3 Detail tables. Example: Master Table: Members Detail Tables: Contributions                Loans                Benefit ClaimsI want to show when I click on

  • Error [Microsoft][ODBC Excel Driver]Optional feature not implemented...

    Hi All, when i add setAutoCommit(false), i got run error [Microsoft][ODBC Excel Driver]Optional feature not implemented. i just want to insert data into excel using db. can anyone give suggestion?? here my code: public void insertDatabase( ){        

  • Balance Carryfoward Function Using FOX

    Hi ,   I got to create a FOX function to do (BCF) Balance Carryforward .. i need to COPY some records from one version(P6),Fiscal Year(2008) to another version(P1) and fiscal year(2009).While doin so i also need to carryforward the Previous years Bal

  • NLS_LENGTH_SEMANTICS parameter...

    Hi , I want to insert multilingual characters in an Oracle XE 10g Db. To do that i connected as sys and issued the command insert into dept(deptno , dname)    values(90,'ΛΟΓΙΣΤΗΡΙΟ') ORA-12899: value too large for column "SCOTT"."DEPT"."DNAME" (actua