A better expression?

I heard that there is a better way than doing this, can anyone tell me? Thanks you!
<CFIF (st_addr["City"] NEQ "Ohio") OR (st_addrs["City"] NEQ "San Jose")>

> <cfif "Ohio,San Jose" Does Not Contain st_addrs["City"]>
> Does it with a single compare and is very readable; if that's what your after that is...
This would not work properly, since it does a string comparison, not a list item comparison.
<cfif "New York,Boston" does not contain "York"> would be a true condition.
Use NOT ListContainsNoCase() instead.
-Fernis
 

Similar Messages

  • Could do with help for a better expression

    Hi guys im using the following code to detect if a file is a text file it works however it is possible to fool it by having a file file.txt.doc. can anyone suggest a better way to do this? bear in mind its a javascript function.
    var filter = /.txt/;
         if (filter.test(str))

    > Hi guys im using the following code to detect if a
    file is a text file it works however it is possible
    to fool it by having a file file.txt.doc. can anyone
    suggest a better way to do this?         java.io.File file = new java.io.File("test.txt");
            if(file.exists() && file.getName().endsWith(".txt")) {
                System.out.println(file.getName()+" is a txt-file!");
    > bear in mind its a
    javascript function.
    Ah well, bear in mind that this is a Java forum.
    ; )

  • AirPort Express vs Extreme.  Is this a solution?  My wife wants to be able to access files on her hard drive for our Mac by way of a laptop from anywhere in the house.  For example, she would like access her $ software from any computer in house.

    Will one of these work to use software from iMac on any laptop wirelessly around the house?  Which would be better Express or Extreme?

    I've had much better luck with Express rather than the Extreme.
    She can use "Sharing"
    Apple - AirPort Express - Easy Setup
    Mac 101: File sharing

  • How Do I Contact the REAL Nokia Company ..

    Please help, someone .. anyone !! I cannot get any help from Nokia USA because ... well, here is my story, and I am sorry if I chose the wrong forum. I am not quite sure where to post this.
    I will try to make this VERY LONG story, as short as possible.
    I sent my phone to Nokia [USA] for a repair on 1/5/2007 [just a few days after receiving it.] I couldn't find a reason why the phone was locking up and I couldn't find a solution to repair it .. Apparently I am not the only one that couldn't figure it out .. The repair center I sent the phone to couldn't either.
    On 2/2/2007, after dozens and dozens of repair status inquiries, many hours on the phone with Nokia USA, the EXECUTIVE SOLUTIONS DEPARTMENT tells me that Nokia Repair could NOT fix my phone. It is a hardware issue and repair has NO PARTS and NO REPLACEMENT phones ... WHAT ???
    The N93 is for sale on the Nokia USA website. Every once in a while the website reports it out of stock, but as of Friday when I get the news that there are no parts and no phones to fix or replace mine, I check the site and see they ARE IN STOCK - AND TAKING ORDERS FOR IMMEDIATE SHIPPING ...
    I ask that the EXECUTIVE SOLUTIONS TEAM get me one of those phones. NO CAN DO ... they say. AND, Nokia repair can not have the sales department's phones either. Why is this ???
    So today I did some investigating. Nokia Repair USA is NOT REALLY NOKIA REPAIR, it is some company called Palco. They are in Alabama and they cannot repair my phone because they have no parts and they cannot replace my phone [as stated in my warranty] because they have no phones. I talked to Palco today and the woman tells me that parts and phones have been on order for months and I guess since Palco does MUCH MORE than just repair phones for Nokia - the phones they receive from Nokia customers that they cannot fix for one reason or another are just tossed in a pile and forgotten. I guess it is not a big concern of theirs .. They just email Nokia USA and tell them - Sorry, we can't fix this phone. END OF STORY.
    Nokia Executive Solutions Department says - We will have to mail you a refund because we have NO WAY of replacing your phone. END OF STORY.
    Which leads me to believe, like I have for weeks now, that Nokia USA support, Nokia USA customer service and Nokia EXECUTIVE Solutions USA, are different companies contracted by Nokia to SHUT THE CUSTOMER UP. Apparently they aren't the ones who do the actual refund. I don't know where the refunds come from, but I was PROMISED, I will get a refund.
    I WANT MY PHONE!
    So ... this is why I want to get in touch with the REAL Nokia company. I want a N93 and I want to get it from Finland or wherever the REAL company is.
    One of the reps at Nokia USA Executive solutions USA said the name, Palco when we were talking about the repair so when I got off the phone with him, I looked up Palco on the internet and sure enough, the address I sent my phone to, is the same address as Palco. So I called them.
    There was NOTHING on Palco's recorded message that even mentioned cellphone repair. It talked IT Sales and service and a whole lot more, but NOTHING NOKIA and NOTHING CELLPHONE .. I pushed O for an operator and she connected me to - the person who handles Nokia phone repairs.
    Before I send Nokia USA anything to get my refund under way, I want to try and reach the REAL nokia in Finland or wherever they are and see if I can get a replacement phone! I almost forgot to mention. If I go the route, it will take SIX WEEKS to process. Can someone please give me some advise?
    Sorry for rambling. Hope you can follow me .. I know I jump around a lot. I am just so frustrated.
    Diane

    The address for Nokia's Head Office for the US is :
    Nokia Americas
    6000 Connection Drive
    Irving, Texas
    75039
    USA
    Tel. +1 972 894 5000
    and this information can be found here :
    http://www.nokia.com/link?cid=EDITORIAL_4546
    One word of advice - Nokia is HUGE - give them a call first and get the name of someone or at least a department that you can address your letter to or it will get lost in the myriad of letters that Nokia get everyday.
    NSCs (Nokia Service Centres) in the UK are also run by 3rd party companies, as I suspect most of them round the world are. For want of a better expression Nokia outsource this facility to 3rd party companies and then get the blame when it all goes wrong (!).
    In the UK we have a facility called Club Nokia where can we can report issues directly to Nokia relating to this as well as carry out tasks like product registration however I've just had a look on the US website and there doesn't appear to be this facility for the US - each task has it's own webpage.
    As to these forums, please remember that although you will see various Nokia administrators etc. they are simply here to ensure everyone plays nice rather than offering any form of official help or support, and that these forums are a user to user help forum - i.e. I'm a direct end user of Nokia products exactly as you are !
    Anyway, good luck - let me know if you need any further help.
    Regards,
    Edward

  • Query on using add_event

    Hi,
    My primitive event has xmlType and I have defined a composite event with 3 such primitive events.
    I created 2 rules
    rule1 with 1 primitive event
    rule 2 which has a <and> with 2 primitive events.
    All data required to invoke the rules is present in an xml doc
    Now to invoke I call the add_event function passing the xml doc as i\p
    Only rule 1 gets invoked.
    If I call add_event twice
    Rule 1 gets invoked twice
    Rule 2 gets invoked once.
    Also I'm consuming events.Consumption is defined as "rule".
    Ideally shouldn't rule 1 and rule 2 get invoked with 1 call to add_event?
    Regards,
    Nishanth Nair

    Nishanth,
    Assuming that the incoming event matches all rule conditions (1=1 kind), you are noticing correct behavior. The conjunction of events (AND) in your case needs at least two events to match both parts of the rule. When an event instance matches two or more primitive conditions in the same rule, the rule's state is split so that the same event cannot participate more than once in a single rule execution. In other words, there is an implicit "e1 != e2" predicate when the same primitive event structure is used multiple times in a composite event. If you want the second rule to fire in your scenario, you should use ANY construct. But if your rule should fire only when both the conditions satisfy with the same event, the rule condition is better expressed as a simple condition with conjunction of predicates (a = 10 and b = 10).
      <condition>
          <and equal="...">
               <object name="e1"> a = 10 </object>
               <object name="e2"> b = 10 </object>
          </and>
      </condition>The fact that the second event fired the first rule twice and the second rule once indicates that the events are not really consumed. The RULE consumption policy, unlike the EXCLUSIVE policy, leaves the consumption of events to the application logic and the events must be explicitly consumed using DBMS_RLMGR.CONSUME_PRIM_EVENTS (http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_rlmgrref.htm#BJFCFIAF). Also see http://download.oracle.com/docs/cd/B28359_01/appdev.111/b31088/exprn_brm_eventpolicies.htm#CIHIFHGE (11.1 reference but applies to 10.2 as well).
    Hope this helps,
    -Aravind.

  • Wireless Bridge? (amongst other questions)

    OK, so I inherited this iMac and want to put it in my attic as a jukebox. It doesn't have firewire, and all my tunes are on an external firewire drive downstairs. That drive is hooked up to a G4 400 AGP with 256MB and Panther. Neither Mac is currently wireless. I share a connection with my neighbor -- cable running from his wireless PC router outside into my window into my G4.
    I'd love to have wireless to get rid of this setup. If I went wireless, I could have the iMac upstairs work as a jukebox, right? I'd have to put Panther on it, though, to work with iTunes 6.0.2.
    So I need more memory. I've heard 128 & 256MB recommended. Which do you folks say?
    And the critical question:
    Original airport cards are ridiculously priced now. I guess that's to be expected after all this time. What should I buy? A bridge? Would I have to get two, or can I just put one in the iMac and it'll be able to find my music Library if I share it from the wired G4?
    I know virtually nothing about networking, especially how to set one up.
    Does it matter what kind of router my neighbor has and that it's used on a PC over there? I've got my TiVo hooked to it wirelessly with a USB adapter and I remember he had to give me an address and a password.
    I think it would be extremely cool to have an old iMac as a jukebox up there (it's my Man room, for lack of a better expression), but I don't want to spend a fortune doing this. I mean, I'm still using a G4 400 with 256MB as my main computer for Pete's sake.
    Suggestions from kind folks would be greatly appreciated.
    Shawn

    One possiblility is to get an in expensive network switch. Connect your incoming network conection to it and then connect both computers to it by wire. I just saw a 5 port switch in the store for $35. The length and placement of the cabling would be the next variable. If the layout of building does not allow that there are still other possibilities.
    If you definitly need wireless for the iMac upstairs an ethenet bridge is your best bet. Depending on model and store you are looking at around $60 or more. Watch BestBuy and OfficeMax closely for their sales. For my daughter's iMac I bought a Dlink DWL-G730AP for $19 after rebates a while back, but it hasn't been on sale since. There are many posts in this area about other devices which all appear to work well. The question is, "Where will the signal come from?" If the signal from your neightbor's router is strong enough, this may be all you need. Have you checked out the signal strength upstairs? If it isn't strong enough you may need to add a router to your connection to get the wireless signal closer to the upstairs machine.
    The more memory the better as always. It shouldn't matter what router your neighbor has.

  • Best method to seamlessly swap someone's face in a group photo with their face in another photo?

    A band hired me to do a photoshoot of them and it was my first time shooting a band professionally so I was and still am quite nervous about the photos turning out well, especially since they're a well known group and the pictures will be published in a magazine and spread around a lot and attributed to me.  The issue I'm posting here about is that all of the best shots I got of the group are good except for one member who will either be making a weird expression or has their eyes closed.  I took a lot of photos but I didn't really get any where each member of the group looks good in the same photo; they each look good throughout the set of photos, just not all at once in one photo.  What I'd like to do is replace that member's face in the otherwise good photo with her face from another photo from the shoot where her eyes aren't closed or she has a better expression...but I feel like I'm playing with fire by doing this since I really don't want it to be obvious that I photoshopped it in any way, either to the band or anyone who views the photos later on.
    I'm decent with Photoshop but I'd still like to know what the best method of doing this would be so that it looks as natural/unaltered as possible.  Any suggestions?
    Also, the photos I'd be switching the faces in were mostly shot from the same angle and with the same lighting and exposure but a few were shot from slightly different angles or the exposure is slightly different, which makes it more difficult.  If, for example, due to flash settings the photo I'm trying to paste a face into (let's call it Photo A) is slightly brighter than the photo I'm trying to copy the face from (Photo B), what's the best way to merge/adjust the two so that the brightness levels in Photo A and the layer from Photo B are as similar as possible?
    (I'm using PS CS6)

    Ideally, if you have several shots from the same place, with that band member's head in a similar angle, you could do something like this:
    1.  Choose the Polygonal lasso tool.
    2.  Set it to feather a few pixels.
    3.  Select around the facial features in the image with the good face.
    4.  Paste the good face on the otherwise good background and move it into position over the bad face.
    5.  Set it to be partially transparent to help you align it.  Use Edit - Free Transform to rotate or scale it if it's off a little.
    6.  Make it fully opaque, and use Curves, etc. to perfectly match the exposure, if it's off a little.
    Clearly you can do this with the mouth, eyes, whole face, etc.
    Example:
    -Noel

  • Is a license required for Oracle 11g installed on private developer box?

    Hello,
    I wish to install Oracle 11g on my personal computer to test some software that hits a database. Will I be able to install/run 11g on my machine for this use, or will it (eventually) prompt me for a license key? If I need a license, is there a free developer license available? I can't seem to find any info on this.
    How is the licensing structured around the 11g "XE" BETA (express edition)? Is there a licensing difference between XE and non-XE?
    And finally, is there a good summary of what features are missing from the XE edition? I tried installing 10g XE, and for example, the "DEFAULT TABLESPACE xxx" SQL command was not recognized. I need this 'feature' (as well as others). I'm assuming I'm going to need to install the full 11g release, but I hope there is no license required.
    Any advice would be appreciated. Thank You.

    The general license agreement is here - http://www.oracle.com/technetwork/licenses/standard-license-152015.html
    In short, yes - you can download the software and use it for testing/prototyping.
    11gXE Beta license terms are here - http://www.oracle.com/technetwork/licenses/ea-license-152003.html
    HTH
    Srini

  • ASA 5520 with multiple contexts becomes unresponsive

    Hi all. We have encountered a perculiar problem with a pair of our ASA 5520 firewalls with 2 contexts(each context being active on different ASA). What we are seeing is that sometimes when we have a sudden increase of inbound traffic(mostly HTTP) towards servers behind the firewalls they seem to go bananas for the lack of a better expression.
    They become unaccessible via ssh and the traffic drops significantly. The problem is mitigated by disabling one of the monitored interfaces for failover(on one of the switches the firewall is connected to) so that both contexts become active on one firewall. After that the firewalls seem to come to their senses and we can enable the switch interface again but sometimes one of the pair needs to be rebooted to restore full funcionality.
    To us it seems like there is a problem with failover and contexts but we haven't been able to pin it down. The failover link isn't stateful and when we tested the failover it works fine both ways with each ASA taking up the full load when the other ASA of the pair is not available.
    Did anyone come across a similar situation with their firewalls?

    We are using ASA version 8.2(5).
    The configuration of the failover is:
    failover
    failover lan unit primary
    failover lan interface fail_int GigabitEthernet0/3
    failover interface ip fail_int x.x.x.x 255.255.255.252 standby x.x.x.x
    failover group 1
      preempt
    failover group 2
      secondary
      preempt
    Output of the "show failover":
      This host:    Primary
      Group 1       State:          Active
                    Active time:    399409 (sec)
      Group 2       State:          Standby Ready
                    Active time:    111 (sec)
                    slot 0: ASA5520 hw/sw rev (2.0/8.2(5)) status (Up Sys)
                      admin Interface out (x.x.x.x): Normal (Waiting)
                      admin Interface inside (x.x.x.x): Normal (Waiting)
                      admin Interface dmz4 (x.x.x.x): Normal
                      admin Interface dmz1(x.x.x.x): Normal (Not-Monitored)
                      C1 Interface out (x.x.x.x): Normal (Waiting)
                      C1 Interface inside (x.x.x.x): Normal (Waiting)
                      C1 Interface dmz5 (x.x.x.x): Normal
                      C1 Interface dmz1 (x.x.x.x): Normal (Not-Monitored)
                    slot 1: empty
      Other host:   Secondary
      Group 1       State:          Standby Ready
                    Active time:    0 (sec)
      Group 2       State:          Active
                    Active time:    398992 (sec)
                    slot 0: ASA5520 hw/sw rev (2.0/8.2(5)) status (Up Sys)
                      admin Interface out (x.x.x.x): Normal (Waiting)
                      admin Interface inside (x.x.x.x): Normal (Waiting)
                      admin Interface dmz4 (x.x.x.x): Normal
                      admin Interface dmz1(x.x.x.x): Normal (Not-Monitored)
                      C1 Interface out (x.x.x.x): Normal (Waiting)
                      C1 Interface inside (x.x.x.x): Normal (Waiting)
                      C1 Interface dmz5 (x.x.x.x): Normal
                      C1 Interface dmz1 (x.x.x.x): Normal (Not-Monitored)
                    slot 1: empty
    Stateful Failover Logical Update Statistics
            Link : Unconfigured.
    When I disabled the monitored interface it was always the same interface altough I believe the same effect could be achieved with disabling any of the monitored interfaces.
    As for memory and CPU when it happens I cannot access the units to get a reading but I asume it's through the roof. 
    The thing that troubles me more is that the situation persists when the load drops and I have to perform the solution from the first post. One would assume that with the drop of the load that both firewalls would start to behave normally.
    And I see that I haven't mentioned it before but when the load drops both units continue to handle traffic normally but I sometimes see as a side effect that I cannot SSH to one of the units. That unit usually has to be restarted.

  • JTextField array help

    Hey guys,
    I'm working on a java GUI right now and I've come up with a problem, hopefully you guys can help.
    I have a page that contains 50 text fields in 2 columns, so instead of making 50 lines of text field code, I decided to make an array of text fields and a for loop to cycle through each one (setting sizes, colors, editable, etc). Now the problem I'm running into is I will later down the road like to setText in these but it will be very cumbersome to have to call them by the arrayName[index #]. Just so I can better express what I mean heres is how I have to call each text field right now:
    arrayName[0].setText("1");
    arrayName[1].setText("2");
    This is how I'd like to be able to call each field:
    1stTextField.setText("1");
    2ndTextField.setText("2");
    Is there anyway I can make it so I can make an array of JTextFields and still be able to call an individual text field inside the array by name? If not, is there a way to point to another variable such as making
    1stTextField = arrayName[0] ;
    2ndTextField = arrayName[1];
    Thanks for the help guys.

    50 text fields in 2 columns... why not just use a JTable?
    Is there anyway I can make it so I can make an array of JTextFields and still be able to call an individual text field inside the array by name?Try a HashMap
    is there a way to point to another variable such as making
    1stTextField = arrayName[0] ;
    2ndTextField = arrayName[1]; Yes, exactly as you coded it up

  • Class instance vs. class name in filter params

    I wonder if using a Class type in parameters of the ClassFilter, MethodFilter and FieldFilter is actually make sense.
    Let's say we have globally deployed aspect on a pointcut pointing to some library, deployed multiple times withing several web applications (ear's or war's) on the same J2EE app server. With Class type as params we have to load these classes first, which means strong typing, but additional confusion and an extra class loading because those web app class loaders aren't exist at the advice deployment time.
    It looks like the same applies to the params with Method type...

    ClassFilter/MethodFilter etc are more efficient but their expressiveness is more limited. They mainly allow to:
    - match on a strongly defined type (ie a xxx.class) and possibly its subtypes
    - match on simple name patterns (startswith)
    UserDefinedFilter will be invoked (if you provide one) by the VM to further decide on the matching. It allows you to define places to match based on rich information and indeed will likely be used for complex scenarios.
    We don't want to tie the VM with any pointcut styled grammar but instead provide a reasonably rich API while still providing 100% custom matching.
    If you have idea on how to have better expressiveness for the MethodFilter/ClassFilter please let us know.
    CatchSubscription and FieldSubscription are not implemented in the prototype and their API is indeed not yet consistent with MethodSubscription.

  • Lr3 Tone curve Tutorials ?

    I've done some googles for Tone Curve Tutorials but have not had much luck finding much - can you folks point me to some well explained or 'good' ones please?
    Thank-you ~

    Ian, thanks a lot for your interest in my problem.
    Ian Lyons wrote:
     Not sure what your issue issue because you can place as many or a few points on the Point Curve as you need to maintain control.
    My problem is that the global effect a single point move entails forces me to use a large number of points. In order to adjust a local region (e.g., lift a small range of the midtones but leave everything else the same), I have to use at least seven points. Try this:
    Start from a straight, unedited curve.
    Insert a point at ~36.9 (X-axis) and move it up to 50% (Y-axis)
    Insert a point at ~67.8 and move it down to 50%
    Insert another point at ~50 (between the first two) and keep moving it up and down from 20% to 80%; watch the shape of the overall curve while doing this.
    See how the "highlights" and "blacks" parts of the curve are heaviliy influenced while you are moving that middle point? Because of this, I find myself putting in more and more points to stop areas I don't want to see affected from changing shape. Try yourself to insert points to stop the local effect you want to achieve from having a global effect. You'll find that your additional "stop the effect"-points will themselves cause a non-local effect that you'll have to stop with further "stop"-points, etc.
    I do realise that the tone curve needs to be smooth (mathematically, there shouldn't be any discontinuities in its first-order, or even second-order, derivation). I therefore understand the rationale of using splines and I also realise that LR is not the only program handling tone curves this way. However, I think the effect of moving one point is too global (i.e., non-local).
    Still assuming the scenario above, try to put two "stop the global effect"-points at ~78/78 and 88/88 (in an attempt to have the highlight region unaffected by moving the point at 50. Then go back to step 4, i.e., move the point at 50 up and down. See how the shape of the curve between 88 and 100 still changes with large moves of the point at 50? That effect is completely unnecessary to make the curve smooth. It is just a side effect of using a particular kind of spline for the tone curve.
    I hope I better expressed myself this time. Please let me know if a screenshot would help. It would be great if you could try the scenario and see whether you agree that some of the non-local effects are not really what the image editor intends.
    P.S.: For recreating effects similar to that of the parametric control in a more precise way, I agree that the point edit mode works well. It is the "adjust small ranges of tonal shades" use case where it fails. I don't need the latter often but when I do, using the points is very laborious and often I feel like stopping before I got what I wanted because it is just too much of a hassle to fight all the ripple through effects.

  • Clustering annotation for EJBs ?

    Hi all,
    from the Oracle WLS documentation I have learnt that you can specify clustering via weblogic-ejb-jar.xml:
    <stateless-clustering>
    <stateless-bean-is-clusterable>True
    </stateless-bean-is-clusterable>
    <stateless-bean-load-algorithm>random
    </stateless-bean-load-algorithm>
    </stateless-clustering>
    However is it possible to specify this via annotations too ?
    Thanks a lot
    Frank

    Hi Frank --
    The general pattern is that settings such as clustering, bean pool sizing, etc. are not exposed as annotations since these typically are configuration elements that define behaviour of an application at runtime and are better expressed in the external form of the deployment descriptor.
    Happy to hear about your requirements here though.
    -steve-

  • Get multiple Input/Output Stream from same socket ?

    For a better express of my problem i will put my test example
    I have those 4 classes
    package test;
    import...
    public class ReaderExecutor extends Thread{
            private InputStream in = null;
            private static int defaultID = 0;
            private int ID = getID();
            public ReaderExecutor(InputStream in){
                this.in = in;
            public void run(){
                try {
                    int c ;
                    while ((c=in.read())!=-1)
                        System.out.println("ReaderThread " + this.ID + ":" + c);
                catch (IOException e) {
                    System.out.println("ReaderThread "+this.ID+" stopped !");
            private static int getID(){
                return defaultID++;
    package test;
    import...
    public class WriterExecuter extends Thread{
        OutputStream out = null;
        private static boolean odd = true;
        private boolean isOdd ;
        public WriterExecuter(OutputStream out) {
            this.out = out;
            isOdd = odd;
            odd = !odd;
        public void run(){
            try{
                for (int i = isOdd?1:2;i<10;i+=2){
                    System.err.println(i);
                    out.write(i);
            }catch(Exception e){
                System.out.println("WriterThread stopped !");
    package test;
    import...
    public class Main { 
        public Main() {
        public static void main(String[] args) throws Exception {
            try{
                ServerSocket ss = new ServerSocket(9090);
                System.out.println("Ascult ... ");
                Socket client = ss.accept();
                new ReaderExecutor(client.getInputStream()).start();
                //Thread.sleep(2000);
                new ReaderExecutor(client.getInputStream()).start();
            }catch (Exception e){
                e.printStackTrace();
    package test;
    import...
    public class Main1 {
        public Main1() {
        public static void main(String[] args) {
            try{
                Socket s = new Socket("localhost",9090);
                WriterExecuter t= null ;
                t = new WriterExecuter(s.getOutputStream());
                t.start();
                t = new WriterExecuter(s.getOutputStream());
                t.start();
            }catch(Exception e){
                e.printStackTrace();
    }Now if i run successive Main , Main1 i get this output
    Ascult ...
    ReaderThread 0:0
    ReaderThread 1:0
    ReaderThread 0:0
    ReaderThread 1:0
    ReaderThread 0:0
    ReaderThread 1:0
    ReaderThread 0:0
    ReaderThread 1:0
    ReaderThread 0:0
    ReaderThread 0 stopped !
    ReaderThread 1 stopped !The question is can i get other Input/Output individual streams with a separate logic functionality from the same socket?
    From this example it seems i can't :(
    Thx
    Alex

    For what you are trying to do the simplest solution is to have one socket per "stream" that is the way they are designed to be used.
    However, you can multiplex multiple stream over a single socket, but you have do the coding yourself or use a solution which does this for you e.g. JMS. (There is no support at the socket level for this)

  • ActionListener() interface

    I have used actionListener() interface quite often for GUI applications.
    But I'm still fuzzy about logic behind that--I mean I can't make my code work but
    don't know why/where this interface is used in the whole program. I wish I can find
    a better expression about that. Let me put it another way--the core reason for interface is for multiinheritance, where we can see the multiinheritance case in ActionListener() interface.
    I'll be extremely grateful if someone can illustrate the logic behind that
    Thanks. yylx

    Well first I'd like to clear up a point, multiple inheritance is impossible in java, Some will argue, but the fact remains that you must implement each method of an interface...
    Now to the point.....
    the interface defines a single method,(at least I think its just one), public void actionPerformed(ActionEvent e);
    Any class that implements this interface must have this method defined, as such any class implementing this method may be treated as , "an instance of ActionListener"
    That allows the AbstractButton class, subsequently all subclasses, to define a method, addActionListener(ActionListener al)
    The point being that this method requires an instance of a class that has the actionPerformed(ActionEvent e) method defined, it depends on it!!!
    There are quite a few uses of interfaces, and you should probably take some time to explore them, if you havent allready...
    Hope this helps, a little at the very least...
    J.Prisco

Maybe you are looking for

  • AP - Vendor open item not showing

    Hello,   It tells me no open items when i try to do an outgoing payment via either automatic or manual , the open item report clearly shows one document ( invoice ) as open for the same  vendor. can anyone let me know what is the cause . thanks in ad

  • Itunes freezes continually and takes out Acrobat as well...any ideas?

    I recently upgraded my Acrobat to version 7 Professional. I also took the automatic update of Itunes. Ever since doing this, I have had total grief with Itunes as it simply freezes for no apparent reason. There appears to be no consistency with the t

  • I have a flash drive with 6GB of music.  How to import songs into iTunes?

    Foolish me, I was under the absurd impression that Apple, the company that brags non-stop about the functionality and user-friendliness of its software, would allow you to simply drag and drop music files into the iTunes window. Oh, how stupid was I.

  • Please Help Nested Editable Region Image & Spry

    Please Help Me. New to Dreamweaver. I've been given a "grandchild" nested temple with only one editable region to alter. I've read and Googled since Saturday. My brain actually hurts. Goal - Insert my background image into region - Add Spry accordion

  • Jco topics

    hi all i want learn more about jco topics.plz help me thanks hareesh