Get the size of the folder as a negative value


FileConnection.availableSize () returns a long not an int.  Thus, if the returned file size is larger than the maximum size for an integer, it will give you a negative int when cast you to an int.  Try:

long folderSize = fconnForDirect.availableSize ();

Tags: BlackBerry Developers

Similar Questions

  • How can I get the max of a measurement value

    How can I get the max of a measurement value?

    http://forums.NI.com/T5/LabVIEW/how-can-I-return-the-maximum-value-from-a-voltage-sensor-over/m-p/30...

    I tried the while loop max-min-solution described in this link. But this using my myRio acceleration measurement no longer works. It seems to hang.

    I use the I2C Communication.

    The inner circle while loop is a bad construction.  It will be either executed once, if enter the Boolean value is True, or forever if the value is false.

    Put your records on the timed loop shift and eliminate inside while loop.  Then your code should work.

  • How to get the max of an element value selected iota AF Max.

    Hello community,

    Let me explain the scenario.

    We have a workbook of discoverer, who have several reports. These reports extract information from multiple views built specifically to retrieve information in several tables. So far, quite normal.

    Like any other report you can build these views, you can select the elements (columns) that you will use to create the report. Some of these elements (columns) are selected with the function MAX aggregate for this element; is that to say, instead of the profit of the item, and then click the SUM aggregation function, select the MAX aggregate function. With this option, we can get limit the number of search results.

    In our case, we have created a report that shows the items that we have in our stock, for each item, the report shows the sum of kilograms, the average price, its value (the sum of the average price x kilograms) for each element of the family, and we want the report to display for each item (remember that each element is a line in the report or folder) the largest number of transaction_id (of which there been selected using MAX aggregate function for the selected item), but a kind of transaction types.

    Let's see an example:

    Family | Product name | Sum of the kgs. | Units | Average price | Value of stock. Month | Year | Transaction ID | Type of transaction | Date of movement
    4420 | ALUMINA PS - M BB720 | 97.680,000 | KG | 44737 | 43.699,10 | 04. 10. 7740531 | Finalización Conjunto WIP | 16/12/2009
    4420 | ALUMINA PS - M BB720 | 47.760,000 | KG | 44737 | 21.366,39 | 04. 10. 8100110 | EXCESS | 31/03/2010
    4420 | ALUMINA PS - M BB720 | 97.680,000 | KG | 44737 | 43.699,10 | 04. 10. 8201603 | EXCESS | 30/04/2010

    Considerations:

    The value you see in the Transaction id is the maximum value that the field have; is that to say, each of the types of transactions, it shows the highest (last) transaction that id. looking at the example, the problem now is that we want to pocket the result a llitle little more. We want the report to show only from each product name or transaction id higher, either the date of circulation higher (as in the example above matches the transaction id 8201603 that have the highest movement 30/04/2010 - date).

    I stopped at that point because I don't see how to filter the data to get the result we want.

    Any suggestion or help would be appreciated, cause honestly, I don't see how.

    Thanks in advance.

    Luis.

    Hi Luis
    In order to get the last day of the month, given a year and month as strings, you will need to convert the strings to a date. Assuming you have a two-digit month and, presumably, a 2 digit, with the year 2000 year and more, then you need to start with a date and let's start with the first day of the month like this:

    To_date ('01' |: month: year, 'DDMMYY')

    You can use the ADD_MONTHS function to spend the month by one and then if you subtract 1 from that you will end up with the last day of the month.

    EndofMonth = ADD_MONTHS (TO_DATE ('01' |: month |: year, 'DDMMYY'), 1)-1

    You can also use the LAST_DAY function like this:

    EndofMonth = LAST_DAY (TO_DATE ('01' |: month |: year, 'DDMMYY'))

    Best wishes
    Michael

  • Get the .exe with LaunchExecutable() return value

    Hello

    I try to get the return value from an .exe file started with LaunchExecutable(). Do you think it is possible or am I wrong?

    Thank you!

    Adrien T.

    Adrien:

    If you run the CreateProcess() executable, you can then use GetExitCodeProcess() to read the results.

    See more details here: http://digital.ni.com/public.nsf/allkb/E250246D65A6A18D8625659F0065F310

    Note that you must have the Windows SDK (aka Win32 API) installed to use CreateProcess/GetExitCodeProcess.  The SDK is provided with CVI, but is not installed by default.  If you have not installed, reinstall CVI, selecting only SDK or Win32API (depending on the version of the CVI you).

  • How to get the input of a PromptDialog value?

    I went through the docs and cannot find how to get the value of the entry of a PromptDialog.  Someone at - he of the ides?

    In this doc:

    http://www.BlackBerry.com/developers/docs/airapi/1.0.0/index.html

    It seems that the text property is what you take.  Have you tried that?

  • How to get the balance of an element value

    Hello

    I have a requirement to obtain related information with balance. I am able to read the information on the element except balance.how to get the value of the particular item balance.

    for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.

    These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".

    IAM new to hrms, Please help me on how to get this balance of values

    Thank you

    Hello

    It is not very clear what you want to display in the form of balance for a given range of dates.

    It depends on how you have configured your balances and periods and balance which you are referring.

    The API allows for a given only date that matches the date earned.

    Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.

    "If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.

    Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:

    Select sum (nvl (pbv.value, 0))

    of pay_balance_values_v the VB.

    where pbv.balance_name = 'base salary.

    and pbv.database_item_suffix = '_ASG_PTD. '

    and pbv.assignment_id =

    and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')

    and to_date (' 31/03/2015 ',' dd/mm/yyyy');

    Kind regards
    Rajen

  • get the last ten weeks date value

    Hi friends,
    I have a requirement in which I need to get a list of 10 dates starting today on the same week. something similar to below but a list of all the 10 dates on the same day of the week

    Select sysdate-7 double

    output:
    2011-08-08
    2011-08-01
    2011-07-25
    2011-07-18
    2011 08-11
    2011-07-04

    and so on...

    Note: All of the above dates fall on Monday. I think I can do it using connect by clause, but need the exact syntax. I tried my best to get the result

    Please let me know.

    Ok.

    select sysdate -7*(level - 1) as dt from dual connect by level <= 11
    

    Not tested, not connected to oracle.

  • How to get the day as a numeric value without the date in shape?

    Hello
    to reduce the costs of a sql statement, I need to get the day of a date under the number (to compare to a numerical value) value without formatting. Each formatting causes a complete table of the table scan and the date field. Is there a function for this problem?

    Version of Oracle's 11g.

    Thank you Carsten

    You can use EXTRACT...

    SQL> select extract(day from sysdate) from dual;
    
    EXTRACT(DAYFROMSYSDATE)
    -----------------------
                          7
    
    SQL>
    
  • Get the names and form field values

    Hi everyone please help me

    I tried the following code, but it returns me the result as ("found no fields")

    I'm not able to reach my pdf here, I tried with a method more evenly, always it returns nothing.

    When I went through the Forum, I heard about LiveCycle Form. If my pdf is Livecycle form based so please give me the code to reterive the form fields names and values,

    method 1:

    ' / / Let's start

    Set WshShell = CreateObject ("Wscript.Shell")
    WshShell.run "c:\F4.pdf Acrobat.exe.
    While not WshShell.AppActivate ("Adobe Acrobat"): 1000 Wscript.Sleep: Wend


    ' / / Set/Get Acrobat objects
    The App value = CreateObject ("AcroExch.App")
    Set AVDoc = App.GetActiveDoc
    Set PDDoc = AVDoc.GetPDDoc
    Define the JSO = PDDoc.GetJSObject

    ' / / Search fields and extract the Name value +.
    txt = «»
    If jso.numFields then
    for i = 0 to jso.numFields-1
    FN = jso.getNthFieldName (i)
    ' msgbox (x)
    the value of f = jso.getField (fn)
    F.value = FV
    txt = txt & fn & "=" & fv & ";"
    next
    MsgBox (txt)
    on the other
    MsgBox ("no fields found")
    end if

    Set AVDOC = Nothing
    Set PDDoc = Nothing
    Define the JSO = Nothing

    Method2:

    MyFile = "C:\output.pdf".
    Set AcroExchApp = CreateObject ("AcroExch.App")
    Set AcExAVDoc = CreateObject ("AcroExch.AVDoc")
    bOK = AcExAVDoc.Open (myFile, "")
    AcExAVDoc.BringToFront

    sMsg = «»

    If (bOK) then
    Set AFormAut = CreateObject ("AFormAut.App")

    If AFormAut.Fields.Count = 0 Then
    sMsg = "No there there no field (s) to read this PDF file"
    On the other
    sMsg = "There are" & AFormAut.Fields.Count & "fields in this PDF document.
    End If


    For every FormField in AFormAut.Fields
    FieldName = FormField.Name
    FieldValue = FormField.Value
    ' MsgBox AFormAut.Fields (Fieldname). Value
    sMsg = sMsg & vbLf & "," & Fieldname & "," & AFormAut.Fields (Fieldname). Value & "," & FormField.IsTerminal
    MsgBox SMsg

    Looks like there is no form field.

    Could you please tell me, how we can attach files in this forum. While I will attach my Pdf file

    You can put the file on acrobat.com ( https://acrobat.com/ ).

  • I'm not able to use the keyboard to type negative values in the mode of developing LR6. Whenever these negative values are reset to zero. Can someone help me?

    I use LR 6/CC 2015.

    Whenever I type in a negative fashion develop it is reset to zero after entry or tab.

    I type in positive values remain and are not reset to zero.

    In older versions of Lightroom, I had no such problems.

    I have an iMac 27 with Yosemite 10.10.3.

    Hope someone knows how to fix this annoying problem.

    Your LR is configured in one language other than English?  If so, this is a known bug.  See the remark made by Simon Chen employee under this post (you need to click on see more reviews to actually see): 6 Lightroom: Bug of negative values (in German).   The comment includes a workaround solution that is to edit a text TranslatedStrings.txt.

  • Files disappeared from LR (deleted?), but has pictures of LR and hard drive. How can I get the folder HD back structure in LR?

    I can be the first person to have ever done that. I don't know what I've done yet. I have spend hours to organize my folders. I had imported them all in the horrible mess that they were (many duplicates, etc.). After obtaining their almost perfect I went to delete what I thought, it was a trash folder. I think I must have accidentally deleted my pictures folder (where they were all stored). Strange is that the catalog has all the 10,000 photos, but I have no file. Not a single one. Not even the HD Mac one. All changes have been made in LR, I know better than to go messing around with something outside of Lightroom. All changes I made to the files are on the hard drive right now. I just need to find a way to find the LR folder structure. However, it won't let me import anything. When I try to add a folder nothing is re-elected under the menu folders. I don't know what to do. Help! I've been throwing these to print photos for a Christmas gift.

    Given that I'm not a MAC person, as far as I know is that this file preference is located in a hidden directory and so you must follow the instructions in the link.

    The user library file is hidden by default on Mac OS X 10.7 and later versions. For temporary access to the file library user, press Option and select go > library in the Finder.

    If you don't want to delete the preferences file, you can rename it instead, and Lightroom will create a new file, preferably when you launch Lightroom.

  • Get the text of a button values

    Hi all

    I was wondering if there is a way, if a button is pressed, to capture the text of the button that has been pressed in the method fieldChanged at all?

    If your class does not extend ButtonField, of course then try to cast ButtonField throws a ClassCastException at you.

    If you use the code from this link, you must provide a method to make the code expose the text attribute, then call that instead.

  • Want to get the records of only numeric values

    I have tables sales_order, with column ATTRIBUTE_8 VARCHAR2 (50) and job_order with column NUMBER HIGH_AMOUNT.

    attribute_8 column of the sales_order table has both numerical values & character values.  For example:-32232.3764, 234283.878, YES, NOT... etc.

    I intend to load data of tabe sales_order to job_order. For all non-numeric values of ATTRIBUTE_8, I want to do as a 0.

    Please indicate an INSERT statement to achieve this.

    create or replace function clean_number(p_string in varchar2) return number is
    begin
      return to_number(p_string);
    exception when value_error then
      return 0;
    end clean_number;
    /
    with input(ATTRIBUTE_8) as (
      select '-32232.3764' from dual union all
      select '234283.878' from dual union all
      select 'YES' from dual union all
      select 'NO' from dual union all
      select '1e4' from dual
    )
    select attribute_8, clean_number(attribute_8) high_amount from input;
    
    ATTRIBUTE_8 HIGH_AMOUNT
    -32232.3764 -32232.3764
    234283.878 234283.878
    YES 0
    NO. 0
    1E4 10000
  • How to get the decimal part of a value of integer

    Hi all

    I have a task to round up the price of the price_value column table up to 2 decimal values.

    create table price_value (award number (20.4));

    insert into price_value values (5);

    insert into price_value values (55);

    insert into price_value values (55.5);

    insert into price_value values (55.12);

    insert into price_value values (55.456);

    Select * from price_value;

    Expected results

    5.00

    55.00

    55.50

    55.12

    55,45

    Please help me how to do this.

    Thank you

    Select to_char (trunc(price,2), 'fm9999999999999999D00') price

    of price_value

    /

    PRICE
    ----------
    5.00
    55.00
    55.50
    55.12
    55,45

    SQL >

    SY.

  • Get the display of selection list value

    Hello

    I use Apex 4.1 and I have a selection list in my page. I know that I can access the value of the element selected by: P1_SelectList, but I would like to know how to access the display value for the selected item.

    Thanks in advance,
    DS

    Hello

    I don't know what are your exact needs. I mean why you need display the selected value?

    If you want to access the List select using JS, then the element should be available on the page. If it is already display the value to display for the user.

    That's what I wanted, but I am trying to add this script in page 0, I want it, it is available in all applications except page 1 where the select control is there and the "Execute when loading the page" you mentioned article is not available in page 0. Any idea?

    Create a dynamic action which will trigger the Page load and who will do the following JS code.

    $("div#select-val").html($("#P1_SELECTLIST option:selected").text());
    

    Also create the region HTML DIV on the page 0. And again, the P1_SELECTLIST element must be accessible to all pages, so you can create this article in page 0 as well?

    Kind regards
    Hari

Maybe you are looking for