How to remove the "int len" of my return string on the DLLS header when building a DLL on LabVIEW 8.5

Hi all.
I'm building a DLL on LabVIEW and I choose a string as an output on the terminals connectors.
But LabVIEW creates another output, the lenght of the return string.
This is a problem because I have other DLLs and I need them to be compatible.
How do I remove this length from the header? What is the difference between Pascal String and C string and String Handle Pointer?
String Handle Pointer removes the length from the header but I don't know the difference between this data types.
Thanks in advance for the help.
Daniel Coelho
Portugal
Daniel Coelho
VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
Controlar - Electronica Industrial e Sistemas, Lda

Daniel Coelho wrote:
Hi all.
I'm building a DLL on LabVIEW and I choose a string as an output on the terminals connectors.
But LabVIEW creates another output, the lenght of the return string.
This is a problem because I have other DLLs and I need them to be compatible.
How do I remove this length from the header? What is the difference between Pascal String and C string and String Handle Pointer?
String Handle Pointer removes the length from the header but I don't know the difference between this data types.
Thanks in advance for the help.
Daniel Coelho
Portugal
C string pointer is a pointer to a memory location whose string information is terminated by a 0 byte. Pascal String Pointer is a pointer to a memory location where the first byte specifies the number of bytes to follow. This obviously allows only for strings up to 255 character length.
LabVIEW String Handle is a pointer to a pointer to a memory location where the first 4 bytes are an int32 value indicating the number of characters to follow. You can read such a String handle in a function without many problems, but you can only create, resize and delete such a handle by using LabVIEW memory manager functions. So this makes only sense if the caller of such a DLL is LabVIEW too as another caller would have to go through several hoops and tricks in order to gain access to the correct LabVIEW kernel that could provide the memory manager functions to deal with such handles.
Last but not least output strings whose allocated length is not passed to the funciton as additional parameter are a huge secerity risk (talk about buffer overrun errors). LabVIEW DLL Builder does not support the creation of DLLs with output string (or array parameters)  without the explicit passing of an additional parameter telling the DLL function how large the allocated size is (so that the DLL function can make sure to never write over the end of the buffer).
The additional length parameter only disappears for String Handles because LabVIEW will simply resize them to whatever length is necessary and that is also the reason why those handles need to be allocated by the same memory manager instance that is also going to execute the DLL function.
Resizing of memory pointers is non-standardized and in normal circumstances not suited for passed function parameters at all.
Rolf Kalbermatter
Message Edited by rolfk on 06-13-2008 12:28 PM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • TS3274 How to remove an old iCloud account from my IPad.  The account (email) was on my dad's name and he resently change it and now i can't  reset or delete his iCloud account without his password.  Please advise on the procedure.  Thanks.

    How to remove an old iCloud account from my IPad.  The account (email) was on my dad's name and he resently change it and now i can't  reset or delete his iCloud account without his password.  Please advise on the procedure.  Thanks.

    If you are trying to activate an iPad or iPhone and it is asking for a previous owners Apple ID and password, you have encountered the Activation Lock. This is a security feature that prevents thieves from setting up and using a stolen or lost iPad or iPhone. You have no alternative. You must use the previous owner's password to get permission to use the device. If you cannot get the password your father put on the iPad you will never be able to activate the device and no one can help you do it.

  • How to remove block from trusted web site. I did the obvious by pasting the web address in the allow content area. What are the other ways

    I am a cityville game player on facebook and for some reason today I am unable to send out blasted on the game when if fact this was never a problem. Finally I went to internet explorer and the same problem happen, but internet explorer let me know that the content was blocked. All I had to do was unblock it and that was easy and know I can blast out. However trying to remove the block from fire fox is a issue. I went into to tools and removed every block and it still want work right. Therefore, how to remove block from trusted web site. I did the obvious by pasting the web address in the allow content area under tools options. What are the other ways

    Hello,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is about ASP.NET website programming, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to remove a icloude id because i don't no the id and password

    how to remove a icloude id because i don't no the id and password

    Did you buy this phone second-hand (used)? If you did, and it has been locked by the previous owner, then only he can unlock it. If you cannot contact him to do so you will be unable to use the phone.

  • How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values?

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

    How do I copy/paste full numerical-only account strings into the Projects WebADI template when the account segment fields in the template require use of the dropdown because they're formatted as alpha-numeric values? I'm using the Integrator named "Projects - Transaction Import" and a custom Layout created based on the seeded Layout named "Transaction Import - Accounted". Do I need to somehow change my Layout to make the Document accept numerical values instead of requiring alpha-numeric values? I need to be able to populate the Document with a large amount of transactions and cannot feasibly go through every transaction to add the alpha-valued name of the account segment to every segment that requires it. The segments in particular causing the problem are "Expnd Type" and "Organization Name" which are both alpha-numeric and as such contain the segment number and name; I need to be able to only have to enter the Natural Account Number (6-digit number only) and the Organization Number (5-digit number only).

  • How to remove a virus that is reported to be in the text animation files of Captivate 8

    The virus protection program ClamAV is reporting a virus Swf.Exploit.CVE_2014_0564-2 exploit. in several of the Captivate program files that are located in the programs/Adobe folder (some of the text animations swf files, interaction files, and widget files- there are several text animation files that are not infected). How can I remove this virus. I found out in other forums that many other people experience the same issue. But I could not find a resolution yet.
    The scan reported that the following files were infected:
    C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Blade.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Blue_Aura.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Blurrywave.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Cascade_Dive.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Catapult.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Cloning.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\DePlume.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Elliptical.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Fade_In.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Feather.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Fillin_Blanks.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Flashlight.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Flight.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Flowright.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Fly_Away.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Fog_Lifted.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Futbol.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Giftwrap.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Green_Globe.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Gridright.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Hori_Scan.swf: swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\illusion.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Leading_Star.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Light_Passage.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Matador.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Mini_Starburst.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Modflare.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Multi_Wake.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Ornaments.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Paradigm.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Passby.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Pastel_Prism.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Pivot.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Prismflow.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Pythagorean.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Raindrops.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Red_Hot_Skew.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Reflect.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Rotate_Left.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Shufflecards.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Sidestep.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Slant_Slide_Blinds.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Sliced.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Sliding.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Slidingblinds.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Spindle.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Spintop.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Square_Roll.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Starburst.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Stuff_It.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Swingstack.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Take_Two.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Topsy_Turvy.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Tossup.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Trailing_Light.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Transition.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Trans_Pivot.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Trickle_In.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Turnabout.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Twinkle.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Twinkle_Trail.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Twirl_flip.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Typing Text With Sound.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Typing Text.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Wake.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Waltz.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Waveripple.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Whimsy.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
    C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Windblown.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Windmill.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Wizard.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\TextAnimations\Zoomout.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
    C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Interactions\Digital Timer.wdgt: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Interactions\hangman.wdgt: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Interactions\hourglass.wdgt: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Interactions\memoryGame.wdgt: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Widgets\emailIcon.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Widgets\pocastIcon.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Widgets\print.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Widgets\videoIcon.swf: Swf.Exploit.CVE_2014_0564-2 FOUND
      C:\Program Files\Adobe\Adobe Captivate 8 x64\Gallery\Widgets\volumeControl.swf: Swf.Exploit.CVE_2014_0564-2 FOUND

    Here is an update on this issue. Maybe it will help someone else. After many months of working with Adobe support, they finally helped me to remove all viruses from my computer. This included Adobe Captivate cleaning up their Captivate 8 code and removing the Swf.Exploit.CVE_2014_0564-2 virus from their Captivate program files. As my research showed, the danger with this virus is that it seems to be dormant until a visit to a website that activates it and then it can destroy all your data (that terrified me when I read that and I made sure I had lots of backups in the Cloud). I got lucky and it did not get activated.
    As it turns out, it's not only the text animation files but also the widget animation files. Following is the final correspondence with Adobe. I hope the links work too.
    These are the fixed program files that Adobe uploaded for me to access https://www.dropbox.com/sh/cyelu2yvkc0f521/AADRYR3X0n3nM7lmIUNMQokWa?dl=0. However, do not use the "text animations folder", there was a little bug left and they sent me a replacement for the text animations here https://www.dropbox.com/sh/ymen27rrba75mc2/AABwsQjCmxdQHvkSx5Kjybo_a?dl=0
    These are the steps they had me take and it worked for me.
    Download and extract the SWF Animations from the TextAnimations folder
    Take a back-up of the old animations which are located at “<Captivate Installation Dir>\Gallery\TextAnimations\” and “<Captivate Installation Dir>\Gallery\Widgets\”
    Replace the existing animations with the new ones in the same folder
    Open your Captivate project and delete all the old animations which were inserted, and then close Captivate.
    Even though the animations have been deleted, Captivate still holds them as internal resources. Hence, the following tool must be run :
    Download and extract the files in the CCFix folder(Win 32-bit or Win 64-bit)
    Place AdobeCaptivateFix.exe, CleanResources.bat and CPProjectsNSlides.dll in the Installation folder of Captivate 8.1
    Run CleanResources.bat
    Captivate opens in a special mode, where you get a file browser.
    Choose the files to be fixed and proceed. The fixed cptx files will be placed in the same location as the original. A “_fixed” suffix is added to the new cptx.
    Captivate automatically exits after this.Your file is now fixed.
    Now open the fixed project and replace all the deleted text animations with the new ones.
    I scanned my computer with ClamWin again and it still found the virus. This time it was in the Captivate Cache. Maybe it was from fixing the old files. I deleted all Captivate Cache files and I no longer got a positive Swf.Exploit.CVE_2014_0564-2 found report from ClamWin. YIPPPIEEEEE!
    It took almost 200 hours of effort to repair infected files. What I don't understand is how Adobe can have a virus in their Captivate program files and then make us fix the infected files manually. I have asked them to write a program to fix infected files (how hard can that be to automate the steps they gave me?). I never got a response.  That seems really sad.

  • How to remove /delete a particular character in a String

    Hii
    i have this problem.In order to specify the number of decimal palces for a double type variable,i have used the
    NumberFormat class.
    My code ;
    Double x=234566.4 ;
    NumberFormat n1= NumberFormat.getInstance();
    n1.setMaximumFractionDigits(2);
    n1.setMinimumFractionDigits(2);
    String st=n1.format(x);
    out.print(st) ;
    is giving me 2,34,566.40 which I dont want I want to have it lik 234566.40
    since i will again put it in function Integer.parseInt/Double.parseDouble...so those commas are giving me errors.So can anybody suggest how to remove those commas from that string...It would be of gr8 help.thanx
    Arnab

    hi
    You can use StringTokenizer
    Your code
    Double x=234566.4 ;
    NumberFormat n1= NumberFormat.getInstance();
    n1.setMaximumFractionDigits(2);
    n1.setMinimumFractionDigits(2);
    String st=n1.format(x);
    out.print(st) ;
    StringTokenizer sT = new StringTokenizer(st,",");
    String newstring="";
    while(sT.hasMoreTokens())
    newstring += sT.nextToken();
    out.println(newstring);
    this may help out
    cheers
    rambee

  • How do I get (in c) a method return value from the java side?

    I have a class in the Java side, that I pass as object to the c side.
    in the Java class I have the following method:
    public String getPgmId()
    return pgmId;
    where pgmId is a private string.
    I nees to get the value of pgmId, hopefully by using the getPgmId method.
    what I have until now is:
    JNIEXPORT jint JNICALL Java_JavaAPI_StartProgram (JNIEnv *env, jobject obj, jobject obj2)
    jmethodID methID;
    jstring jstr;
    const char *str;
    /* Get a reference to obj2 class */
    jclass cls = (*env)->GetObjectClass (env, obj2);
    if (cls == NULL){
    return;
    methID = (*env)->GetMethodID (env, cls, "getPgmId", "()Ljava/lang/String;");
    }//StartProgram
    my question is how from this point, can I get the return value of the method getPgmId().
    tnx

    jString CallStringMethod(env, obj2, methID);

  • How to remove extra spaces in a xml formatted string

    Hi,
    I am trying to remove extra spaces between the xml tags. For
    example, if a string is something like
    ' <header 1> <header 2> test </header 2> </header1>'
    I want to get rid of the spaces only between the closing tag of header 1 and opening tag of header 2 and closing tag of header 2 and opening tag of header 1, in short ,I want to remove the extra spaces between the tags if there are no other characters between them. I do not want the remove the spaces between closing tag header 2 and opening tag of header ,as there is occurence of other characters.
    I am aware that this can be done by looping through the string and using instr to identify the characters '<' and '>', but I would like to use it as a last resort only.
    Can anyone suggest me a better way of doing it in a single go by manipulating the data?
    Any help is really appreciated.
    Regards,
    Anil.

    You can use the replace function. If you only expect one extra space, then:
    scott@ORA92> select replace ('<header 1> <header 2> test </header 2> </header1>',
    2      '><', '><')
    3 from dual
    4 /
    REPLACE('<HEADER1><HEADER2>TEST</HEADER2></HEADER
    <header 1> <header 2> test </header 2> </header1>
    If you expect more extra spaces, then you will need to wrap another replace function around it for each space, for example the following will eliminate up to three spaces:
    scott@ORA92> select replace (replace (replace ('<header 1> <header 2> test </header 2> </header1>',
    2      '>     <', '><'), '>     <', '><'), '> <', '><')
    3 from dual
    4 /
    REPLACE(REPLACE(REPLACE('<HEADER1><HEADER2>TEST
    <header 1><header 2> test </header 2></header1>

  • Nokia n97 camera lens/ can i return it to the stor...

    hi
    i just my nokia n97 a few weeks ago and my camera lens is getting scratched because of the camera cover. i searched the site and many people said its a hardware problem, will care centre be able to fix it, or can i go back to the store where i have bought it on a contract and return it for another fone eg. HTC magic.
    thanks alot..kinda disappointed for the defect...
    n97.

    The lens shutter on a camera is supposed to protect the lens, that why its there. However, in this case the N97, it has a design fault, and as such the shutter is not fit for purpose.
    Now, if the shop are unwilling to exchange the device for a device without the flaw demand a refund of your money. If they still refuse to do anything then contact your local trading standards, you will be able to find their address or phone number from the link below.
    Its the shops responsiblity to sort this out so don't let them tell you otherwise.
    http://www.tradingstandards.gov.uk/advice/consumer-advice.cfm
    Sale of Goods Act 1979. Supply of Goods and Services Act 1982. Sale and Supply of Goods Act 1994. The Sale and Supply of Goods to Consumers Regulations 2002.
    Key Facts:• Wherever goods are bought they must "conform to contract". This means they must be as described, fit for purpose and of satisfactory quality (i.e. not inherently faulty at the time of sale).
    •  Goods are of satisfactory quality if they reach the standard that a reasonable person would regard as satisfactory, taking into account the price and any description.
    •  Aspects of quality include fitness for purpose, freedom from minor defects, appearance and finish, durability and safety.
    •  It is the seller, not the manufacturer, who is responsible if goods do not conform to contract.
    • If goods do not conform to contract at the time of sale, purchasers can request their money back "within a reasonable time". (This is not defined and will depend on circumstances)
    • For up to six years after purchase (five years from discovery in Scotland) purchasers can demand damages (which a court would equate to the cost of a repair or replacement).
    • A purchaser who is a consumer, i.e. is not buying in the course of a business, can alternatively request a repair or replacement.
    • If repair and replacement are not possible or too costly, then the consumer can seek a partial refund, if they have had some benefit from the good, or a full refund if the fault/s have meant they have enjoyed no benefit.
    http://www.berr.gov.uk/whatwedo/consumers/fact-sheets/page38311.html#
    Message Edited by kogg on 07-Oct-2009 08:13 AM

  • Returning strings of the same name in a text file from an array

    Hi,
    Another quick question. I have a text file with lines consisting of one integer, and four strings. Currently, I am able to search through this file and find any of the variables listed within. However, if any of the variables are listed more than once, and I search for that particular varable name, it only prints out the first line containing that particular variable name.
    Basically, how do I modify the following code so that the search method returns all the instances of a particular variable name in the text file?
    My current code is as follows,
    1. Search method,
    public Title lookUpDirector(String requiredDetails) {
            boolean found = false;
            int next = 0;
            while (!found && (next<TitleCount))
                if ( TitleArray[next].getDirector().equals(requiredDetails))
                    found = true;
                else next++;
            if (found) return TitleArray[next];
            else return null;
        }2. Test main class
    import simplejava.*;
    public class SearchTitleDirector
        public static void main(String[] args) {
            String titleDetails;
            SimpleReader keyboard = new SimpleReader();
            SimpleWriter screen = new SimpleWriter();
            SimpleReader inFile = new SimpleReader("title_test.txt");
            TitleList title = new TitleList(inFile);
            TitleList[] sortedArray = new TitleList[]{title};
            titleDetails=keyboard.readLine("Director?");
            Title search = title.lookUpDirector(titleDetails);
            if (search == null)
                screen.println("Not found");
            else screen.println(search);
    }Any help or advice appreciated!

    Thanks for the reply and advice.
    I have tried implementing the lookUpDirector method as follows,
    public TitleList lookUpDirector(String requiredDetails) {
            boolean found = false;
            int next = 0;
            TitleList list = new TitleList();
                while (!found && next<titleCount) {
                    if ( titleArray[next].getDirector().equals(requiredDetails)) {
                        list.add(titleArray[next]);
                        next++;
              if (found) return list;
              else return null;
            }When I use this method with the previous test main class, it compiles and runs, but after the user inputs the name of the director to search for, the input window freezes indefinitely and no result is achieved. The output pane in NetBeans is as follows,
    init:
    deps-jar:
    compile-single:
    run-single:
    Director?The only way to stop the process is to terminate it in the Runtime section of NetBeans.
    I have no idea why this is happening. Any advice?

  • HT201413 HELP!  I was updating my iphone 4S to the new IOS6 via itunes when in the in the middle of the process of actually updating the iphone OS, it suddenly returned an error - "The iPhone could not be updated.  An unknown error occurred (1602)"  PLEAS

    PLEASE HELP!!!
    I am using an HP DV9 laptop running Windows 7 Home Premium and the latest iTunes software.
    I regularly synch my iphone 4S with my laptop & Outlook.
    I recently got the message that an IOS6 upgrade is available & so I scheduled to apply the update.
    Everything was running normally when, after the download of the update, backup of my iphone, & applying the update began when
    suddenly, iTunes returned with an ERROR MESSAGE as follows:
    The iPhone "Ramon's iPhone" could not be updated.  An unknown error occurred (1602)
    Now, my iphone is stuck with the iTunes icon and the USB image with an arrow pointing to the iTunes
    icon.
    WHAT DO I DO NOW?????!!!!!
    Help PLEASE!!!!

    I actually tried the steps below due to the error -5000 I had encountered during the previous tries updating my IOS to 5.1.1
    "Perform a normal sync and check your iTunes to make sure everything was synced in the right places like the tabs at the top of your "summary" when you plug in your iPhone to iTunes.  If everything is there and all the right boxes are checked for the stuff you want to save, then put your phone into recovery mode by keeping it plugged into your computer with iTunes still up and running. Next you want hold down the power button AND the home key button (the big button on the bottom part of your screen) AT THE SAME TIME. Your phone will go thru 4 different screens before you
    Can let them go.  U will see your normal power off slider screen, then a black screen, then a black screen with an apple logo, then finally a screen with the iTunes logo and a picture of a sync cable below it. Once you see this screen LET BOTH BUTTONS GO but not before you see this screen.  Your computer will tell you that it has detected an iPhone in recovery mode, say ok.  Then hit the restore button on your iTunes summary screen, it should then ask you if you want to restore from a backup and update, say yes.... And at the end of its restoring and uploading you should have iOS 5!!"
    Then it proceeded to a reactivation process... =(

  • Error of heads when build the .dll by visual studio 2003

    I am trying to call the dll function in labVIEW which build by visual studio 2003.
    while I compile the basic program in visual studio 2003,the dll will be built successfully,but if I include heads like or in my program, etc.Compiling has the error of ,so the dll can not be built.
    I have trued to look for the solution in NI Discussion Forums,but havent seen the related article about the error of including .
    If someone can answer this for me,that will be a great help,and I'll be so appreciate if anyone get me out
    of the trouble.
    Sean

    I'm a little unclear about your question. What is the exact error that you are receiving and at what point are you receiving it? Is the error occurring when calling the DLL in LabVIEW or is it occurring when building the DLL in Visual Studio? Further clarification about exactly what the problem is and where it is occurring would be a big help!
    Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • How to Remove a Entry in cache but do not trigger the erase in cachestore

    hi guys,
    I meet a really special requirement, like the topic, I have a distribute-cache, when put a object in cache, will tigger save method in cachestore to store it to DB, when remve a entry, will tigger the erase method to delete it from DB, and then I need another operation--which can just remove the entry on cache and won't delete from DB? I checked eviction method, but I think it's for local cache. how could I use it on near-cache or distribute cache.
    anyone could help me?
    Thanks a lot.
    best,
    DFJ
    Edited by: 912032 on Mar 2, 2012 12:37 AM

    let me post my code:
    package com.admin.processor;
    import java.io.IOException;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    import com.tangosol.util.InvocableMap;
    import com.tangosol.util.processor.AbstractProcessor;
    public class ValueEvictor extends AbstractProcessor implements PortableObject {
         @Override
         public Object process(InvocableMap.Entry entry) {
    entry.remove(true);
    return null;
    @Override
    public void readExternal(PofReader pofReader) throws IOException {
    @Override
    public void writeExternal(PofWriter pofWriter) throws IOException {
         public static void main(String[] args) {
              AccountKey key = new AccountKey("Test0015678",24);
              AccountEntity account = new AccountEntity();
              account.setDescription("testDescrtiption");
              account.setName("hello");
              account.setParentID(18);
              account.setKey(key);
              NamedCache namedCache=CacheFactory.getCache(account.getClass().getName());
              //namedCache.put(account.getKey(),account);
              namedCache.invoke(key, new ValueEvictor());
    Edited by: 912032 on Mar 2, 2012 1:16 AM

  • How to remove "Open with... Adobe Acrobat" from the right click context menu

    We want to deploy Adobe Acrobat on our Citrix envoriment. At this moment we have Adobe Reader for all users installed. Adobe Acrobat should be only availible to a selection of users. I've tried to remove everything with the custimaztion tool but one thing which I'm not able to is to remove the option when you right click a PDF document that you can choose to open with and then Adobe Acrobat XI. I want to disable this because else users who don't have the permission to run Adobe Acrobat are still able to run it.

    Sorry but you're not right, why are there then whtiepapers how to install it on Citrix?
    http://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/citrix.html

Maybe you are looking for

  • Global variables in Oracle 8.1.6 on NT

    I am running Oracle 8.1.6 on Windows NT. Does anybody know how can I create and maintain global variables or even constants, so that the same variables and constants could be used by all connections to the database. The main feature is that I can sto

  • Oracle Application Server Install Issue

    Gurus, There were 2 CD/DVDS (media) sent for the Oracle Application Server Install, but the Oracle Universal Installer did not ask for the 2nd CD while doing the Install, is this normal or I am not sure I missed any steps while installing the 1st CD/

  • Custom particle problem, transparency not showing in generated particles?

    Using After Effects CS5 and Trapcode Particular: I want to use a custom particle for the generated particles. So I have imported a .gif image of a pollen grain, which have a transparent backround. The transparency does not automagically show after th

  • Great Technical Support from Jorge and Kevin Smith

    I recently had an "oops" moment and long story short, I had to have Verizon recover my number and add my phone back to my account.  I had talked to five different people within the last 48 hours about this issue and nobody seemed to fully understand

  • Server Connection to practice OAF

    Hi All, I am an OAF developer with 4 years experience. I am looking for a site that may offer a connection to apps server for learning purposes.(DBC file and username password authentication) so that I can test my OAF pages. Request to share any info