Help needed urgent please ( parallel port access in linux)

hi all, i am trying to read and write data to /from the parallel port , i am running IBM j9 vm on linux.under /dev there are lp0..lp3 parport0..parport3, and port devices , i dont know which one to use , i have tried all , they all return with an ioexception saying "cannot find the file" except for port device which does not generate any error but it does not return what i have written on it ,
any help would be much appreciated.
i am using fileoutputstream and printwriter calsses .
i dont want to use javax.comm api cause i think its incompatible with ibms visual age micro edition ( the one i am using ) so i would prefer something that works with my IDE .
thanks
yahya
[email protected]

However, there is an on-going OpenSource version called "RXTX" (http://jarvi.ezlink.com/rxtx/) that works quite well. Be sure to read all the documentation that comes with it, as you'll need to set some permissions on the ports you want to use.

Similar Messages

  • BPM Workflow Help Needed Urgently please

    Hi All,
    We are working on a BPM workflow
    User A submits the request which goes to User B for review if rejected by user B the process stops but if approved then the amount is calculated using a decision table and based on the amount it will be routed to the respective users.
    I did it till BPM part and created rules in the BRM part as well but dont know how to call this BRM in BPM.
    Please help me its very very urgent.
    Thanks in advance

    Refer step 25 of this document to see how to create a web-service for your BRM ruleset.
    Once the web service is ready, it can be imported anywhere for use.
    1. In your BPM, right-click on the 'WSDL' folder and select 'Import WSDL'. You can import your BRM web-service here.
    2. Then place an automated activity in your BPM process design and set the BRM service as the Service Reference property of the Automated activity.
    3. Once this is done, you will see the Condition and Action values of your BRM decision table in the Input and Output mapping of the Automated Activity.
    4. Map the values of BPM process context to the BRM condition values in the 'Input Mapping' and get the corresponding output in Output mapping (Action Values of decision table).
    Refer step 12 in this document to see how to import a WSDL in your BPM Process.
    Hope this helps.

  • Zoom problem(help needed urgently please )

    friends,
    i m working on a class in which there is one JPanel inside a JInternalFrame. i have functionalities like zoomin and zoomout. for that i m writing my code on mouse clicked of JPanel but my problem is that mouseClicked method is getting called several times even if i click once on JPanel and thus zooming the JPanel by a very large value.
    please help me if u have any solution for it.Its very urgent.

    You are still crossposting.
    It would be a waste of everyone's time to answer you here, since quite likely others have already helped you elsewhere.

  • Design pattern help need urgently please

    Hi I need you to tell me if the following code looks like its a facade or not?
    The method make the table calls another method in the class project4
    which contains instances of itself and student class and supervisor class and the method prints out data from these classes.
    Iv to hand this in tomorow and would like to know
    Is that a facade or not?
    Please help
    public class TableFacade
         TableFacade()
         System.out.println("This is the table of projects");
         public Project4 makeTheTable()
              Supervisor5 sup = new Supervisor5();
              Project4 project =new Project4();
              project.readRelevantProjectsFromFile(sup);
         return project;
    }

    Sorry to be continuously replying but desperate times call for desperate measures anyway
    Im trying to adapt from my project4 class
    is this in the adaptor pattern?
    class AdaptProject
         Project4 project;
         Supervisor5 supervisor;
         void readProjectDetails()
              project.readProjectDetails();
         void readRelevantProjectsFromFile(Supervisor5 v)
              project.readRelevantProjectsFromFile(supervisor);
         String projName()
              return project.projName;
         String projSubject()
              return project.projSubject;
    }

  • High CPU usage on all cores by ntoskrnl.exe? Help needed urgently Please.

    ntoskrnl.exe, system, has multiple cores running with high usage, locking up my system when using programs.
    After looking through the forums I did the following:
    I ran
    sfc /scannow but nothing found. 
    I used process Explorer to find that the system has a thread <ntoskrnl.exe!TtlSid HashLookup+0x 1ffc> that
    is using up 40+% of all four cpu cores. Looks like a driver fault with 8.1, but cannot pinpoint the device. Any clues msg me. 
    I have created an etl file that contains usage data. this is present here:
    https://dl.dropboxusercontent.com/u/8554814/highCPUUsage.zip
    Would be a lot of help if this can be resolved. please help.

    forgot to ask, may I know your PC model?
    mostly is related to the network, networking software, or software which need internet connection
    did you already updated all the network driver?
    is there any networking software or downloaded software? may I know your antivirus status? firewall?
    try clean boot and go to safemode to check, choose safe mode only, safe mode with networking and normal mode without internet (unplug cable or disconnect Wifi)

  • Help needed urgently please!!!!!!

    hi
    there i am running windows xp pro 64 bit . Using Premiere Elements7. when i connect with firewire to load video from camera it all looks impeccable on screen as it loads. Once i stop loading and Premiere renders it (i guess) all of a sudden the video looks granny and pixalated and stays that way even after i export it on dvd.Hope spme one can help me please.Thank you in advance.

    i have a Sony hvr-hd 100u i shot the video in dv mode i dont understand why
    it gets granny after i load it onto PE7 i hope u can help me figure this out lol
    thanks again

  • Nokia 6300 help needed urgently please

    My friends 6300 phone has been trodden on by a large horse and has since stopped working - well it would really. But unfortunately she had not got the connectivity package for her laptop and had saved all the info on her phone rather than her sim. I have tried connecting it to my software but it comes up with USB device not recognised. My own 6300 and 6310 work fine so I know the Nokia pc suite is working fine. Is there any way we can get this info out she has phone numbers in there that she will never be able to get again.

    i hear you, i have been in this situation many times, hence now almost neurotically i have several back up files, and online back up providers to keep my most prescious data safe. still does not change the fact that it is frustrating when things like this happen that noone couldhave predicted. hope you get it sorted out and be able to find this data in other ways.....
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • Load bar at start up, then shut down. HELP NEEDED URGENTLY!!! plss....

    Load bar at start up, then shut down. HELP NEEDED URGENTLY!!! plss..

    The startup disk may need repairing.
    Startup your Mac while holding down the Command + R keys so you can access the built in utiliites to repair the startup disk if necessary or restore OS X using OS X Recovery

  • HT201210 i have an error of no 11. kindly help, needed urgently

    i have an error of no 11. kindly help, needed urgently
    when i try to upgrage my
    iphone 3gs wit 4.1 to new latest 5.1
    it gives the erorr of 11. what that mean? Reply as soon as you can !
    thnx

    Error -1 may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.

  • Some J2ME midlets doubts!! help needed urgently!!!

    Hi,
    I am currently working in a company where it does wireless technology like WAP and I am assigned a task of creating a screensaver midlet. I have some doubts on the midlets.
    1) How do i use a midlet suites? From what I heard from my colleagues & friends, a servlet is needed for midlets to interact with one another. is it true?
    2) How do I get the startin midlet to take note the phone is idling so that the screen saver midlet can be called?
    Help needed urgently... if there is any source codes for me to refer to would be better... Thanks...
    Leonard

    indicates that MIDlet suites are isolated (on purpose) from each other, so you can't write over another one's address space.
    Also, I believe (at least on cell phones) that you have to specifically enter the Java Apps mode; unless you do the app won't execute. If you are in Java apps mode and a call comes in, the cell's OS puts the Java app currently executing on "Pause" mode and switches back to phone mode.
    Not sure if you will be able to have a Java app do that automatically.
    BTW why do you need a screensaver on an LCD display? Is it really intended to show an advertisement?
    Download and real all the docs you can from Sun, once you get over the generic Java deficiencies MIDlet's aren't that hard.

  • Parallel Port access using Java

    hello guys.. Please Solve my Problem..
    I have to access motor through pc using Parallel Port. I want to know how to program in java to access Parallel Port. So How can i code to access the any Port of Parallel Port. Please Guide me in this..
    I have tried using parport (code given below )---------------->but it gives error hs_err_pid2172.log (error explanation given at last ). Please tell me what is the problem or if u have any other alternative to access  Parallel Port
    //===============================================================================
    //code :
    package parport;
    public class ParallelPort
    private int portBase;
    public ParallelPort(int portBase)
    this.portBase = portBase;
    public int read()
    return ParallelPort.readOneByte(this.portBase+1);
    public void write(int oneByte)
    ParallelPort.writeOneByte(this.portBase, oneByte);
    public static native int readOneByte(int address);
    public static native void writeOneByte(int address, int oneByte);
    static
    System.loadLibrary("parport");
    import parport.ParallelPort;
    class SimpleIO {
    public static void main ( String []args )
    ParallelPort lpt1 = new ParallelPort(0x378);
    lpt1.write(240);
    ===================================================================================
    ERROR file : hs_err_pid2172.log
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x1000107b, pid=2172, tid=2108
    # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [parport.dll+0x107b]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x02b5c000): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2108, stack(0x02fd0000,0x03020000)]
    siginfo: ExceptionCode=0xc0000096
    Registers:
    EAX=0x000000ff, EBX=0x26a28380, ECX=0x000000ff, EDX=0x00000378
    ESP=0x0301f2f4, EBP=0x0301f308, ESI=0x26a28380, EDI=0x02b5c000
    EIP=0x1000107b, EFLAGS=0x00010246
    Top of Stack: (sp=0x0301f2f4)
    0x0301f2f4: 10001041 10000378 000000ff 000000ff
    0x0301f304: 02b50378 0301f34c 00989c91 02b5c0f4
    0x0301f314: 0301f354 00000378 000000ff 02b5c6f4
    0x0301f324: 02b5c6f4 02b5c6e4 0301f32c 26a28380
    0x0301f334: 0301f360 26a28618 00000000 26a28380
    0x0301f344: 00000000 0301f35c 0301f384 00982cb1
    0x0301f354: 26a285b8 00988099 000000ff 00000378
    0x0301f364: 0301f364 26a28255 0301f390 26a28618
    Instructions: (pc=0x1000107b)
    0x1000106b: cc cc cc cc cc 33 c0 66 8b 54 24 04 8a 44 24 08
    0x1000107b: ee c3 66 8b 54 24 04 66 8b 44 24 08 66 ef c3 66
    Stack: [0x02fd0000,0x03020000], sp=0x0301f2f4, free space=316k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C [parport.dll+0x107b]
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::StubRoutines (1)
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::Interpreter
    v ~BufferBlob::StubRoutines (1)
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x00295800 JavaThread "DestroyJavaVM" [_thread_blocked, id=2164, stack(0x00870000,0x008c0000)]
    =>0x02b5c000 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=2108, stack(0x02fd0000,0x03020000)]
    0x02b5ac00 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3640, stack(0x02f30000,0x02f80000)]
    0x02b59c00 JavaThread "AWT-Shutdown" [_thread_blocked, id=2204, stack(0x02ee0000,0x02f30000)]
    0x02b59000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3740, stack(0x02e90000,0x02ee0000)]
    0x02addc00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=372, stack(0x02d90000,0x02de0000)]
    0x02adb400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=608, stack(0x02d40000,0x02d90000)]
    0x02ad6c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=3920, stack(0x02cf0000,0x02d40000)]
    0x02ad6000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=808, stack(0x02ca0000,0x02cf0000)]
    0x02ad1800 JavaThread "Finalizer" daemon [_thread_blocked, id=1736, stack(0x02c50000,0x02ca0000)]
    0x02acd000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2728, stack(0x02c00000,0x02c50000)]
    Other Threads:
    0x02acbc00 VMThread [stack: 0x02bb0000,0x02c00000] [id=624]
    0x02ae7800 WatcherThread [stack: 0x02de0000,0x02e30000] [id=580]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 262K [0x229e0000, 0x22ae0000, 0x22ec0000)
    eden space 896K, 22% used [0x229e0000, 0x22a11830, 0x22ac0000)
    from space 64K, 100% used [0x22ad0000, 0x22ae0000, 0x22ae0000)
    to space 64K, 0% used [0x22ac0000, 0x22ac0000, 0x22ad0000)
    tenured generation total 4096K, used 344K [0x22ec0000, 0x232c0000, 0x269e0000)
    the space 4096K, 8% used [0x22ec0000, 0x22f161a8, 0x22f16200, 0x232c0000)
    compacting perm gen total 12288K, used 289K [0x269e0000, 0x275e0000, 0x2a9e0000)
    the space 12288K, 2% used [0x269e0000, 0x26a286b0, 0x26a28800, 0x275e0000)
    ro space 8192K, 66% used [0x2a9e0000, 0x2af30f10, 0x2af31000, 0x2b1e0000)
    rw space 12288K, 52% used [0x2b1e0000, 0x2b8306d0, 0x2b830800, 0x2bde0000)
    Dynamic libraries:
    0x00400000 - 0x00423000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\java.exe
    0x7c900000 - 0x7c9b0000 G:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c8f5000 G:\WINDOWS\system32\kernel32.dll
    0x77dd0000 - 0x77e6b000 G:\WINDOWS\system32\ADVAPI32.dll
    0x77e70000 - 0x77f02000 G:\WINDOWS\system32\RPCRT4.dll
    0x77fe0000 - 0x77ff1000 G:\WINDOWS\system32\Secur32.dll
    0x7c340000 - 0x7c396000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\msvcr71.dll
    0x6d870000 - 0x6dac0000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\client\jvm.dll
    0x7e410000 - 0x7e4a0000 G:\WINDOWS\system32\USER32.dll
    0x77f10000 - 0x77f57000 G:\WINDOWS\system32\GDI32.dll
    0x76b40000 - 0x76b6d000 G:\WINDOWS\system32\WINMM.dll
    0x76390000 - 0x763ad000 G:\WINDOWS\system32\IMM32.DLL
    0x6d710000 - 0x6d723000 G:\PROGRA~1\KASPER~1\KASPER~1\mzvkbd.dll
    0x76bf0000 - 0x76bfb000 G:\WINDOWS\system32\PSAPI.DLL
    0x6d730000 - 0x6d743000 G:\PROGRA~1\KASPER~1\KASPER~1\mzvkbd3.dll
    0x6d020000 - 0x6d035000 G:\PROGRA~1\KASPER~1\KASPER~1\adialhk.dll
    0x77f60000 - 0x77fd6000 G:\WINDOWS\system32\SHLWAPI.dll
    0x77c10000 - 0x77c68000 G:\WINDOWS\system32\msvcrt.dll
    0x6d4c0000 - 0x6d4c6000 G:\PROGRA~1\KASPER~1\KASPER~1\kloehk.dll
    0x6d320000 - 0x6d328000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\hpi.dll
    0x6d820000 - 0x6d82c000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\verify.dll
    0x6d3c0000 - 0x6d3df000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\java.dll
    0x6d860000 - 0x6d86f000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\zip.dll
    0x6d0b0000 - 0x6d1de000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\awt.dll
    0x73000000 - 0x73026000 G:\WINDOWS\system32\WINSPOOL.DRV
    0x774e0000 - 0x7761d000 G:\WINDOWS\system32\ole32.dll
    0x5ad70000 - 0x5ada8000 G:\WINDOWS\system32\uxtheme.dll
    0x73760000 - 0x737a9000 G:\WINDOWS\system32\ddraw.dll
    0x73bc0000 - 0x73bc6000 G:\WINDOWS\system32\DCIMAN32.dll
    0x74720000 - 0x7476b000 G:\WINDOWS\system32\MSCTF.dll
    0x755c0000 - 0x755ee000 G:\WINDOWS\system32\msctfime.ime
    0x6d2c0000 - 0x6d313000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\fontmanager.dll
    0x7c9c0000 - 0x7d1d6000 G:\WINDOWS\system32\shell32.dll
    0x773d0000 - 0x774d3000 G:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x5d090000 - 0x5d12a000 G:\WINDOWS\system32\comctl32.dll
    0x6d620000 - 0x6d633000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\net.dll
    0x71ab0000 - 0x71ac7000 G:\WINDOWS\system32\WS2_32.dll
    0x71aa0000 - 0x71aa8000 G:\WINDOWS\system32\WS2HELP.dll
    0x6d640000 - 0x6d649000 G:\Program Files\Java\jdk1.6.0_07\jre\bin\nio.dll
    0x77120000 - 0x771ab000 G:\WINDOWS\system32\OLEAUT32.DLL
    0x10000000 - 0x1000b000 G:\Program Files\Java\jdk1.6.0_07\bin\parport.dll
    VM Arguments:
    java_command: parport.NewJFrame
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=G:\Program Files\Java\jdk1.6.0_07\bin;G:\java\classes
    PATH=G:\Program Files\PC Connectivity Solution\;G:\Program Files\Java\jdk1.5.0_07\bin;G:\WINDOWS\system32;G:\WINDOWS;G:\WINDOWS\System32\Wbem;G:\Program Files\K-Lite Codec Pack\QuickTime\QTSystem\;G:\Program Files\Java\jdk1.6.0_07\bin;G:\Program Files\Microsoft SQL Server\90\Tools\binn\;G:\Program Files\MATLAB\R2007b\bin;G:\Program Files\MATLAB\R2007b\bin\win32
    USERNAME=shankar
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 7, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 4 stepping 7, cmov, cx8, fxsr, mmx, sse, sse2, sse3
    Memory: 4k page, physical 457196k(30972k free), swap 1074312k(241668k free)
    vm_info: Java HotSpot(TM) Client VM (10.0-b23) for windows-x86 JRE (1.6.0_07-b06), built on Jun 10 2008 01:14:11 by "java_re" with MS VC++ 7.1
    time: Thu Oct 09 13:47:18 2008
    elapsed time: 7 seconds

    I have same problem...
    No one more have solve this?
    I alread have tried use RXTX library..
    but I have:
    java.io.IOException: The device is not connected.
    I think that pass-motor don't have correct response for pararell protocol (I need use it with direct write, no ack signal, no read, etc)

  • Help needed urgently -Had a power (electricity) failure at re-installation

    I need your help in  fixing this BIG problem. I had an app reset which required me to re-install my 8900 Os. In the process of installation. Having gotten to the level where it says Do not disconnect your device..
    Loading JVM and the system application window
    waiting for device initialization
    A colleague of mine trying to resolve some issues with his printer mistakenly Pull my power cable off
    I tried starting all over again but the system would not recognize the phone and could not even come up with the com port number>
    the phone blinks intermittently too.
    How do I resolve this issue.
    Thank you

    Hi and Welcome to the Forums!
    Two possibilities for you:
    http://crackberry.com/blackberry-101-lecture-12-how-reload-operating-system-nuked-blackberry
    http://forums.crackberry.com/f3/how-wipe-jl_cmder-53502/
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Parallel port access problem

    Hi all!
    I'm trying to communicate with parallel port using the commapi version 2. Unfortunately, the api doesn't accept any other mode than SPP mode that is read-only. When I try to change the parallel port mode, I got an UnsupportedCommOperationException. I'm working with windows xp.
    Does anybody have an idea?
    Thanks!
    Thiago

    I have same problem...
    No one more have solve this?
    I alread have tried use RXTX library..
    but I have:
    java.io.IOException: The device is not connected.
    I think that pass-motor don't have correct response for pararell protocol (I need use it with direct write, no ack signal, no read, etc)

  • Help needed urgently on a problem..plzzz

    hi..this is a linear congruential generator. I have to implement it and i need the execution time for the program.
    for your understanding i'm providing an example below.
    Xn=(( a* xn-1 )+b) mod m
    If X0=7 ; a = 7 ; b =7 ; m=10
    Then
    X0 = 7
    X1 =((7 * 7) + 7))mod 10 = 6
    X2 = ((6*7)+7))mod 10 = 9
    X3 = ((9*7)+7) mod 10 = 0
    X4 = ((0*7)+7) mod 10 = 7
    Now since the cycle is being repeated i.e 7 appears again�so the period is 4 coz there are 4 diff nos. i.e 7,6,9,0�..
    help required urgently....your help will be appreciated...thankyou..

    Hi,
    I wrote the code so that it catches any cycle (not only the "big" one).
    Otherwise it will enter infinite loop...
    The time complexity is O(N*logN): it can do at most N iterations (here N is your 'm'), and in each iteration there can be O(log N) comparisons (since I maintain TreeSet).
    Interesting issue: is it possible to supply such (x0, a, b, m) tuple such that all possible values from 0 to m-1 will be output? I think no :)
    Here is the program:
    package recurr;
    import java.util.TreeSet;
    import java.util.Comparator;
    public class Recurrences {
         private static long x0, a, b, m;
         private static TreeSet theSet;
         public static void main(String[] args)
              long l0, l1, l2, l3;
              try {
                   x0 = Long.parseLong(args[0]);
                   a = Long.parseLong(args[1]);
                   b = Long.parseLong(args[2]);
                   m = Long.parseLong(args[3]);
              } catch(NumberFormatException nfe) {
                   nfe.printStackTrace();
              System.out.println("X[0]: " + x0 + "\n");
              long curr = x0;
              boolean cut = false;
              int i;
              // initialize the set
              theSet = new TreeSet(new LongComparator());
              // we can get at most m distinct values (from 0 to m-1) through recurrences
              for(i=1; i <= m; ++i) {
                   // iterate until we find duplicate
                   theSet.add(new Long(curr));
                   curr = recurrence(curr);
                   if(theSet.contains(new Long(curr))) {
                        cut = true;
                        break;
                   System.out.println("X[" + i + "]: " + curr + "\n");
              if(cut) {
                   System.out.println("Cycle found: the next will come " + curr + "\n");
              } else {
                   System.out.println("No cycle found!");
              System.out.println("----------------------------------");
              System.out.println("Totally " + (i-1) + " iterations");
         private static long recurrence(long previous)
              return (a*previous + b)%m;
         static class LongComparator implements Comparator
              public int compare(Object o1, Object o2)
                   if(((Long)o1).longValue() < ((Long)o2).longValue()) {
                        return -1;
                   } else if(((Long)o1).longValue() > ((Long)o2).longValue()) {
                        return 1;
                   } else return 0;
    }

  • Help needed Urgently- Rebate based on collected amount

    Dear all,
    I come across scenario while discussiion with client that they require rebate with collection. Details of the requirement are given below:
    1. SAP rebates run on billed values & set the accrual in rebate agreement on the rate what we have specified in the rebate agreement. Requirement is that, If i have billed on 1000$ & my accrual value is 100$ with the rate of 10%. If i collected 800$ instead of 1000$, then i need to pay the accrual on the basis of 800$ not on the basis of 1000$. It means i have to adjust accrual amount on the basis of 800$. Conclusion is that i have to pay not 100$ accrual instead less then 100$ on the basis of 800$ which i collected.
    2. In month 1 have billed on 5000$, my accrual amount is 500$ with rate of 10%. In the 2nd month i have to bill 1000$ and i have given an discount of 500$, it means my billed value is 500$ and my accrual amount is 50$@10%. In month 3 again i billed 500$ and my accrual amount is 50$@10%.
    Requirement is that, when i am going to pay the accrual to client, i should pay correct accrual for which he is entitled for. Means i should pay 100$ accrual not 600$ because i have already given an discount of 500$. Discount which i have given already of 500$ should need to be offest with the first month accrual of 500$. So remaning accrual is 100$.
    Great if somebody can help me out for the solutioning of the above requirements.

    Thanks Ivano,
    Somebody has started the conversation.
    Let me put my questions again.
    This requirement is nothing to do with Payment procedure in the agreement type.
    1. In any month if i billed 1000$, so my account receivable would be 1000$. My rebate for that month is 100$ at the rate of 10%. During customer receipt if i collected against my invoice 900$ instead of 1000$, my accrual needs to be corrected 90$ instead of 100$.
    I know this can not be fullfilled by standard SAP, by any thoughts on this welcomed.
    2. I know Rebate can be settled partially or full settlement by payment method( by cheque, bank transfer, or by credit memo) we have configure in rebate agreement type. But here requirement is totally different.
    Here, i need to pay the Rebate as a Discount instead of by cheque or by credit memo. While doing the partial or full settlement system will take into account collected accrual up to that day & apply as a discount to the final bill.
    Scenario is like that sometimes customer asked to give us the discount on bill for whatever they accrued so far.
    This is again cannot solved by standard SAP, but any thought by any body welcome. We have already thought that we need to enhance the solution.
    Solution needed urgently.

Maybe you are looking for

  • Java.io.IOException: A complete message could not be read on socket

    Hell All , Am gettign this issue very frequently .. From my googling i see that this can be because weblgic server was not able to do an IO operation because of time out or may be because of Net work issue ..           I would like to know how this c

  • Random error message from IDragManager

    TypeError: Error #1034: Type coercion failed: cannot convert mx:managers:DragManagerImpl@17294e49 to mx.managers.IDragManager. at mx.managers:ragManager$/get impl()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\ managers\DragManager.as:152] at mx

  • Mail sends buut doesn't recieve

    Have had an iPhone for years. Couple days ago it stopped recieving email, otherwise it sends email and syncs calendars and contacts. A couple days before that I dropped it, which cracked the case and caused some other damage, but it had continued to

  • Enterprise Controls Management on SAP

    Approva is a premier Enterprise Controls Solution provider worldwide giving large organizations using ERP systems. Our customers include Bajaj, General Motors, Honeywell, John Deere, Siemens, Pratt and Whitney etc. The Bizrights Solution will help yo

  • ALV editable cell

    Hi, is there any way I can make editable only one cell of my alv, not the whole column? I'm using REUSE_ALV_GRID_DISPLAY_LVC and LVC_FIELDCATALOG_MERGE. For example: Col1 Editable Not Editable Editable Editable Thanks!!