How to find the size of the text string...

Hi friends,

How to find the size of the text, in KB or in bytes or MB, I have a text box control, when I type a text in do I find the size of the text that is entered control.please of entry help very urgent...

Thnaks

Balu-

Hi David,

Nice Solution, but I think that it will not give the exact size of the string for a particular case where the string contains UTF string as a single letter format can exceed more than 1 byte.

So I think it should be modified as:

private function getTextSize(value:String): String

{

var div_by:int = 100;

var sze_is:String = 'KB ';

var len_is:int = getUTFLength (value); now the length is actually measured, regardless of the format of the text

If (len_is > 1000000)

{

div_by = 100000;

sze_is = 'mb ';

}

Return(string(math.round(len_is/div_by)/10)+sze_is);

}

private void getUTFLength(value:String):int
{
var byteArray:ByteArray = new ByteArray();
byteArray.writeUTFBytes (value);
Return CharArray.Length;
}

Concerning

-Vikash

Tags: Flex

Similar Questions

  • How to find the absolute position of the end of the text, it can be one or more,

    How to find the absolute position of the end of the text, it can be one or more,

    in the position I need to inseart the image of the size of the font that it friendly ordinary view sequiential - image as custom image

    Please help us find the position of the text, and even for a function more, I demanded the conclusion the text length

    I want to do we will be right and the other will be left how I can I align is their way to find the width of the label or text?

    Thank you

    This should help align your labels layouts, depending on what you did you do could go with absolute layout, docking station or stack (allows you to align the top to bottom or left to right)

    I'm not too sure that everything, however, to determine the length of the text, I would think that you could store the text in a string and then somehow programmatically count each letter & do return a result... not exactly on how to do it but it's an idea

  • How to find the size of the virtual server?

    Hello

    We intend to pass our applications 4 virtual servers has 2 physical servers. In this process, we need to identify the size of the current virtual servers to use as a starting point to configure or add the size in physical server. can anyone provide information on whats stats to be noticed and how to find the size of the current virtual servers?

    Thank you

    Hi Sekhar, there.

    in general, it is a fairly complex task if you want to size the new platform correctly, i.e. not to oversize it and have very low use below, i.e. spend too much on equipment.

    In fact, it's the first thing to consider the level of use of the new platform. Most likely your organization (HW and infrastructure) has targets to a minimum. optimal and maximum usage levels.

    In the case where you do not have this as a starting point, and then you continue with load average and the current peak (CPU, RAM, NW). To these basic lines, you can use the statistics of WLS Admin Console, where the use of CPU and memory statistics are presented since the server was last started. For more detailed statistics, you can use WLDF to capture measures key at regular intervals, and then base your analysis of these data.

    Finally and above all, the size of FS, but I've seen some comments above related to the size of the FS.

    HTH,

    A.

  • How to find the size of the table?

    Hi all

    Can anyone suggest how to find the size of the table? I had a few (15272 selected lines) on the name of "CMPT_" How can I check only 'CMPT_' size tables?





    Please someone help give the SQL query to run.


    Thanks in advance.


    Vincent

    madala03 wrote:

    Hi thanks for the reply

    I'm out like below

    SUM(BYTES/1024/1024)

    --------------------

    25383.25

    But how to check all the name of tables CMPT and their sizes?

    Select nom_segment, dba_Segments sum(bytes/1024/1024) where nom_segment like ' % CMPT GROUP BY nom_segment;

  • How to find the size of the semantic model

    Hi all

    Please can you tell me how to find the size of the semantic model.

    Thank you
    INDU

    Hi Indu,

    A couple of several things:

    1 we still need an application, in order to account for the storage of the Table in the Application

    This query gives you the name of application table

    Select the table table_name from mdsys.sem_model$
    where model_name = '';

    This will give you the size in MB

    Select semmodel.table_name, dbaseg.bytes/1024/1024 MB
    of mdsys.sem_model$ semmodel, dba_segments dbaseg
    where semmodel.table_name = dbaseg.segment_name
    and semmodel.model_name = '';

    2. If the model is the only one of the semantic network, you can get the space used by the table of $ RDF_VALUE using this query

    Select bytes/1024/1024 MB dba_segments where nom_segment = '$RDF_VALUE ';

    If there are several models, this space is shared between all of them.

    Kind regards!
    Jorge

  • How to find the size of the partitioned tables?

    How to find the size of the partitioned tables?

    Select nom_segment, sum (bytes) /(1024*1024) 'Size in MB' from dba_segments
    where owner = 'owner name' and segment_type like '% PARTITION % '.
    Group by nom_segment;

  • How to find the size of the downloaded image on a column of type blob in a table?

    How to find the size of the downloaded image on a column of type blob in a table?

    Vidya,

    You can use the built in function dbms_lob.getlength to get the length (size) of a LOB column or a bfile type.
    Check out this link.

    http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a96612/d_lob2.htm#1008995

  • How to find the size of the scheme with or without fragmentation

    Hello Sir,
    How to find the size of the scheme with or without fragmentation?

    to find all of the bytes used by a schema, you can add the bytes for the owner of the dba_segments views.

    for fragmentation, I guess you want to know about the space left between the segments.

    finding depends on the design and standards of your database.

    Each scheme has its own storage space? If Yes, then you can take the total space used in storage and then subtract the number of the dba_segments.

  • How to make the text bigger in youtube! Cubs in youtube!

    I made the largest text where google search arrives! But when I go on youtube the text is much tinier and I 65 to cataract and I can't read the text at right! How to make the text bigger in youtube? Thank you very much! I tried everything, but nothing changes the size!

    When you view this page hit {Ctrl + 0} < is a zero number -to reset the zoom level for this area.

    https://support.Mozilla.com/en-us/KB/page+zoom

    If you move the scroll wheel, and are now the CTRL key, you can change the zoom level of the page that is viewed - both in & out.

  • How to find the number of data items in a file written with the ArryToFile function?

    I wrote a table of number in 2 groups of columns in a file using LabWindows/CVI ArrayToFile... Now, if I want to read the file with the FileToArray function so how do I know the number of items in the file. during the time of writing, I know how many elements array to write. But assume that I want the file to be read at a later time, then how to find the number of items in the file, so that I can read the exact number and present it. Thank you all

    Hello

    I start with the second question:

    bytes_read = ReadLine (file_handle, line_buffer, maximum_bytes);

    the second argument is the buffer to store the characters read, so it's an array of characters; It must be large enough to hold maximum_bytes the value NULL, if char [maximum_butes + 1]

    So, obviously the number of lines in your text tiles can be determined in a loop:

    Open the file

    lines = 0;

    While (ReadLine () > 0)

    {

    lines ++;

    }

    Close the file

  • HP Elitebook 8740w: How can remove the text / name of the company that is displayed during the boot process?

    Hello

    I bought my work laptop from my employer. During the startup of my employer's legal name is still displayed on the splash screen ' "(the screen with the HP logo).

    -J' already started back and ran the EREPLOGO. EXE utility to remove the logo (ereplogo.exe/e). The utility said that the logo has been removed;

    -in the BIOS 'view custom logo' is unchecked, so it will not use an image of the partition tools hp;

    However, during the startup the company name is still displayed on the top of the screen... :-(

    (1) how can I change this text to start or remove it completely?

    (2) what can I do to display the specifications of hardware during startup instead of this "splash screen"?

    Thanks in advance,

    SJW

    PS I have the latest BIOS (F.60 Rev.A, November 30, 2015)

    Hello

    I managed to change the line of text with the BiosConfigUtility64.exe.

    With "BiosConfigUtility64 getconfig:config.txt", you can write all the values in the bios and a text file with "BiosConfigUtility64 setconfig.config.txt", you can set all the values after you change the values you want to change. In my case, that I had to change the value of "property tag", which is the value that appears in the home screen during the boot process.

    Later, I discovered the tag 'property' can also be changed under the Security tab of the configuration of the BIOS (F10) normal... until I knew what the property tag, I associate the line of text to security so I did find the text before :-) field

    Best regards

    SJW

  • How to translate the text of 'log out' (Apex 5.0)

    Hello

    Wanted for the last few hours how to translate "correctly" the text "logout" in the new universal theme.   (Look like this in html: span class = "t-button-label" Log Out/Span)

    Also a few trivial questions.   Is it possible to directly change a page navigation?  4.2.6 and slot, you simply found the wire of Ariane/nav entries/lists on the right-hand side, double clicked on it and you could change it.   Now, I have to browse the shared components and find it there.   Been using this great product for HtmlDB, still getting used to the new interface, just work out a few kinks.

    Thank you

    Oli

    Hi Oli,

    Cannot find the text hardcoded 'Log Out' in the universal theme. This text should normally be part of the Navigation bar. Can take you a look at->-> list of Navigation bar Navigation, shared components / Navigation bar classic if you see this text. Otherwise, please download your application at apex.oracle.com and I can take a look.

    Is it possible to directly change a page navigation?

    No page designer. The reasoning was that the Navigation bar is very static and not changed on a daily basis and it is not related to a particular page. That's why we wanted to remove the Page Designer to remove the complexity of the display of the amount of data.

    Concerning

    Patrick

    Member of the APEX development team

  • How to find the last pasted paragraphs FMP?

    I'm sticking FMP several objects at once in a file (a file of changes to the sections containing the changebars) in the main text flow. I want a separator line to go at the end of each pasted section, so I try to insert one after the paste operation. But instead of a line between each section, all lines are added at the end of the file, after all the sections. So if there are 3 glued sections at the end of the file are three lines. My code is below, do you know how I could fix this?

    Thank you, Mark

    function copyPasteChanges (doc, chgRange) {}

    Select the section with changebar and copy it.

    doc. TextSelection = chgRange;

    doc. Copy();

    Prepare for the changes doc and paste there the modified section.

    var firstChgPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;

    var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);

    var changesTRange = new TextRange (changesTloc, changesTloc);

    changesDoc.TextSelection = changesTRange;

    changesDoc.Paste ();

    To go at the end of the file again (I think)

    var lastPgf = changesDoc.MainFlowInDoc.FirstTextFrameInFlow.LastPgf;

    var dividerPgf = changesDoc.NewSeriesPgf (lastPgf);

    var TLoc = new TextLoc (dividerPgf, 0);

    changesDoc.AddText (TLoc, '_');

    }

    Hi Mark,

    The problem is that the dough does not occur when you think. The dividing line is added at the end of the file, but are not your actions of dough. Actually, I think that maybe a little random where pasta is produced, because this line:

    var changesTloc = new TextLoc (firstChgPgf, Constants.FV_OBJ_END_OFFSET);

    .. .is does not create a valid text location. You can check this by abandoning the service after:

    changesDoc.TextSelection = changesTRange;

    .. and look at where's the insertion point. It will probably be everywhere where you left it last, because the call is not valid. I can't tell you exactly why, except that it has something to do with the fact that you are using the last paragraph in the stream. There is something weird to try to define a range of full-paragraph text with the last paragraph. I'm sure it's related to how the last TFP in a stream does not show a mark of FMP, but beyond that, I don't know how to do what you're trying to do with the last paragraph.

    Having no knowledge of how do it right, any time I need to do this, I create a paragraph "dummy" at the end of the flow to fill that space strange 'last FMP", then do the work around it. In the end, I just want to remove fake TFP. I don't know if it's a good idea or not, but it's the only way I ever get it to work and it sorts the mirror how you could do this manually in the GUI.

    With this, I modified your script as follows, and it seems to work better. Note that I also modified the logic of how to find the last paragraph of the flow by writing a separate function. Your call to the 'FirstTextFrameInFlow' is OK, unless your doc begins to span several pages and/or begins with several empty pages. The function I wrote ensures that you really the last TFP in the stream.

    I hope this helps.

    Russ

    function copyPasteChanges (doc, chgRange) {}

    Select the section with changebar and copy it.

    doc. TextSelection = chgRange;

    doc. Copy();

    Prepare for the changes doc and paste there the modified section.

    var lastPgf = getLastPgf (changesDoc);

    var dummyPgf = changesDoc.NewSeriesPgf (lastPgf);

    var changesTloc = new TextLoc (dummyPgf, 0);

    var changesTRange = new TextRange (changesTloc, changesTloc);

    changesDoc.TextSelection = changesTRange;

    changesDoc.Paste ();

    To go at the end of the file again (I think)

    Don't forget that last TFP is now fake TFP

    lastPgf = getLastPgf (changesDoc);

    var dividerPgf = changesDoc.NewSeriesPgf (lastPgf.PrevPgfInFlow);

    var TLoc = new TextLoc (dividerPgf, 0);

    changesDoc.AddText (TLoc, '_');

    dummyPgf.Delete ();

    }

    function getLastPgf (doc)

    {

    textFrame var is doc. MainFlowInDoc.LastTextFrameInFlow;

    var lastPgf = textFrame.LastPgf;

    While (! lastPgf.ObjectValid () & textFrame.ObjectValid ())

    {

    textFrame = textFrame.PrevTextFrameInFlow;

    lastPgf = textFrame.LastPgf;

    }

    Return lastPgf;

    }

  • How to find the ADDRESS, HASH_VALUE of V$ SQLAREA for a request to purge?

    I read on how to use the INVALIDHTOMEH package to remove an application from the shared pool.

    I'm looking at the example on this page:

    https://blogs.Oracle.com/Mandalika/entry/oracle_rdbms_flushing_a_single

    He gives an example of:

    SQL > select ADDRESS, HASH_VALUE of V$ SQLAREA where SQL_ID like '7yc % ';

    ADDRESS HASH_VALUE
    ---------------- ----------
    000000085FD77CF0 808321886

    My question how they find the SQL_ID of the query they are wanting to be served before this step?


    Thanks in advance,

    Cayenne

    >
    How did find the SQL_ID of the query they are wanting to be served before this step?
    >
    They probably got from V$ SQL

    select sql_id, plan_hash_value, exact_matching_signature, sql_plan_baseline from v$sql
    where sql_text = '. . put your query here . . .'; 
    

    Make a request like this or use WHERE SQL_TEXT LIKE if you know a part of the text of the query. Then use the SQL_ID.

  • How to find the delimiters

    Hello Oracle experts

    I am trying to find number of separators to a text string. But I could find only for the first record. Can you if it doesn't matter who you please let me know how to find the record2.

    I use

    Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options

    Thank you



    with t as
    (select 3999 ^ 0077774 ^ Institution ^ Mountwest ^ 1 ^ Lilly ^ Maria ^ [email protected] ^ 555-555-5555 ^ 2 ^ Lilly ^ Maria ^ [email protected] ^ 999-999-9999 ^ 3 ^ Lilly ^ Maria ^ [email protected] ^ 777-888-1234 ^ 1 yyyy xxxxxx Drxxx ^ ^ xxxxxxx ^ AA ^ 99999 ^ MRO ^ U.S. ^ ^ ^ I do not know ^ 2 years ^ Public ^ applicable ^ Urban ^ 1, 000-4, 999 ^ N ^ Conference ^ N ^ 14/04/2009 10:52:51 ^ 24/08/2010 09:26:46 ^ Active ^ ^ I ^ ^' string1 from all the double union)
    Select ' ^ ^ ^' double string1
    )
    Length (STRING1) - length (replace(STRING1,'^','')) SELECT delim_number from T

    Try:

    SELECT  length(STRING1)-NVL(length(replace(STRING1,'^','')),0) delim_number from T
    

Maybe you are looking for

  • UK tv Guide add does not appear on the right side of the taskbar

    In the past I successfully installed UK TV Guide to the taskbar and no problems with it. But it has recently disappeared from the taskbar. When I tried to reinstall the installation seems to be satisfactory, but the icon does not appear on the taskba

  • How to use the external drive recovery with ODD?

    Hello I need to recover my Toshiba laptop via original Toshiba recovery dvd, but my internal dvd ram does not work, then, how I upgraded my pc to search for external dvd ram when windows starts? I followed the instructions and the C button when start

  • Qosmio X 500-148 - large file copy stucks

    Copying large files (about 5-10 GB) between USB or Firewire drive stucks the PC. It goes up to 50% then slows down and there is no possibility to do anything, including cancel them the task or open the browser or a Manager task or WIn Explorer.The ev

  • Question of interface Vector Xl xlLinsetSlave()

    Hi, I am developing a flash flash file for vector xl driver hex tool. I wrote ahardware configuration for vector file driver xl using the interfaces provided by the vector. my setup is very much like in the example provided by the vector. but when I

  • stepupgrade windows vista business Japanese version for windows vista Ultimate edition

    Recently, I bought a laptop in the Japan. The operating system is Windows Vista Business Japanese Version. I'm not familiar with the Japanese language and because of that I wanted to change it to English. I had discovered to find the way to put in pl