Initializing arrays with non-default values

Hi,
I have a large array (300+ elements) and want it to be filled with all -1 at the start and not with 0.
A couple of (bad) ideas of mine:
- using an expression "array[0] = -1, array[1] = -1, ..." (a lot of typing work)
- using a for loop with an expression "array[Locals.k] = -1" (very slow)
- getting the array from "somewhere else" like e.g. a LabVIEW VI (cumbersome)
Is there some expression syntax I can use?

You can use SetElements(Locals.d,-1)  where d is the array.

Similar Messages

  • Non cumulative with non cumulative value change

    hi,
    can any one tell the concept of non cumulative with non cumulative value change with an example with numbers,i am bit confused .
    like we have for non *** inflow and outflow- stocks inflow and outflow so non *** is based on inflow and inflow.
    in the same way any example for above concept

    Hi Venkat,
    If I under stand your question correctly you wish to have an example of where non cumulative values are used and you have given the value of stock? If so here is an example with figures
    So you would do an initial load loading the opening balances of Stock.
    Say material number 12345 = 100 units
    After that, only movements will be posted so Stock will either increase or decrease depending on what image is posted via the change log.
    So there will be a purchase of material 12345 for 50 units so now the balance of material is 150.
    But then you could use or sell 70 units of material 12345 so you stock value would be 80 units
    I hope this makes sense and this is an example that you are after if not please let me know and I'm happy to help
    Regards
    Ben
    PS assign points if useful

  • XML FORM  -  How to save read-only controls with a default value

    Hello everybody,
    I have a 3 xml forms, each one to create one type of news. I need to use 3 because each of this forms has their own controls. But the control which indicates the type of news (asociated with a KM Predefined Property) must be common in the 3 forms, in order to use it on searches.
    The question is, how can I include in this forms a control:
      - Visible for the user
      - With a default value defined in the control properties (each form has a different value, corresponding with the type of news)
      - Read-only mode
      - The value showed in the control must be saved in the associated KM Predefined Property when the user clicks the Save button. 
    Anyone knows how to do this?
    What control can I use?
    I was thinking of trying with text boxes, but I don't find the way to make them unwritable (Read only mode).
    It is posible using labels?
    Thanks.
    Kind regards

    Hello Jose,
    I know you responded with a question... I see it in the email, but I don't see it here!  Very odd... but in response:
    The first thing I do when I open the Edit.xsl file is do a 'find' for the name of the text field that I want to be read-only (in my test case, it's 'location').  Repeat the find until you see something like:
    [code]<!--
    field location
    -->[/code]
    Below there is where I put the new code.  Mine looks like this:
    [code]- <xsl:choose>
    - <xsl:when test="location='' and ($editmode='create')">
    - <xsl:choose>
    - <xsl:when test="./xf:ValidationError/@tagname='location'">
    - <input name="location" size="30" type="text" class="urEdfiTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="tabindex">
    - <xsl:choose>
      <xsl:when test="$accessibilitymode='true'">21</xsl:when>
      <xsl:otherwise>3792</xsl:otherwise>
      </xsl:choose>
      </xsl:attribute>
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:when>
    - <xsl:otherwise>
    - <input name="location" size="30" type="text" tabindex="3792" class="urEdfTxtEnbl" id="field_1157467268006">
    - <xsl:attribute name="value">
      <xsl:value-of select="''" />
      </xsl:attribute>
    - <xsl:attribute name="readonly">true</xsl:attribute>
      </input>
      </xsl:otherwise>
      </xsl:choose>[/code]
    I put the <xsl:attribute name="readonly"> in both places (when test, and when not test).  I'm not entirely sure if that's necessary, but that worked for me.
    Hope this helps,
    Fallon

  • Configuring IPIB with non-default partition key

    Hello
    I want to put IB HCA port into non-default partition to create separate network on my IB fabric. On IB switch (Voltaire ISR9096) I created network with non-default partition key 0x7ffe and add HCA port to this partition.
    But this IB-VPPA was displayed as unconfigured on Solaris host
    ib::3BA0001004181,ffff,ipib    IB-VPPA      connected    configured   ok
    ib::3BA0001004182,fffe,ipib    IB-VPPA      connected    unconfigured unknown
    ib::3BA0001004182,ffff,ipib    IB-VPPA      connected    configured   okConfiguration of new VPPA with cfgadm was unsuccessful:
    # cfgadm -c configure ib::3BA0001004182,fffe,ipib
    Configure the device: /devices/ib:fabric::3BA0001004182,fffe,ipib
    This operation will suspend activity on the IB device
    Continue (yes/no)? yes
    cfgadm: Hardware specific failure: configure operation failed ap_id: /devices/ib:fabric::3BA0001004182,fffe,ipibI unconfigured VPPA with default partition key (0xffff) on HCA port 0x3BA0001004182 and issued cfgadm for VPPA with pkey 0xfffe again - the same effect.
    I tried this on Solaris 10 8/07 and OpenSolaris b72 with the same result - no success ;)
    Is it possible to configure VPPA with non-default pkey on Solaris ?
    Is it possible to configure more than 1 IPIB VPPA on single HCA port ?
    How to perform these configurations ?
    Thanks in advance.
    Regards,
    Denis

    hi
    I was able to setup the listener to serve both databases using netmgr, thanks. Apparently I was trying to use the wrong tool for this previously.
    Now i'm able to access the EM Database Control and it seems to be working fine though i get the following error message
    Logged in As SYS
    Error
    java.lang.Exception: Number of responses does not match queries
    Database Instance: devel.foo.bar
    Now, i'd like to be able to use EM for administering two separate databases (running on the same host). Do i need to migrate the database control somehow to grid control? How do i do that?
    What about security? I'd like to use SSL and limit connections to selected clients only.
    regards,
    aspa

  • How do I change iCalendar alerts to a non-default value, ie, send an email 2 days before event.

    How do I change iCalendar alerts to a non-default value, ie, send an email 2 days before event?

    cjphoto1 wrote:
    How do I change iCalendar alerts to a non-default value, ie, send an email 2 days before event?
    Open the Calendar app, open the event, tap Edit and change the Alert times.
    If you want to change the default time, Settings > Mail, Contacts, Calendars, scroll down to Calendars - Default Alert Times.

  • Generate configuration file with non-default binding configuration in WCF 4.5

    Hi,
    I am using WCF 4.5 for generating configuration file.
    I have referred following MSDN link for generating configuration file.
    https://msdn.microsoft.com/en-us/library/hh309266(v=vs.110).aspx
    I want binding property for e.g 'maxReceivedMessageSize'  in configuration file.
    I changed default value of 'maxReceivedMessageSize' to non-default value, but i could not able to saw 'maxReceivedMessageSize' binding property in configuration file.
    Is anyone know why i am not able to see non-default value in configuration file.
    Thanks.

    Hi Amy,
    Thanks for reply. Please see below content of configuration file.
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <system.serviceModel>
            <bindings>
                <netTcpBinding>
                    <binding name="TestCustBind_CustomerService" />
                </netTcpBinding>
            </bindings>
            <client>
                <endpoint address="net.tcp://ABC/CustTest"
                    binding="netTcpBinding" bindingConfiguration="TestCustBind_CustomerService"
                    contract="CustomerService" name="TestCustBind_CustomerService">
                    <identity>
                        <userPrincipalName value="[email protected]" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>
    </configuration>
    Thanks.

  • Multi-dimensional arrays with non-specified dimension

    Hi all,
    I'm trying to write a method to create a multi-dimensional array of
    Integer, based on another one, taken as parameter. I would like the
    method to work for an array of a non-specified dimension, that is,
    it could take as parameter a Integer[], or a Integer[][], or a
    Integer[][][] and so on.
    The idea is to have as a result an array with the original elements
    doubled.
    Here is my recursive function:
        public static Object[] f(Object[] a) {
             // the array to be returned is created with the
             // same size as the original
            Object[] r = new Object[a.length];
            for (int i=0; i<a.length; i++) {
                Object elem = a;
    Object newElem = null;
    if (elem instanceof Object[]) {
    // Recursive case
    newElem = f((Object[]) elem);
    } else if (elem instanceof Integer) {
    // Base case
    newElem = new Integer(((Integer)elem).intValue() * 2);
    r[i] = newElem;
    return r;
    This method returns an array with the same structure (that is, same
    dimensions) of the array taken in the constructor. In the recursive
    case, it just calls the function to the inner arrays. In the base
    case, where I have an Integer, it creates a new Integer, whose
    value is the old multiplied by 2.
    Then I initialize an array:
        public static void main(String args[]) throws Exception {
            Integer[][] a = new Integer[][] {
                new Integer[] {
                    new Integer(0), new Integer(2)
                new Integer[] {
                    new Integer(1), new Integer(4), new Integer(3)
      // And try to call the function like this:
            Integer [][] b = (Integer [][]) f(a);
        }   And I get a java.lang.ClassCastException: [Ljava.lang.Object;
    I don't understand the reason of this exception, because the
    object returned is a Integer[][]. Isn't it?
    And since I don't have a compiler error in the cast, that means
    that Object[] and Integer[][] are not inconvertible. Right?
    Could anyone explain me why this is wrong and/or give me some
    ideas to do what I'm trying to do?
    Thanks a lot,
    Angela

    I retract my previous statement about using
    reflection. Use "Object[] r =(Object[])a.clone()"
    to create a new array of the same type.You don't need temporary array variable here.
    You could simply use argument a instead of r.
    (But this my gotcha is derived from your clever rep.)Well, this isn't a temporary variable, its the return variable, which is different. If you don't want the original matrix changed, you have to clone the argument.

  • Apex_item select list to be displayed with multiple default values

    I am using APEX 4.2.
    For one of our requirements , we are displaying a report which uses "apex_item.select_list_from_query" multiselect field.
    The above function accepts a parameter, 'p_value' using which we can specify the default value to be highlighted.
    Is there any way to highlight multiple values on the select list by default, when the page is loaded, based on a sql output.
    Sample Scenario:
    Say colour is a multiselect field. Full list of values available : R, B, G, Y, O
    On day1, for record1 i am choosing R and B. which I am saving in the backend when the page is submitted.
    On day2 : I login again to see the report. When the report is loaded, I should see the values 'R' and 'B' highlighted or in a different font format , differentiated from the rest.
    Thanks in advance for your replies.
    Regards,
    Raasi
    Edited by: 878815 on Mar 11, 2013 10:23 PM

    878815 wrote:
    I am using apex_item.select_list_from query. and then a piece of javascript to concatenate as a colon delimited string. This is the function I am using in the report sql,
    apex_item.hidden(20,null)||apex_item.select_list_from_query(6,null,'<sql>','multiple size = "6" onChange="Multi(this)"','NO' ) as col_1I think 'multiple size' is a custom attribute and APEX have no clue about it.
    javascript code:
    function Multi(p_this)
    var l_selected=html_SelectValue(p_this);
    if (l_selected.constructor == Array) l_selected=l_selected.join(':');
    p_this.parentNode.firstChild.value = l_selected;
    return l_selected;
    };What is this apex_item.hidden used for.. placeholder?
    May be populate the hidden item with default value as colon delimited string and on page load use some JavaScript to read that string and set/highlight the select list.
    It would be easy if you can replicate the issue on apex.oracle.com

  • Field with a default value from another field

    I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
    Topic
    Acrobat 5 - field with default value of another field
    Ben PF - 03:31am Mar 23, 2007 Pacific
    How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
    I've tried, but I just can't figure it out!
    Any help much appreciated.
    Ben
    | Back to Topic List | Bookmark | Subscribe
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages
    2 messages. Displaying 1 through 2.
    First Previous Next Last Show All Messages
    Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
    This, or some variation of this, should work:
    if(this.getField("date2").value == ""{
    this.getField("date2").value = this.getField("date1).value;
    | Bookmark back to top
    Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
    Thanks very much.
    I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
    Thanks for your help.
    Ben

    Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
    Put this:
    this.getField("myField2").value = event.target.value;
    Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
    I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

  • Field in the selection screen as a select option with two default values

    Hi All,
    can anybody tell me how to put field in the selection screen with two defaul values.
    for ex:  selection screen the Account Group KNA1-KTOKD as a select option. The defeault value should be Y001 and Y005.
    please reply ASAP. Its urgent.
    Thanks in advance,
    Madhu

    Hi Madhu,
    Since Select options are nothing but ranges, you can use the following code to add two distinct values to the select options by default.
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'EQ'.
    s_ktokd-low = 'Y001'.
    append s_ktokd.
    s_ktokd-low = 'Y005'.
    append s_ktokd.
    clear s_ktokd.
    However, if you want to mention a range like all the values between these given two values to be considered then u may use,
    select-options : s_ktokd for KNA1-KTOKD default 'Y001' to 'Y005'.
    or
    s_ktokd-sign = 'I'.
    s_ktokd-option = 'BT'.
    s_ktokd-low = 'Y001'.
    s_ktokd-high = 'Y005'.
    append s_ktokd.
    Reward if helpful.

  • Enumerators with Non-Contiguous Values?

    I have seen enumerators in labview that have non contiguous values, but i cannot figure out how to create them myself. Usually they are associated with calls to external .net or .dll libraries.
    In this case the return values of a function I am calling are enumerated in hexedecimal, and are basically 1 value per bit. Is it possible to create such an enum? Of course I can handle the result as an int, but this is not as readable.
    Thanks in advance

    You can display it as a ring control... To the user, it would be transparent (and that is what you probably saw).  Otherwise you will have to bit twiddle to get contiguous values for the enum.
    Message Edited by Stradis on 07-09-2007 02:35 PM
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Prompts with dynamic default values

    I have a request from my client to modify several reports so that two date prompts will have default values populated with the first and last day of the previous month.  All of the reports are currently using custom sql so I have to be able get the dynamic default value in the extended @prompt syntax.  However, I am not able to use any of the sql functions since the functions merely appear as plain text as the default value itself. 
    I have found a few work arounds to achieve the functionality of the dynamic prompts, but I cannot get the actual default value displayed to the user to be dynamic.  Is it possible to achieve this by using only the custom sql?

    Hi Sandeep ,
    Below blog may answer your query .
    Dave&amp;#8217;s Adventures in Business Intelligence &amp;raquo; Dynamic Dates Part III: Monthly Date Ranges
    Search for And for Last Month?

  • Newsletter email campaign - Mailling list with non "default" email address

    Hi all.
    We need to implement a newsletter email campaign but, with standard campaign execution, SAP CRM gets the "default" email addressess of BPs.
    We have a malling list of newsletter that contains a list of emails of our Business Partners.
    This mails sholdn't be the standard ones of this BPs. BPs can has many email addressess (more than one) and they can be subscrited with a non default email (email without default flag in SAP CRM).
    When we try to execute a Marketing campaign with these BPs, SAP CRM uses the default mail address to send the campaing.
    Is possible to execute a Mailling campaign setting the email receivers?
    Thanks a lot.

    Hi Mauro.
    We already have tried to use CRM_MKT_ADR_SEARCH Badi. We have implemented CHANGE_SEARCH_RESULTS method but with this it's only possible to choice between diferent Addresses Numbers.
    But, we have the same Addr. Number with more than one email address in ADR6. All this email address are in the same Adrress Number and Person Number.
    About your question, we are storing the newsletter emails into a Z table. This email adresses are already in BP address.
    Thank you for your idea.
    Do you have another way?

  • Use system console with editable default value

    Hi,
    Is it possible in java (or maybe groovy) to ask user for input in console with default value passed? User should be able to edit the default value or commit it by pressing enter key.
    Sample:
    <CONSOLE> Enter type: TYPE1<cursor>
    if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?

    Opal wrote:
    if user hits enter key the TYPE1 is passed to application, when user hits backspace the TYPE1 is edited. Any ideas?For java it would need to look more like the following
    <CONSOLE> Enter type[enter for default 'TYPE1']: <cursor>
    I suspect that generally users will not be editing the default, so although you can't do it, it isn't much of a loss.

  • SSRS 2012 MP (Native) - Bug with non-default port on SSRS DB, Does not discover

    We have test changing SSRS DB instance to default port 1433 and discovery is immediate in SSRS MP. When using non-default port, discovery fails, SSRS instance role is never identified.
    Our SSRS is separated into app and db tires across two servers. Have tried creating sql network aliases, but this does not work either.
    In our environment, we use non-default port for our SQL DB instances. how do we get SSRS to discover.
    Thanks in advance,
    Rois Cordova

    The Monitoring Pack for Microsoft SQL Server 2012 Reporting Services automatically discovers instances of SSRS 2012 by reading registry.
    When the Monitoring Pack for Microsoft SQL Server 2012 Reporting Services is imported for the first time, it creates three new Run As profiles:
    • Microsoft SQL Server 2012 Reporting Services Discovery Run As Profile
    • Microsoft SQL Server 2012 Reporting Services Monitoring Run As Profile
    • Microsoft SQL Server 2012 Reporting Services SCOM SDK Discovery Run As Profile
    By default, all discoveries, monitors and rules defined in the SQL Server 2012 Reporting Services management pack use accounts defined in the “Default Action Account”
    Run As profile. If the default action account for a given system does not have the necessary permissions to discover or monitor the instance of SQL Server 2012 Reporting Services, then those systems can be bound to more specific credentials in the
    “Microsoft SQL Server 2012 Reporting Services …” Run As profiles, which do have access.
    It s recommend that you should check the default action account permission.
    Roger

Maybe you are looking for

  • Unable to run code analysis with WDK 9926

    Hi, I am trying to run code analysis with WDK 9926 and seeing below issue? can anybody help me to resolve this ? Error: ==== C:\sw\dev\T4\windows\Src\kernel\vbd>msbuild.exe cht4vbd.vcxproj /p:Configuration="Windows 8.1 Debug" /P:Platform=x64 /P:RunCo

  • Ebusiness suite integration with ADF

    HI there xperts! I am having a lot of trouble trying to decipher the multitude of information around for integrating Jdeveloper ADF applications with ebusiness 12.1.3 Essentially, I have created a number of view pages, in my application but now need

  • Can I use two apple tv's with one itunes library?

    I have been looking for a way to store my DVD's on a hard drive and watch them via my Apple TV as they are taking up too much space on my shelves. My first thought was to buy a large external hard drive and rip the dvd's using Handbrake for my stream

  • To know my laptop is sufficient or not

    my laptop specifications are i5 3rd gen processor,4 gb ram,1 tb hard disk,1 gb graphic      is it sufficient to run premeirepro and after effects

  • Elements 11 - unable to switch editing modes after installing

    Hi, I have just installed Photoshop Elements 11 on a Mac OSX 10.6.8 and I am unable to switch editing modes (quick / guided / expert). In fact, none of the buttons on the top bar responds to my clicks. In addition, I am unable to quit the programme,