Create a string from HTML code

Hello to all,
What i have already create is a web browser integrate into a VI project and from this i can read some values like temperature or humidity. Also i have put a HTML window in order to take this values and to export to a string (for example to check these values from the browser and to be able to see in separate constat). Can you help how to do this with an example??
Thanks in advance

Below i have attached the code and the HTML code from the sensor. If you have to recommend anything it will be usefull for me. I have another problem now. If you see in the HTML code you will see that i have three different values to export(temperature, humidity and dewpoint) but all of them have the same regular expression in order to request in my code. Do you know how is it possible to solve this problem because always i take the same temperature value for three of them.
Thanks in advance
Attachments:
TempHumid.vi ‏41 KB
HTMLcode.jpg ‏68 KB

Similar Messages

  • How to improve the speed of creating multiple strings from a char[]?

    Hi,
    I have a char[] and I want to create multiple Strings from the contents of this char[] at various offsets and of various lengths, without having to reallocate memory (my char[] is several tens of megabytes large). And the following function (from java/lang/String.java) would be perfect apart from the fact that it was designed so that only package-private classes may benefit from the speed improvements it offers:
        // Package private constructor which shares value array for speed.
        String(int offset, int count, char value[]) {
         this.value = value;
         this.offset = offset;
         this.count = count;
        }My first thought was to override the String class. But java.lang.String is final, so no good there. Plus it was a really bad idea to start with.
    My second thought was to make a java.lang.FastString which would then be package private, and could access the string's constructor, create a new string and then return it (thought I was real clever here) but no, apparently you cannot create a class within the package java.lang. Some sort of security issue.
    I am just wondering first if there is an easy way of forcing the compiler to obey me, or forcing it to allow me to access a package private constructer from outside the package. Either that, or some sort of security overrider, somehow.

    My laptop can create and garbage collect 10,000,000 Strings per second from char[] "hello world". That creates about 200 MB of strings per second (char = 2B). Test program below.
    A char[] "tens of megabytes large" shouldn't take too large a fraction of a second to convert to a bunch of Strings. Except, say, if the computer is memory-starved and swapping to disk. What kind of times do you get? Is it at all possible that there is something else slowing things down?
    using (literally) millions of charAt()'s would be
    suicide (code-wise) for me and my program."java -server" gives me 600,000,000 charAt()'s per second (actually more, but I put in some addition to prevent Hotspot from optimizing everything away). Test program below. A million calls would be 1.7 milliseconds. Using char[n] instead of charAt(n) is faster by a factor of less than 2. Are you sure millions of charAt()'s is a huge problem?
    public class t1
        public static void main(String args[])
         char hello[] = "hello world".toCharArray();
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 1000 * 1000; m++) {
              String s1 = new String(hello);
              String s2 = new String(hello);
              String s3 = new String(hello);
              String s4 = new String(hello);
              String s5 = new String(hello);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    public class t2
        static int global;
        public static void main(String args[])
         String hello = "hello world";
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 10 * 1000 * 1000; m++) {
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    }

  • Creating interactive DVD from HTML

    I want to create interactive DVDs from html. The end product will be a website stored and browsable on the DVD using the remote control to navigate the menus. Can I do this with Encore?

    No
    Do a forum search for eDVD, since I'm not sure if the link below is current
    Sonic/Roxio eDVD
    for ADVANCED Content

  • Create web service from java code in Jdeveloper 11.1.1.5

    I am try to create web service from java code by default it is connected to Integrated web logic server and generate a
    WSDL like this.
    http://localhost:7101/javaexcel-project1-context-root/MyWebService1Soap12HttpPort.
    please tell me how we can change this local host to our needed Host and how to deploy this web service to web logic server.

    Hi,
    Just right click on your project and deploy it to your application server (Weblogic Server (Not the Integrated server)). {Before that, you have create your Application server connection in the Jdeveloper).
    After deployment open the Admin console of the weblogic server and find your ear of the project.Click on that (Go to the "Testing tab") and you will get the "WSDL" (Concreate wsdl)  and "Test Client" of the Project.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create RSS feed from HTML DB?

    I've been using a streaming RSS feed extension in Firefox for several months now and get feeds from all over including asktom.oracle.com and http://www.oracle.com/technology/products/database/htmldb/index.html. Very cool.
    Recently I've installed HTML DB and have begun creating some basic reports - nothing very dramatic as I'm just learning. Now I'd like to begin sending out RSS feeds from my HTML DB application to my RSS extension in my Firefox browser but can't find an easy way to do it.
    I see several posts of others wishing to do the opposite (read RSS feeds into their HTML DB application) but nothing that shows how to create a feed from HTML DB.
    I looked at Tom's description of his method at http://asktom.oracle.com/~sdillon/rss.html but this seems very cumbersome to me - is there an easier way?
    I would think that there should be a "create RSS" feed button somewhere in the HTML DB interface when I'm defining the page's attributes.
    Thanks in advance for any advice/suggestions.

    Actually, Tom's method is not as hard as it looks.
    You can really just copy it all into your own procedure and replace the inner query.

  • Parametre from html code

    Its my first week in applet so i was trying 2 take a parametre from the html code and then 2 take this parametre and put it as a color ex:
    <APPLET code="xxxx.class" width=200 height=200 >
    <param name ="name1" value="green"/>
    and then in the java code i need 2 set this parametre as a color ex:
    g.setColor(Color.?);
    ?= the color in the parametre name
    how can i do this ?

    The following snippet of code assumes that the permissible values
    for the applet parameter "name1" are hexadecimal RGB values.
    "0xFF0000" would be red.
    "0x00FF00" would be green.
    "0x0000FF" would be blue.
    String s;
    Color c;
    // get the applet paramter from the html file
    s = getParameter("name1");
    try
        int aR, aG, aB; // RGB-Values
        aR = Integer.valueOf(s.substring(2,4),16).intValue();
        aG = Integer.valueOf(s.substring(4,6),16).intValue();
        aB = Integer.valueOf(s.substring(6,8),16).intValue();
        c = new Color(aR, aG, aB);
    catch( Exception e )
        c = new Color(0x00, 0xFF, 0x00);
    g.setColor(c);

  • Extract article from HTML code

    Hi,
    I'm trying to build a search engine for an RSS feed. Thing is i'm trying to store every article as a BLOB field in the database. To optimize my search i'll need to extract the article only and nothing else (no unrelated hyperlinks or html code)
    I'm using the HTMLEditoKit of swing to get the html content without the code, but that's not enough. I need to clean the page of things like headers and footers (they affect the search results)

    i already parsed the XML in the RSS...i've got informa ; the problem is the article itself
    Take this article for example: [http://news.bbc.co.uk/2/hi/europe/7572635.stm] , you've got the article, but you've things all around it from link to different articles to headers, footers menus.
    All of this affects the search results dramatically so i just want the article itself.
    that's the greatest challenge.

  • Using Javascript to create concatenated string from checkbox fields to one text field

    Hi. I have a PDF form that I am trying to have output to a spreadsheet that matches my database schema. Here is the dilemna:
    * I have a set of checkboxes for available languages (LANGUAGE_ENGLISH, LANGUAGE_SPANISH, etc.) When they export to spreadsheet, the value is TRUE.
    * I need to take values from checked boxes and create a single string in a text field called LANGUAGE_DISPLAY (so my UI will not need to do the concatenation). If LANGUAGE_ENGLISH is TRUE (checked), append "English, " to LANGUAGE_DISPLAY, else append "". Then, if LANGUAGE_SPANISH is TRUE (checked), append "Spanish, " to LANGUAGE_DISPLAY, else append "". And on and on
    In the LANGUAGE_DISPLAY text field properties, I am inserting a Custom Calculation script to try to achieve this, but am not getting any results. I tried teh following even trying to pull the checkboxes default values and string them together:
    box1 = this.getField("LANGUAGE_ENGLISH").value.toSrting();
    box2 = this.getField("LANGUAGE_FARSI").value.toSrting();
    box3 = this.getField("LANGUAGE_MANDARIN").value.toSrting();
    event.value = box1 + ', ' + box2 + ', ' + box3;
    I also played with this to get the desired strings output...but to no avail:
    if ( LANGUAGE_ENGLISH.rawValue == true )
    box1.rawValue = "English, ";
    if ( LANGUAGE_FARSI.rawValue == true )
    box1.rawValue = "Farsi, ";
    if ( LANGUAGE_HEBREW.rawValue == true )
    box1.rawValue = "Hebrew, ";
    event.value = box1 + box2 + box3;
    Then I tried to simplify to see one field output so used this script...still no results:
    event.value = "";
    var f = this.getField("LANGUAGE_ENGLISH");
    if ( f.isBoxChecked() == true) {
    event.value = "English";
    Couple questions:
    1) Am I on the right track with any of these scripts?
    2) Is there something else I need to do to get the script to run before running the Create Spreadsheet with Data Files comman in Acrobat to get my csv file output? Maybe there needs to be some event to get the checkbox values read by that field in order to calculate/create the string.
    Appreciate any help you can provide.

    LiveCycle Designer has shipped with all Acrobat Professional versions since the "Professional" version was introduced with version 6.
    You do not let us know want results you get in the field or the JavaScript console.
    Using:
    box1 = this.getField("LANGUAGE_ENGLISH").value.toString();
    box2 = this.getField("LANGUAGE_FARSI").value.toString();
    box3 = this.getField("LANGUAGE_MANDARIN").value.toString();
    event.value = box1 + ', ' + box2 + ', ' + box3;
    returns "Off, Off, Off", when no box is checked and returns "Yes" for the appropriate box being checked when the default value is used for the creation of the check box. So if one would make the 'Export Value' of the box from the default value of 'Yes" to the appropriate language, one would get a more desirable result. But for each unchecked box the value would appear as "Off". So one needs to change the 'Off' value to a null string. But one is still left with the separator when there is an unchecked option.
    Using the following document level function:
    // Concatenate 3 strings with separators where needed
    function fillin(s1, s2, s3, sep) {
    Purpose: concatenate up to 3 strings with an optional separator
    inputs:
    s1: required input string text or empty string
    s2: required input string text or empty string
    s3: required input string text or empty string
    sep: optional separator sting
    returns:
    sResult concatenated string
    // variable to determine how to concatenate the strings
    var test = 0; // all strings null
    var sResult; // re slut string to return
    // force any number string to a character string for input variables
    s1 = s1.toString();
    s2 = s2.toString();
    s3 = s3.toString();
    if(sep.toString() == undefined) sep = ''; // if sep is undefined force to null
    assign a binary value for each string present
    so the computed value of the strings will indicate which strings are present
    when converted to a binary value
    if (s1 != "") test += 1; // string 1 present add binary value: 001
    if (s2 != "") test += 2; // string 2 present add binary value: 010
    if (s3 != "") test += 4; // string 3 present add binary value: 100
    /* return appropriate string combination based on
    calculated test value as a binary value
    switch (test.toString(2)) {
    case "0": // no non-empty strings passed - binary 0
    sResult = "";
    break;
    case "1": // only string 1 present - binary 1
    sResult = s1;
    break;
    case "10": // only string 2 present - binary 10
    sResult = s2;
    break;
    case "11": // string 1 and 2 present - binary 10 + 1
    sResult = s1 + sep + s2;
    break;
    case "100": // only string 3 present - binary 100
    sResult = s3;
    break;
    case "101": // string 1 and 3 - binary 100 + 001
    sResult = s1 + sep + s3;
    break;
    case "110": // string 2 and 3 - binary 100 + 010
    sResult = s2 + sep + s3;
    break;
    case "111": // all 3 strings - binary 100 + 010 + 001
    sResult = s1 + sep + s2 + sep + s3;
    break;
    default: // any missed combinations
    sResult = "";
    break;
    return sResult;
    And the following cleaned up custom calculation script:
    box1 = this.getField("LANGUAGE_ENGLISH").value;
    box2 = this.getField("LANGUAGE_FARSI").value;
    box3 = this.getField("LANGUAGE_MANDARIN").value;
    if (box1 == 'Off') box1 = '';
    if (box2 == 'Off') box2 = '';
    if (box3 == 'Off') box3 = '';
    event.value = fillin(box1, box2, box3, ', ');
    One will get the list of languages with the optional separator for 2 or more language selections.

  • Custom page breaks with "@media print" in CSS when creating a PDF from HTML?

    Searching for threads containing the text string "@media print" gave me zero hits, so I guess I'm either the smartest guy in the entire universe for coming up with this idea or the dumbest for the same reason since I must be missing something that everyone else knows by heart without even asking.
    Namely, I would like to make use of the CSS "@media print" wrapper when I'm converting an HTML file to PDF through Adobe Acrobat - as opposed to printing an HTML page through a web browser using the Adobe PDF virtual printer device. These are, as I understand it, two equivalent though not entirely identical (as they make use of and rely on somewhat different settings) procedures that both convert an HTML file into a PDF document.
    Here's my CSS code:
    @media print { span.pagebreak {page-break-before: always} }
    And here's my HTML code invoking the page break:
    <span class="pagebreak"></span>
    Bottom line, this works great when I print the HTML file through my web browser, using the Adobe PDF printer device. However, when converting the HTML file through Adobe Acrobat, this print-related setting is ignored. Obviously, printing and converting a file isn't technically identical but as I said, it's for virtually all intents and purposes the same procedure.
    I'm guessing that someone at the Adobe HQ must have thought through this issue during a brainstorming session and come up with a simple yet elegant solution to cater for the needs of those who want to use custom page breaks when converting their HTML documents directly through Adobe Acrobat. Maybe a simple setting somewhere or a custom CSS tag like "@media adobe", or something similar?

    I've never heard of anyone succeeding in this.

  • How to create dll file from c code to use in compactrio 9004 RT controller

    Hi.
    I am using Compactrio 9004 Real time controller and i am new to this. I have a C code and i want to use this with the RT controller.I red that that can be done by creating a dll file and can be called in labview.Can any body expalin how to create a DLL from the c code and be used with this RT controlelr?
    Regards,
    Vishnu

    vishnu123 wrote:
    Hi,
    Earlier in this forum itself in cRIO 900x controllers will run Pharlap and run C/C++ code compiled into .dll files.Can you please tell how to transfer the created DLL to RT controller memory throght FTP?
    Thanks and regards,
    Vishnu
    There is another KB article about this for Pharlap based controllers. And you are right the earlier CompactRIO controllers were Pharlap based. Basically for a deployed application to work, you need to put the DLL through FTP in "/ni-rt/system". If you deploy it directly from the project everything will be loaded into memory through the project environment itself including directly dependable DLLs, (but of course won't survive a power cycle).
    I hope you are aware that while Windows DLLs can work on Pharlap OS they by no means will do so always. The Pharlap OS has not a fully featured Windows API. Also you need to be careful which version of Visual C you are going to use depending on the Pharlap OS version, since the VC runtime DLLs already present on the controller will need to be the same as the ones your Visual C environment likes to link in. Recent Pharlap OS versions use the msvcr71.dll. It's very possible that those runtime libraries can't just simply be copied from a normal Windows installation but might have been recompiled by NI specifically for their controller targets.
    So to avoid problems it's a good idea to make sure your DLL uses the same runtime library DLL or make your DLL to include the static MS runtime.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-05-2008 09:51 AM
    Message Edited by rolfk on 02-05-2008 09:53 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to create XML string from BPM Business Object?

    Hello,
    I have a business object in my BPM project and I need to transform it in a XML string:
    From:
    Business Object: Customer
    Properties:          Name, Age
    To:
    "<Customer><Name>Robert</Name><Age>17</Age></Customer>"
    How can I do this?
    Thanks.

    Hello,
    I have a business object in my BPM project and I need to transform it in a XML string:
    From:
    Business Object: Customer
    Properties:          Name, Age
    To:
    "<Customer><Name>Robert</Name><Age>17</Age></Customer>"
    How can I do this?
    Thanks.

  • Creating a String from an array of characters.

    Hi,
    i'm trying to make a string from an array of characters, this i've managed:
    char data[] = new char[x];
    String str = new String(data);My problem is this: Let's say the array of characters has space for 10 chars, but i only input 5, when i convert it to a string, the 5 characters show up fine, but the last remaining characters show up as little boxes ( [] [] [] [] [] ) .
    It there a way to remove these?
    Thanks in advance
    Mike

    jverd wrote:
    georgemc wrote:
    String str = new String(data).trim();
    Does the null character count as whitespace?Seems to. Actually, I'm getting different results depending on the compiler used.
    public static void main(String[] args) {
              char[] c = new char[10];
              for(int i = 0; i < 5; i++) {
                   c[i] = (char) ('a' + i);
              String first = new String(c);
              System.err.println("[" + first  + "]");
              System.err.println(first.length());
              String second = new String(c).trim();
              System.err.println("[" + second  + "]");
              System.err.println(second.length());
         }ECJ-compiled output:
    >
    [abcde
    10
    [abcde]
    5
    >
    javac-compiled output:
    >
    [abcde]
    10
    [abcde]
    5
    >
    Odd

  • Creating Activity Diagram from existing code in 11g

    Hi,
    How can I create activity diagram for an existing application in 11.1.2.2.0 version?
    -Infy

    Do you mean you select activity diagram in wizard but you see classes (not invocations/partitions etc) on created diagram?
    If so.. it's a design, you just see activity diagram with inappropriate elemnts.
    We support to create any diagram from any elemnts but may be it's better to block diagram creation from not appliable elemnts.

  • Create accessible pdf from html pages dynamically

    Hello,
    I am trying to create a 508 compliant Pdf from a simple HTML page using the HTML to Pdf feature in Livecycle ES4 server. I was able to configure the service to generate tabbed Pdf, but the created Pdf has multiple accessibility issues.
    Some of the issues encountered are:  incorrect tab order,  some links are not tabbable while others are,  link text is being read “Blank”,  some text is skipped while tabbing,  missing alt text for images,  page being rendered in the responsive(mobile) view,  etc.
    I have tried both the available approaches, of 1) providing a URL to create the PDF, and 2) to send the html document as a zipped file, with same results.
    Attached is a sample PDF generated from a simple HTML page I created for demo.
    My questions are:
    Is it possible to generate 508 compliant (accessible) Pdf documents using Html to Pdf service from Pdf Generator? If yes, which settings might I be missing?
    Is there any other service provided by Adobe Livecycle Server that can generate 508 compliant Pdf documents from a 508 compliant HTML page?
    Your help is much appreciated.
    Thanks,
    Anup

    I created a tool that does just that (only you will need to enter the page numbers as text, it does not work by selecting them):
    Acrobat -- Extract Non-Sequential Pages: http://try67.blogspot.com/2011/04/acrobat-extract-non-sequential-pages.html

  • Create accessible pdf from html page

    Hello,
    I am trying to create a 508 compliant Pdf from a simple HTML page using the HTML to Pdf feature in Livecycle ES4 server. I was able to configure the service to generate tabbed Pdf, but the created Pdf has multiple accessibility issues.
    Some of the issues encountered are:  incorrect tab order,  some links are not tabbable while others are,  link text is being read “Blank”,  some text is skipped while tabbing,  missing alt text for images,  page being rendered in the responsive(mobile) view,  etc.
    I have tried both the available approaches, of 1) providing a URL to create the PDF, and 2) to send the html document as a zipped file, with same results.
    Attached is a sample PDF generated from a simple HTML page I created for demo.
    My questions are:
    Is it possible to generate 508 compliant (accessible) Pdf documents using Html to Pdf service from Pdf Generator? If yes, which settings might I be missing?
    Is there any other service provided by Adobe Livecycle Server that can generate 508 compliant Pdf documents from a 508 compliant HTML page?
    Your help is much appreciated.
    Thanks,
    Anup

    I don't think it's possible to do this using a standard JavaScript script in Acrobat, since the newDoc function doesn't work with URLs.
    The only option I can think of is to use an external automator that will call the Create PDF From Web Page dialog, paste the address from a file, and after the PDF file is created will continue to the next line.
    I might be able to create such a tool for you. If you're interested, contact me by email (click my username for the address) or PM.

Maybe you are looking for