How can I extract high and low parts of a string that represents a 64bits decimal number?

I want to extract the high and low parts to interpret it and convert to binary code, but such a hugh number (represented by a string) isn't easy to extract from the string directly its high and low parts.

LabVIEW can't handle a 64-bit integer. You will have to store it as two 32-bit integers. If you need exact math on those 64-bit intergers you will have to make up your own routines to handle the carries and what not. If you just need pretty good accuracy, covert both 32-bit integers to double, multiply the upper 32-bit number by 2*32 (also a double) and then add the lower 32-bit number to it.
Good luck.

Similar Messages

  • How can I get high and low value of a histogram?

    Is it possible the get the luminance value of brightest pixel and darkest pixel in an image using aescript?

    Hi,
    this is the code i used.
    The size of the sample is determined by input parameters 'numCols' and 'numRows', which is the simplest way to do it.
    Specifiying instead the radius or size of the sample would require more code to make sure that the layer is scanned entirely...
    Lots of comments, can be shortened a lot.
    Xavier.
    function getLuminanceData(layer, postEffect, time, numCols, numRows){
        // layer: layer object (inside a ae comp)
        // postEffect: if true, the layer's effect are taken into account, else ... not.
        // time : the time at which the histogram is determined  
        // numCols, numRows: integers >=1    ( how many rows and columns to determine samples size)
        //        if not specified, numCols defaults to 10
        //        if not specified, numRows defaults to Math.round(numCols*layer.height/layer.width)
        //        if the samples size turns out to be too small (<1) those numbers are redefined so that the sample size is 1 (===> V-E-R-Y  S-L-O-W)
        // returns an object:
        // numCols, numRows: the actual number of rows and columns used (the number of samples is numCols * numRows)
        // radius: the corresponding sampling radius
        // hist: Array(101). hist[L] : how many samples have luminance L (L: integer in 0-100)
        // minValue: the smallest L for which there is a sample with luminance L
        // minCoord: all samples coordinates with minimum luminance (arranged into an array - the coordinates are those of the center of the sample)
        // maxValue, maxCoord : same for max
        postEffect = !!postEffect;
        if (typeof time !== 'number' || isNaN(time)) time = layer.time;
        numCols = numCols>=1 ? Math.round(numCols) : 10;
        numRows = numRows>=1 ? Math.round(numRows) : Math.round(numCols*layer.height/layer.width) || 1;
        var
                bpc = app.project.bitsPerChannel,
                w, W = layer.width,
                h, H=layer.height,
                size_x = W/numCols,
                size_y = H/numRows,
                numSamples,
                radius,
                L, lumHist = new Array(101),
                minValue, maxValue, minCoord=[], maxCoord=[],
                color,
                exprStart, exprEnd,
                doUndoGroup;
        // check that numCols and numRows are not too big:
        if (size_x<1){size_x=1; numCols = W;};
        if (size_y<1){size_y=1; numRows = H;};
        numSamples = numCols*numRows;
        // ~ 1 second and more (for 1 image, 1 frame) is considered s-l-o-w
        //if (numSamples>=4000 && !confirm("This will be s-l-o-w. Continue ?")) return;
        // expression :
        radius = [0.5*size_x, 0.5*size_y];    // radius is half the size of the sample
        exprStart = "rgbToHsl(sampleImage(";
        exprEnd = ", "+ radius.toSource()+ ", "+postEffect.toString()+", "+time.toString()+"));";
        // initialise lumHist to an array of zeros:
        for (L=0; L<101; L++) lumHist[L] = 0; // luminance from 0 to 100
        // if the number of samples is small enough, putting the action sequence inside an undoGroup fasten things up a bit, and allows to preserve undos history
        // if the number of samples is huge, an undoGroup will actually slow things down (apparently)
        doUndoGroup = numSamples <= 1e5;
        if (doUndoGroup) app.beginUndoGroup("Get Luminance Histogram");
        // if necessary, go to 16 bpc
        if (bpc<16) app.project.bitsPerChannel = 16;
        // add a temporary color control
        color = layer.effect.addProperty("ADBE Color Control").color;    // the color property of the color control
        for (w=radius[0]; w<W; w+=size_x){
            for (h=radius[1]; h<H; h+=size_y){
                color.expression = exprStart + [w,h].toSource() + exprEnd;    // ie : rgbToHsl(sampleImage([w,h], radius, postEffect, time));
                // if (color.value[3]<0.1) continue;
                L = Math.round(100*color.value[2]);
                ++lumHist[L];
                if (minValue<0){
                    // very first sample only
                    minValue=maxValue=L;
                    minCoord = [[w,h]];
                    maxCoord = [[w,h]];
                else{
                    if (L<=minValue){
                        if (L===minValue){if (minCoord.length<1000) minCoord.push([w,h]);}    // only keep first 1000 points with smallest luminance otherwise the minCoord array can grow too big (eg red solid, 1920*1080, radius = [0.5, 0.5], ===> 2,000,000 entries..)
                        else{minValue=L; minCoord = [[w,h]];};
                    if (maxValue<=L){
                        if (maxValue===L){if (maxCoord.length<1000) maxCoord.push([w,h]);}    // same
                        else{maxValue=L; maxCoord=[[w,h]];};
        color.parentProperty.remove();
        if (bpc<16) app.project.bitsPerChannel = bpc;
        if (doUndoGroup) app.endUndoGroup();
        //if (maxValue === minValue){};
        return {numRows: numRows, numCols: numCols, radius: radius, hist: lumHist, minValue: minValue, maxValue: maxValue, minCoord: minCoord, maxCoord: maxCoord};
    $.hiresTimer;
    var luminanceData= getLuminanceData(app.project.activeItem.layer(1), false, void(0), 100);
    "Ellapsed time : "+ $.hiresTimer/1e6;

  • How can I extract pages and maintain links.

    I have a catalog index several pages long and all links to various pages in rest of catalog.
    I want to extract those pages with the links to the pages intact and insert into a modified version of same catalog. Page numbers remain exactly the same.
    When I extract the pages the link appears to be there(hand changes to finger pointer), but the action has been removed. When you click you go nowhere.
    How can I extract these pages and re-insert with links intact?

    Hi lenm,
    To extract pages, you need to use Acrobat (not Adobe Reader). As I can attest (because I do have both Reader and Acrobat installed on the same computer), it is quite easy to open files in Reader when you mean to open then in Acrobat. So, please make sure you have the right app open. (I pull this one all the time!)
    Now, if the Tools menu is missing from Acrobat, choose View > Show/Hide > Toolbar Items > Show Toolbars to make them reappear.
    Please let us know how it goes.
    Best,
    Sara

  • How can i extract using while the time from the string ?

    First time how can i extract the time as string ?
    And second how can i extract the time as DateTime.Now ?
    public static void ExtractDateTime()
    htmltoextract = new Uri("http://test.com");
    client = new WebClient();
    f = client.DownloadString(htmltoextract);
    client.Dispose();
    int index = 0;
    while (index != -1)
    int t = f.IndexOf(firstTag);
    int g = f.IndexOf(lastTag);
    a = f.Substring(t + firstTag.Length, g - t - 8);
    The string look like this: thisisateststring201309202145andthenextimeinthestringis201309202130andthelastofthisexampletimeinthisstringis201309202115
    What i need to do is first time to extract the time as string to a List<string> like this:
    index 0 201309202145
    index 1 201309202130
    index 2 201309202115
    The second time to extract the times as this time format: YYYYMMDDhhmm and also to add the times to a List.
    First time and second time i mean first example and second example. To use my code but first time to extract it as strings second example as the format of YYYYMMDDhhmm
    And i need to use the while and indexof and substring in this cases.

    Is the region always going to be "eu" or are you going to have more than one region.  Since you are reading a string DateTime from different timezone than the computer you are reading the data you have to convert to a different timezone. 
    It looks like you have at least 'is' and 'eu' for regions.  I don't know what offsets you need so try something like this.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Text.RegularExpressions;
    using System.Globalization;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string input = File.ReadAllText(@"c:\temp\test.txt");
    string pattern1 = @"imageUrls = \[[^\]]*\]";
    Regex ex1 = new Regex(pattern1, RegexOptions.Singleline);
    string pattern2 = @"region=(?'region'[^&]*)&time=(?'time'\d{12})";
    Match match1 = ex1.Match(input);
    Regex ex2 = new Regex(pattern2, RegexOptions.Singleline);
    MatchCollection matches2 = ex2.Matches(match1.Value);
    IFormatProvider provider = CultureInfo.InvariantCulture;
    List<DateTime> dateTime = new List<DateTime>();
    foreach (Match match2 in matches2)
    string region = match2.Groups["region"].Value;
    DateTime dt = DateTime.ParseExact(match2.Groups["time"].Value, "yyyyMMddHHmm", provider);
    switch (region)
    case "eu" :
    dt.AddHours(1);
    break;
    case "is":
    dt.AddHours(-1);
    break;
    dateTime.Add(dt);

  • I have a voice recording that is over 2 hours.  How can I extract it and download it to my MacBook?

    I have a voice recording that is over 2 hours.  How can I move it to my MacBook?

    Your welcome.  If you haven't seen it, the full manual is here:  iPhone User Guide (For iOS 5.1 Software).

  • How can I extract bookmarks, and their sub-bookmarks, as individual PDFs?

    I have a large (9700pg) PDF that has 15 top-level bookmarks as well as hundreds of sub-bookmarks within those 15. My goal is to have each individual bookmark as a separate PDF.
    I tried split document under Tools>Pages, but that only allows me to split into the 15 top-level bookmarks. When I open each of those 15 new files all of the children bookmarks are gone. Any ideas?

    Hello,
    Sorry to hear that you lost what you wanted to keep a track of. Did you have Firefox sync on? With that you can be able to restore your bookmarks but apart from that it's impossible to my knowledge that you'll be able to restore deleted bookmarks.

  • Changing high and low units while tangosol is running

    Hi,
         i've a 3 machine setup. on the first one i've weblogic and tangosol with local storage as false.
         on the other two i've have tangosol running with local storage enabled and i'm running a distributed service.
         initially i've kept high units as 1000 and low units as 500. i would like to provide a screen to the amdin user where by he can change the high and low unit limit.
         i'm accessing the local cache using the following code
         CacheService service = dealCacheCoarseGrained.getCacheService() ;
         Map mapReadWrite = ( ( DefaultConfigurableCacheFactory.Manager ) service.getBackingMapManager() ) .getBackingMap( bundle.getString( "DistCache" ) ) ;
         if ( mapReadWrite instanceof ReadWriteBackingMap ) {
         rdwMap = ( ReadWriteBackingMap ) mapReadWrite;
         Map mapLocal = rdwMap.getInternalCache() ;
         if ( mapLocal instanceof LocalCache ) {
         localCache = ( LocalCache ) mapLocal;
         localCache.setHighUnits( evictionDetails.getHighUnits() ) ;
         localCache.setLowUnits( evictionDetails.getLowUnits() ) ;
         but in the above case as the tangosol operating within the weblogic JVM has local storage as false,
         the condition if ( mapLocal instanceof LocalCache ) {...
         is never fulfilled and as a result
         i'm not able to bring about the changes from the GUI.
         Can i achieve my objective with this setup?
         Please help
         Thanks
         Jigs

    Hi jigs,
         I would have the GUI kick off an Invocation Task that uses the code that you have here. Then send that Invocation Task to all storage enabled nodes. You can retreive the set of storage enabled nodes from DistributedCacheService.getStorageEnabledMembers().
         Later,
         Rob Misek
         Tangosol, Inc.

  • How can I extract part of a PDF file and copy it to a new PDF file?

    How can I extract part of a PDF file and copy it to another PDF file?

    You will need Adobe Acrobat for this.

  • How can I extract certain pages from my document and save as another file?

    How can I extract certain pages from my document and save as another file?

    You would need Adobe Acrobat to do that, not Adobe Reader.

  • How can I extract a still picture from footage in iMovie, add text to it and print it ?

    How can I extract a still picture from footage in imovie, add text to it and print it ?

    Assuming you have iMovie 11 (also known as Version 9.0.4), here is how you do it. (If you have a different version, let me know. The instructions will be different).
    First, get an app called MPEG Streamclip, which is free. (google MPEG Streamclip from Squared 5)
    Open MPEG Streamclip.
    In iMovie, select the clip you need. Then, right-click/Reveal in Finder.
    Drag this clip into MPEG Streamclip
    In MPEG Streamclip, move the playhead to the frame you want.
    In MPEG Streamclip, click FILE/EXPORT FRAME.
    Choose JPEG, TIFF, or PNG and give it a name.
    You can then use this photo in Photoshop, Pixelmator, Acorn, or the app of your choice to add text.
    Here is a demo I made the other day for how to extract the still image using MPEG Streamclip.

  • What is the max. cable length that the Differential TTL signals can run in both at high and low frequencies?

    Hello,
                I want to now the max. cable length that the Differential TTL signals can run in both at high and low frequencies.

    That is very dependant on the type of cable, its construction, and inherent impedance and capacitance. This may be of use:
    http://beiied.com/PDFs2/SSI_14-15-bit-encoder_addendum.pdf
    -AK2DM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • How can i call ajax and extract the data?

    Hi all,
    I don't know briefly about ajax..i want to learn ajax, so my question is how can i call ajax and extract the data. for ex, i have JSON file
        "mobile": [
                "Name": "Micromax",
                "Model": A310
                "Name": "samsung",
                "Model": grand 2
    for above example how can i call ajax..please anyone explain with small example because it'll help me a lot.
    Thanks & Regards,
    Palsaran

    Hi Palsaran,
    As i understood, your requirement is to POST data from UI to backend.
    The above code you given is not correct if you want to use model based implementation.
    In UI5 you don't need to do an explicit Ajax call, for which we can use Models like OData, JSON etc.
    For your JSON example, you can use like,
    var oModel = new sap.ui.model.json.JSONModel();
    var oData = "YOUR JSON DATA";
    oModel.setData(oData)
    oModel.loadData(yourURL/Entityset,"POST");
    For ref, you can use the below link
    JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.json.JSONModel
    Thanks
    Naveenraj

  • How can I extract jar entry which is folder and it's contents

    Hi
    How can I extract jar entry which is folder and its contents to another folder.
    I'm pretty sure I've tried almost everything.
    Thanks in advance.
    Edited by: MuSaKa on Sep 11, 2008 3:17 AM

    like this ?

  • How can i extract a person from a picture and then animate the person

    how can i extract a person from a picture and then animate the person

    Basically you select the person using the various selection tools, copy the selection to the clipboard, and paste the selection onto the destination picture. Then use the Move tool to resize/reposition the person as necessary. Here is a tutorial demonstrating this as well as some advanced techniques.
    http://home.earthlink.net/~msand42/PSE/composite/

  • How can i extract  symbol table and Abstract syntax tree of a java compiler

    How can i extract the Abstract Syntax tree and the Symbol Table from the class file of java.I need to have the code for extracting it.
    Can anyone help me in this matter.
    Sreeram

    Everything that it is possible to retrieve from a class file can be deduced from the class file definition.
    http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html
    Sylvia.

Maybe you are looking for

  • Trouble with Data Storage VI's

    I am new to LabView Data Storage, I wrote a very basic program to write data to a data base and to read the data. for some reason I am unable to read the data. I am attaching the VI's, Please can any one tell me what I am doing wrong in the VI's. Tha

  • HT1926 I am getting error message "Microsoft.VC80.CRT,type='win32'.version='8#0#50727#4053',publicKey Token='1fc8b3b9a1e18e3b',precessorArchitect='amd64''.

    I am trying to install the latest iTunes update using Windows 7.  I have tried uninstalling the itunes program an reinstalling but I keep getting this error message "Microsoft.VC80.CRT,type='win32'.version='8#0#50727#4053',publicKey Token='1fc8b3b9a1

  • Use TIFF-Viewer (ActiveX) in ABAP-Programm

    Hy all, I am looking for a Viewer for TIFF-documents that can be used in a ABAP-Container. The Viewer should offer methods or parameters to get the zoom-area, that the user has selected, and to set the same zoom-area in the next document that will be

  • Java.lang.ClassCast Exception

    Hi: I get a java.lang.ClassCastException while trying to cast the string elements of a Vector to a String Array. import java.util.Vector; import java.lang.String; import java.io.*; public class TestVector public static void main(String[] args) Vector

  • How to covert  from .srf  form to xml form

    hi.....  plz anybody help me  to find this soloution... i am  not familiar with this enviorment how to covert  from .srf  form to xml form, it's very needed plz help me.................