Lookup in array literal?

Hello,
Does Java support lookups from array literals? Something like this:
System.out.println(["one", "two", "three"][1]); // outputs "two"Yeah I know it's bad practice, I'm just messing around with some obfuscated code.
Thanks,
Z.

I already tried, here are the errors I receive:
test.java:6: illegal start of expression
            System.out.println(["one", "two", "tree"][1]);
                               ^
test.java:6: ';' expected
            System.out.println(["one", "two", "tree"][1]);
                                ^
test.java:6: illegal start of expression
            System.out.println(["one", "two", "tree"][1]);
                                     ^
test.java:6: ';' expected
            System.out.println(["one", "two", "tree"][1]);
                                      ^
test.java:6: illegal start of expression
            System.out.println(["one", "two", "tree"][1]);
                                            ^
test.java:6: ';' expected
            System.out.println(["one", "two", "tree"][1]);
                                             ^
test.java:6: illegal start of expression
            System.out.println(["one", "two", "tree"][1]);
                                                    ^
test.java:6: ';' expected
            System.out.println(["one", "two", "tree"][1]);
                                                     ^
test.java:6: not a statement
            System.out.println(["one", "two", "tree"][1]);
                                                      ^
test.java:6: ';' expected
            System.out.println(["one", "two", "tree"][1]);
                                                       ^
10 errorsI also tried {....}[0] as well as String[...][0] and got similar errors.

Similar Messages

  • Searching 1D array for data present in lookup 1D array.

    Hi!,
    I have a sorted 1D array of strings(say initial array) and I have
    three lookup array of string(say array A, array B and array C). I want
    to search the initial array with array A, array B and array C and then
    create a new array Final which will contain the elements of array A,
    if any, its start index and its last index and then element sof
    arrayB, if any found, its start index and its end index and then
    element of array C its start index and its end index.
    The start index and end index are stored in different indicatrs for
    all the three found.
    How do I search elements of 1D array with another 1D array?
    TIA,
    RK

    There are probably several ways to do it. One way to do it you would create a For Loop with the initial array run into it with auto-indexing turned off. You would then run array A into it with auto-indexing turned on. Inside of the loop, you would use a Search Array to find the index (if any) of the element in the initial array that matched the auto-indexed element of Array A. You will want to either build an array of only the indexes >=0 (trapping the "not found" -1) or you can autoindex the results and have you later code deal with them.
    You will need three of these loops, one for each searching array. Or better, you could push it into a subVI and call it three times.
    I hope that this helps!
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Why no array literal?

    This is really just a philosophical question. The language allows a literal to be used to initilaize an array like this
    int[] arr = {1,2,3,4}but later in the code you cannot write
    arr = {4,5,6,7};I have always wondered why. Anyone got an insight?

    ...and the reason is that to create the array, the
    compiler needs to know the element type of the array,
    but with the elements you use it could be any of byte
    short char int float double... so they allow that
    expression only when you declare and initialize on
    the same line.Hmmm.... I don't buy it. The types are no more ambigous in the second line than the first: int[] arr = {1, 2};
    arr = {3, 4}; In both cases, the values could be interpreted as ints, longs, doubles...
    But in both cases, it's known that arr is an array of ints, so all that should be required is that the values inside the {} are assignment compatible with int.

  • Casing Strings to string[] array

    Hi,
    Beginner question.
    Why can i do this:
    String[] tmp = {"mike", "Bob", "Jay"};
    SomeClass.main(tmp);
    But i can't do this:
    SomeClass.main({"mike", "Bob", "Jay"});
    It does not make sense to me.
    It would save me some time if i didn't have to declare a String[] all the time.
    Thanks,
    -J

    The Syntax {"a", "b", "c"} is an array initializer and it can't be used like an array literal. Here are two solutions:
    public class Example {
        public static void main(String[] args) {
            f(new String[]{"a", "b", "c"});
            g("a", "b", "c");
        static void f(String[] v) {
            for(int i=0; i<v.length; ++i) {
                System.out.println(v);
    static void g(String... v) {
    for(int i=0; i<v.length; ++i) {
    System.out.println(v[i]);
    } [The String... syntax is a vararg|http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ......Trusted Recon With Oracle 11g Fail. All details explained

    Ok...... How can I delete this post? ---- > I resolve the issues......
    Hi, When I create the trusted Recon, connector sendme:
    ERROR [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' org.apache.struts.actions.DispatchAction - Request[CreateConnector] does not contain handler parameter named method
    follow by
    ERROR [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' XELLERATE.SERVER - Class/Method: tcTableDataObj/setTimestamp encounter some problems: {1}
    java.lang.NullPointerException
         at com.thortech.xl.dataobj.tcDataSet.setTimestamp(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataSet.setTimestamp(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.setTimestamp(Unknown Source)
         at com.thortech.xl.ddm.instance.visitor.ImportVisitor.visitStarted(Unknown Source)
    ===================================================================
    Hi, I think I need to re install the GTC or OIM because all works fine (Recon with AD, Exchange... DataBase Provisioning) But when Im try to Recon with Oracle Databse11g Fails.
    I read the manuals but nothing..... ok I do the next configs:
    - Generic Technology Connector
    - Create
    =========================*Step 1*=================
    Name                              ReconCity                         
    Transport Provider (Reconciliation)................Database Application Tables Reconciliation      
    Format Provider (Reconciliation).....................Database Application Tables Reconciliation      
    Trusted Source Reconciliation.........................Selected
    ========================*Step 2*==================
    Database Drive : oracle.jdbc.driver.OracleDriver
    Database URL : jdbc:oracle:thin:@192.168.1.101:1521:DFGOB
    Database User ID : system
    Database Pass......: my_pass
    parent Table/View
    Name.......................: Recon_Users
    Batch Size...............: All
    Stop Reconciliat
    ion Threshold..........: None
    Stop Threshold........: None
    Sourcedate Format: yyyy/MM/dd hh:mm:ss z
    Reconcile Deletion
    of Multival.................: "Selected"
    Reconciliation
    Type..........................: Full
    ========================*Step 3 (try 1)*===========
    SOURCE.................*RECON STAGING*.......................*OIM*
    USER_ID--------------> USER_ID -------------> User ID
    FIRTS_NAME--------> FIRST_NAME ----------> FIRST_NAME
    LAST_NAME---------> LAST_NAME ----------> . --> Yes, I map all fields to OIM
    PASSWORD----------> PASSWORD ---------> .
    EMAIL------------------> EMAIL ----------------> .
    STATUS---------------> STATUS --------------> .
    ..........|Xellerate |--> ORGANIZATION ------------> .
    ..........|End-User |------> EMPLOYEE TYPE -----> .
    ..........|Full-Time |-------> USER TYPE ------------> .
    - (STATUS values from my database table is: Active or Disabled)
    - ( I try (Enabled/Disabled) )
    For Fields USER_ID to STATUS
    (Edit option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: USER_ID
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required.....................: Selected
    For Fields ORGANIZATION to USER TYPE
    (Add option)
    Dataset........................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: ORGANIZATION
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only.............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required.....................: Selected
    Input
    Literal: Xellerate      
    ===After save on step 4 I go to Resource Manager-->Manage Scheduled task--> RUN NOW and the log send me
    DEBUG QuartzWorkerThread-4 XELLERATE.ADAPTERS - Class/Method: tcStructureUtil/getUserDefinedCols entered.
    ERROR QuartzWorkerThread-4 XELLERATE.APIS - Class/Method: tcReconciliationOperationsBean/ignoreEventData encounter some problems: {1}
    java.lang.NullPointerException
         at com.thortech.xl.dataobj.util.tcAttributeSource.getAttrColumnName(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getRuleElementWhere(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getRuleWhere(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getMatchedUserList(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.getMatchedUserList(Unknown Source)
         at com.thortech.xl.dataobj.util.tcReconciliationUtil.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEventData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperationsSession.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperations_gmh3ba_EOImpl.ignoreEvent(tcReconciliationOperations_gmh3ba_EOImpl.java:692)
         at Thor.API.Operations.tcReconciliationOperationsClient.ignoreEvent(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy62.ignoreEvent(Unknown Source)
         at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
         at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    ERROR QuartzWorkerThread-4 XELLERATE.GC.FRAMEWORKRECONCILIATION - Reconciliation Encountered error:
    Thor.API.Exceptions.tcAPIException: java.lang.NullPointerException
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEventData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperationsSession.ignoreEvent(Unknown Source)
         at com.thortech.xl.ejb.beans.tcReconciliationOperations_gmh3ba_EOImpl.ignoreEvent(tcReconciliationOperations_gmh3ba_EOImpl.java:692)
         at Thor.API.Operations.tcReconciliationOperationsClient.ignoreEvent(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy62.ignoreEvent(Unknown Source)
         at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
         at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    WARN QuartzWorkerThread-4 XELLERATE.GC.FRAMEWORKRECONCILIATION - Though Reconciliation Scheduled task has encountered an error, Reconciliation Transport providers have been "ended" smoothly. Any provider operation that occurs during that "end" or "clean-up" phase would have been executed e.g. Data archival. In case you want that data to be a part of next Reconciliation execution, restore it from Staging. Provider logs must be containing details about storage entities that would have been archived
    ==========================================
    ========================*Step 3 (try 2)*==============
    SOURCE..................*RECON STAGING*....................*OIM*
    USER_ID--------------> USER_ID -------------> User ID
    FIRTS_NAME--------> FIRST_NAME ----------> FIRST_NAME
    LAST_NAME---------> LAST_NAME ----------> .
    PASSWORD----------> PASSWORD ----------> .
    EMAIL------------------> EMAIL -----------------> .
    ........|Xellerate |--> ORGANIZATION -------------> .
    ........|End-User |------> EMPLOYEE TYPE ------> .
    ........|Full-Time|-------> USER TYPE --------------> .
    ........|Active |------> SATUS -----------------> .
    - (On STATUS I try (*Active/Enabled/Disabled*) )
    For Fields USER_ID to EMAIL
    (Edit option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: USER_ID
    Mapping Action.........: Create mapping Without Transformation     
    Matching Only.............: Not Applicable
    Case-Insensitive.........: Not Applicable
    Data Type      *..............: String
    Required.......................: Selected
    For Fields ORGANIZATION to STATUS
    (Add option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name................: STATUS
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required......................: Selected
    Input
    Literal: Active      
    ===After save on step 4 I go to Resource Manager-->Manage Scheduled task--> RUN NOW and the log sende me the same ERRROR posted up.
    ===============Step 3 (try 3)=======================
    SOURCE...................*RECON STAGING*...................... OIM
    USER_ID--------------> USER_ID -----------> User ID
    FIRTS_NAME--------> FIRST_NAME ----------> FIRST_NAME
    LAST_NAME---------> LAST_NAME ----------> .
    PASSWORD----------> PASSWORD ----------> .
    EMAIL------------------> EMAIL ------------> .
    USER_STATUS----| T |--> USER_STATUS ---> .
    .....................................|
    .........................|Lookup.M4..|
    ............|Xellerate |--> ORGANIZATION ------------> .
    ............|End-User |------> EMPLOYEE TYPE ------> .
    ............|Full-Time |-------> USER TYPE -------------> .
    - (USER_STATUS have the next Values: True/False)
    For Fields USER_ID to EMAIL
    (Edit option)
    Dataset.......................: Reconciliation Staging
    Child Dataset Name :           
    Field Name.................: USER_ID
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only.............: Not Applicable
    Case-Insensitive.........: Not Applicable
    Data Type      *..............: String
    Required......................: Selected
    For Fields ORGANIZATION to USER_TYPE
    (Add option)
    Dataset........................: Reconciliation Staging
    Child Dataset Name :           
    Field Name................: ORGANIZATION
    Mapping Action..........: Create mapping Without Transformation     
    Matching Only............: Not Applicable
    Case-Insensitive........: Not Applicable
    Data Type      *.............: String
    Required.....................: Selected
    Input
    Literal: Xellerate
    Dataset.......................: Reconciliation Staging
    Child Dataset Name:           
    Field Name................: USER_STATUS
    Mapping Action.........: Create Mapping with Translation     
    Matching Only...........: Not Applicable
    Case-Insensitive.......: Not Applicable
    Data Type      *............: String
    Required....................: Selected
    Field Name USER_STATUS
    Input
    Dataset........:Source      
    Field Name :USER_STATUS
    Lookup Code Name
    Literal...........: Lookup.M4.Recon      
    ===============
    Lookup Definition
    Code : Lookup.M4Recon
    Field:
    Lookup Type(Selected)
    Required (Not Selected)
    Group: Object
    Lookup Code Info
    | Code Key | Decode |
    1 | True/False | Active/Disabled|
    ===After save on step 4 I go to Resource Manager-->Manage Scheduled task--> RUN NOW and the log sende me the same ERROR posted up.=============
    I hope you can help me, Thanks.....
    Edited by: user11296330 on Oct 18, 2009 8:55 PM
    Edited by: user11296330 on Oct 18, 2009 10:10 PM
    Edited by: user11296330 on Oct 19, 2009 3:33 PM
    Edited by: user11296330 on Oct 20, 2009 1:52 AM
    Edited by: user11296330 on Oct 21, 2009 9:08 AM
    Edited by: user11296330 on Nov 8, 2009 10:16 PM
    Edited by: user11296330 on Nov 8, 2009 10:20 PM

    Hi amigo I solve my problem with the next:
    OK, all above is good but in the manual they mistake something.... one step.
    (All succesful with --> ========================*Step 3 (try 2)*==============)
    1.- Ok, if you got every thing like above the last thing you need is follow the next link:
    http://www.oracle.com/technology/obe/fusion_middleware/im1014/oim/obe12_using_gtc_for_reconciliation/using_the_gtc.htm
    Go to: "Modifying the GTC" ( just do this part)
    Restart the OIM and Enjoy it.
    Good day Amigo.
    And don't forget on step three:
    Click the Edit icon of the User ID field of the OIM - User data set.
    b. On the Step 1: Provide Field Information page:
    - From the Mapping Action list, select Create Mapping Without Transformation.
    - Select Matching Only.
    - Click Continue.
    Mapping Information page, select Reconciliation
    Staging from the Dataset list, select EMPLOYEE_ID (your ID Field) from the Field Name
    list, and then click Continue.
    If something go bad, tell me the steps like I did with the log.... see ya
    Edited by: user11296330 on Nov 8, 2009 9:57 PM
    Edited by: user11296330 on Nov 8, 2009 10:21 PM

  • 10.5.5 break anti-virus mail server stops working

    We updated to 10.5.5 and suddenly our server stopped forwarding mail.
    I noticed in the logs that the anti-spam and anti-virus (clamav etc.) were failing to update and run. The server was brutally slow. I turned off the anti-virus checks and everything is working again after two days of searching.
    Any idea what broke and how a newbie could fix it?
    Thanks,
    Ryan

    Good morning,
    Thank you very much for offering to help.
    Here is the amavis.log:
    5625-13) smtp resp to greeting: 220 roy.nanuc.ualberta.ca ESMTP Postfix
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp cmd> EHLO localhost
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp resp to EHLO: 250 roy.nanuc.ualberta.ca\nPIPELINING\nSIZE 10485760\nVRFY\nAUTH GSSAPI\nETRN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) AUTH not needed, user='', MTA offers 'GSSAPI'
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp cmd> MAIL FROM:<[email protected]> BODY=7BIT
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp cmd> RCPT TO:<[email protected]> ORCPT=rfc822;[email protected] NOTIFY=NEVER
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp cmd> DATA
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp resp to MAIL (pip): 250 2.1.0 Ok
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp resp to RCPT (pip) (<[email protected]>): 250 2.1.5 Ok, id=25625-13, from MTA([127.0.0.1]:10025): 250 2.1.5 Ok
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp resp to DATA: 354 End data with <CR><LF>.<CR><LF>
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp cmd> QUIT
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp resp to data-dot (<[email protected]>): 250 2.0.0 Ok: queued as 4F2A79DDF40
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) smtp resp to QUIT: 221 2.0.0 Bye
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) FWD via SMTP: <[email protected]> -> <[email protected]>,BODY=7BIT 250 2.6.0 Ok, id=25625-13, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4F2A79DDF40
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) Passed CLEAN, [142.231.77.1] [142.103.48.148] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: lTLSt8bShtqL, Hits: -2.399, size: 1420, queued_as: 4F2A79DDF40, 5644 ms
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) TIMING [total 5663 ms] - SMTP greeting: 3 (0%)0, SMTP EHLO: 1 (0%)0, SMTP pre-MAIL: 1 (0%)0, SMTP pre-DATA-flush: 3 (0%)0, SMTP DATA: 1 (0%)0, check_init: 1 (0%)0, digest_hdr: 0 (0%)0, digest_body: 0 (0%)0, genmailid: 1 (0%)0, mime_decode: 10 (0%)0, get-file-type1: 30 (1%)1, decompose_part: 4 (0%)1, parts_decode: 0 (0%)1, check_header: 3 (0%)1, spam-wb-list: 10 (0%)1, SA msg read: 2 (0%)1, SA parse: 3 (0%)1, SA check: 5464 (96%)98, update_cache: 8 (0%)98, decidemaildestiny: 1 (0%)98, fwd-connect: 44 (1%)99, fwd-mail-pip: 37 (1%)99, fwd-rcpt-pip: 0 (0%)99, fwd-data-chkpnt: 0 (0%)99, write-header: 1 (0%)99, fwd-data-contents: 0 (0%)99, fwd-end-chkpnt: 10 (0%)100, prepare-dsn: 1 (0%)100, mainlogentry: 7 (0%)100, update_snmp: 2 (0%)100, SMTP pre-response: 1 (0%)100, SMTP response: 0 (0%)100, unlink-1-files: 14 (0%)100, rundown: 1 (0%)100
    Sep 23 10:44:57 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) load: 5 %, total idle 1269.245 s, busy 61.959 s
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-09) process_request: fileno sock=14, STDIN=14, STDOUT=14
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) ESMTP::10024 /var/amavis/tmp/amavis-20080923T102933-25702: <[email protected]> -> <[email protected]> SIZE=2658 Received: from roy.nanuc.ualberta.ca ([127.0.0.1]) by localhost (brodeur.nanuc.ualberta.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <[email protected]>; Tue, 23 Sep 2008 10:47:21 -0600 (MDT)
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) body hash: 317adbdde036e2d63027358ccd2878f4
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) Checking: LZdT8Jzafapz [88.87.242.247] <[email protected]> -> <[email protected]>
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) 2822.From: <[email protected]>
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) p003 1 Content-Type: multipart/alternative
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) p001 1/1 Content-Type: text/plain, size: 536 B, name:
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) p002 1/2 Content-Type: text/html, size: 951 B, name:
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) Checking for banned types and filenames
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) collect banned table[0]: [email protected], tables: DEFAULT=>Amavis::Lookup::RE=ARRAY(0xae3b80)
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) p.path [email protected]: "P=p003,L=1,M=multipart/alternative | P=p001,L=1/1,M=text/plain,T=asc"
    Sep 23 10:47:21 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) p.path [email protected]: "P=p003,L=1,M=multipart/alternative | P=p002,L=1/2,M=text/html,T=html"
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) spam_scan: score=16.479 autolearn=spam tests=[BAYES99=3.5,DOS_OE_TO_MX=2.75,FH_HELO_EQ_D_D_D_D=0.001,HTML_MESSAGE=0.001,RCVD_IN_BL_ SPAMCOP_NET=1.96,RCVD_IN_SORBS_DUL=0.877,RDNS_DYNAMIC=0.1,URIBL_AB_SURBL=1.86,UR IBL_BLACK=1.955,URIBL_JP_SURBL=1.501,URIBL_OB_SURBL=1.5,URIBL_SCSURBL=0.474]
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) blocking contents category is (6) for [email protected]
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) donotify_andquar: ccat=Spam (6,0) ("6":Spam, "5":Spammy, "1,1":CleanTag, "1":Clean, "0":CatchAll) ccat_block=(6), q_mth=local:spam-%m.gz, qar_mth=
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) local delivery: -> <spam-quarantine>, mbx=/var/virusmails/spam-LZdT8Jzafapz.gz
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) SPAM, <[email protected]> -> <[email protected]>, Yes, score=16.479 tag=2 tag2=6 kill=6 tests=[BAYES_99=3.5, DOSOE_TOMX=2.75, FHHELO_EQ_D_D_DD=0.001, HTML_MESSAGE=0.001, RCVDIN_BL_SPAMCOPNET=1.96, RCVDIN_SORBSDUL=0.877, RDNS_DYNAMIC=0.1, URIBLABSURBL=1.86, URIBL_BLACK=1.955, URIBLJPSURBL=1.501, URIBLOBSURBL=1.5, URIBLSCSURBL=0.474], autolearn=spam, quarantine LZdT8Jzafapz (spam-quarantine)
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) DSN: FILTER 554 Spam, spam level 16.479 exceeds cutoff level 10, <[email protected]> -> <[email protected]>
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) Blocked SPAM, [88.87.242.247] [88.87.242.247] <[email protected]> -> <[email protected]>, quarantine: spam-LZdT8Jzafapz.gz, Message-ID: <000501c91d9c$05859a88$8f5aeeab@bdrxi>, mail_id: LZdT8Jzafapz, Hits: 16.479, size: 2658, 5391 ms
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) TIMING [total 5516 ms] - SMTP greeting: 2 (0%)0, SMTP EHLO: 1 (0%)0, SMTP pre-MAIL: 1 (0%)0, SMTP pre-DATA-flush: 36 (1%)1, SMTP DATA: 2 (0%)1, check_init: 1 (0%)1, digest_hdr: 0 (0%)1, digest_body: 0 (0%)1, genmailid: 1 (0%)1, mime_decode: 27 (0%)1, get-file-type2: 199 (4%)5, decompose_part: 2 (0%)5, parts_decode: 0 (0%)5, check_header: 2 (0%)5, spam-wb-list: 7 (0%)5, SA msg read: 2 (0%)5, SA parse: 5 (0%)5, SA check: 5012 (91%)96, update_cache: 54 (1%)97, decidemaildestiny: 2 (0%)97, write-header: 24 (0%)98, save-to-local-mailbox: 1 (0%)98, prepare-dsn: 2 (0%)98, mainlogentry: 8 (0%)98, update_snmp: 2 (0%)98, SMTP pre-response: 1 (0%)98, SMTP response: 0 (0%)98, unlink-2-files: 120 (2%)100, rundown: 2 (0%)100
    Sep 23 10:47:26 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25702]: (25702-10) load: 5 %, total idle 1017.355 s, busy 56.145 s
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-13) process_request: fileno sock=14, STDIN=14, STDOUT=14
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) ESMTP::10024 /var/amavis/tmp/amavis-20080923T102246-25625: <[email protected]> -> <[email protected]> SIZE=101053 Received: from roy.nanuc.ualberta.ca ([127.0.0.1]) by localhost (brodeur.nanuc.ualberta.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <[email protected]>; Tue, 23 Sep 2008 10:51:15 -0600 (MDT)
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) body hash: c3cd040b5047389196bd53fb2d5a8109
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) Checking: FK2K9OKp4N1Z [129.128.5.19] <[email protected]> -> <[email protected]>
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) 2822.From: <[email protected]>
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) p003 1 Content-Type: multipart/alternative
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) p001 1/1 Content-Type: text/plain, size: 11777 B, name:
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) p002 1/2 Content-Type: text/html, size: 80574 B, name:
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) Checking for banned types and filenames
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) collect banned table[0]: [email protected], tables: DEFAULT=>Amavis::Lookup::RE=ARRAY(0xae3b80)
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) p.path [email protected]: "P=p003,L=1,M=multipart/alternative | P=p001,L=1/1,M=text/plain,T=txt"
    Sep 23 10:51:15 brodeur.nanuc.ualberta.ca /usr/bin/amavisd[25625]: (25625-14) p.path [email protected]: "P=p003,L=1,M=multipart/alternative | P=p002,L=1/2,M=text/html,T=html"
    I've had to turn off virus scanning to get any forwarding done.
    The spam filter is working but the server grinds to a halt every few minutes, then catches up. Like it's trying something, gives up, and then goes back to work for a bit until it tries again.
    The server is running web services and mail forwarding to the University only.
    Our firewall restricts outgoing (internet) from the server only accepting incoming requests. That way if it gets hacked it can't attack anyone. We're able to run mac updates via the University software update server (local outgoing is allowed).
    Thank you again for any help you can offer.

  • Set Email Description (body) with javascript

    I am trying to set the Email description in the OnLoad event of the email form in CRM 2011
    Using this code:
    "Xrm.Page.getAttribute("description").setValue(mailText.toString());"
    In OnLoad of the email form my script is excecuted every time it loads / refreshes the page but the description is sometimes shown and sometimes not.
    Does somebody know about this behavior and may have a solution?
    Greez

    Thx for your reply. The rest of the code is working. I debuged it about 1000 times. :)
    But here it is:
    function FillEmail()
    var lookup = new Array();
    regObj = Xrm.Page.getAttribute("regardingobjectid").getValue();
    if (regObj != null)
    if (regObj[0].entityType == "new_besuchsbericht")
    var bericht = CrmRestKit.Retrieve("new_besuchsbericht", regObj[0].id, [
    "new_name",
    "OwnerId",
    "new_OrtdesBesuchs",
    "new_AnsprechpersonId",
    "new_Besuchsdatumvon",
    "new_Besuchsdatumbis",
    "new_Teilnehmer",
    "new_Beschreibung"
    ], null);
    var thema = bericht.new_name;
    var owner = bericht.OwnerId;
    var ortDesBesuchs = bericht.new_OrtdesBesuchs;
    var ansprechperson = bericht.new_AnsprechpersonId;
    var besuchsdatumvon = bericht.new_Besuchsdatumvon;
    var besuchsdatumbis = bericht.new_Besuchsdatumbis;
    var teilnehmer = bericht.new_Teilnehmer;
    var beschreibung = bericht.new_Beschreibung;
    var ansprechName = "";
    if (ansprechperson.Name != null)
    ansprechName = ansprechperson.Name;
    var dateVon = new Date(parseInt(besuchsdatumvon.replace("/Date(", "").replace(")/", ""), 10)).toLocaleString();
    var dateBis = new Date(parseInt(besuchsdatumbis.replace("/Date(", "").replace(")/", ""), 10)).toLocaleString();
    var mailText = "<div style=\"font-family: Arial; font-size: 11pt;\">";
    mailText += "Thema: " + thema;
    mailText += "<br/><br/>";
    mailText += "Ort des Besuchs: " + ortDesBesuchs;
    mailText += "<br/><br/>";
    mailText += "Ansprechperson: " + ansprechName;
    mailText += "<br/><br/>";
    mailText += "Besuchsdatum von: " + dateVon;
    mailText += "<br/>";
    mailText += "Besuchsdatum bis: " + dateBis;
    mailText += "<br/><br/>";
    mailText += "Teilnehmer: " + teilnehmer;
    mailText += "<br/><br/>";
    mailText += "Beschreibung: <br/>";
    mailText += beschreibung;
    mailText += "</div>";
    Xrm.Page.getAttribute("subject").setValue(thema);
    var mailDescription = Xrm.Page.getAttribute("description");
    if (mailDescription != null)
    mailDescription.setValue(mailText.toString());
    alert("description set");
    The Subject is set every time and the "alert" in the end is fired after every load of the page.

  • Alternate Methods for FP Updates

    I am trying to come up with the most efficient method--both from an execution standpoint, as well as from a development standpoint--for updating indicators on a front panel.
    We have an application with multiple windows containing many numeric indicators, representing measurement devices. We also have a subvi that handles performing queries of a central current value table to return the values of devices by name; you pass in an array of devicenames, and it returns an array of values. The standard LabVIEW paradigm for updating indicators would probably be as follows:
    In this simplified example, that seems straightforward enough, but it quickly becomes unmanageable if you have to keep adding/removing indicators. It's a constant struggle to make sure that your lookup array and output array indexing matches. In the example above, there's an example of a common subtle mistake. Can you see it?
    In order to speed up development and avoid such mismapping issues, we started playing with scripting, and came up with the following paradigm:
    In this example, we just place the indicators on the front panel and ensure that the label matches the device. Then we run a script that will place the terminals into cases in a case structure, and generate the lookup string array. So then we can step through the outputs in a for loop, and update the indicators one by one. This method is slightly easier to maintain that the first one, provided you stick to the scripted methods, but if you ever start manually making changes to the devices, cases, or lookup array, you quickly find yourself in a world of confusion as the inevitable mismapping errors start to come up. Further, it is generally frowned upon to update indicators in a case structure like that (anyone in the LV community care to comment on what that is, exactly?).
    Recently, I came up with an alternative that I really like, at least for certain cases: if you can bundle all your FP indicators into a single cluster, then you can perform aggregate lookup/update operations:
    This way is super nice, since you are guaranteed that the lookup will always be in the correct order. And you don't have to duplicate the indicator labels explicitly on the block diagram. It will even work if you have nested clusters, as long as they are monolithic! However, there are many cases where a given VI does not lend itself to clustering all the front panel indicators together. Particularly if you have them spread out, and have controls nearby (many displays are schematics, with indicators placed where the physical transducers are located, and often there are controls immediately next to them). Sure, you could just create one giant transparent cluster container and toss all your indicators in that, then put any controls on top. But I tend to shy away from floating objects on top of other objects if I can help it. And it is really easy to screw up and accidentally add items to the cluster when you don't mean to...
    Ideally, what I would really like is to be able to update all the indicators by reference:
    In this example, we just grab all the references once (this is a simplified example, you would probably need to be a little fancier in your traversal to avoid including controls, etc.) and then update the Value property. But, of course, we all know how well LabVIEW handles property node updates, so we defer and undefer FP updates to avoid slowing things down to an absolute crawl. But even doing so, our attempts at using this method have still proven to be pretty darn slow and computationally expensive. 
    So, my question to you, LabVIEW Community: have any of you come up with a different way to handle this? Do you have any suggestions for updating indicators quickly and efficiently, while maintaining code legibility and scalability? I'm guessing someone out there has come up with some better methods...

    As a follow-up. I did a quick benchmark test to compare the For Loop/Case Structure method with the By-Reference method. I took one of our GUI windows and copied all the indicators into a separate test VI. In this case, there were roughly 100 individual indicators, all DBL type. Yes, that seems like a lot, but again, we were distributing them over a background image and grouping them based on the data they represent. I stripped out all the graphics and captions to avoid displaying anything proprietary/confidential, so here's how the FP looks now (not pretty, I know):
    So, not pretty, to be sure. But you can see it's not a ridiculous number of indicators. [I assure you, with the captions and background images, it looks a lot spiffier]
    So, I made two benchmark VIs to update these indicators. First, I did the update-them-in-dedicated-cases-inside-a-for-loop method:
    [devicenames have been blurred to protect the innocent]
    If I run this as shown, updating all ~100 indicators 100 times, the total update time is roughly 6ms. Not too shabby.
    If I try the by-reference method, performance is decidedly crappier:
    Even if I defer panel updates throughout the entire update process, as shown above, writing the values to all indicators 100 times takes over 2.3 seconds. That's over 380 times slower! 
    So, from this example, my main conclusion is that property nodes are not the way to go. It's unfortunate, since they would provide the cleanest and most versatile/scalable mechanism. Unless anyone has come up with better workarounds, or can point out flaws in my implementation...?

  • Validation expression help

    Hi All,
    I have requirement like having two fields
    Status(Lookup) and Date (Literal Date)
    Business rules as follows
    1) If "Status" = "Draft" then Date value should be equals to 09/09/9999
    2) If "Status" <> "Draft" then Date value should not be equals to 09/09/9999
    I tried with validation Expression Has_Any_Values, but no use.
    Can any one please help me on this....
    Thanks
    Anil

    Hi Priti Thanks for your reply...
    I don't want to assign date in Date field.'
    Validation requirement are
    1. If i select Status = "Draft" then i can select date only 09/09/9999. It should give an error message if i select any other date except 09/09/9999
    2. If i select status other than "Draft" Ex: if i select Status "Active". Date field should not allow to select 09/09/9999.
    Shiv - I think my explanation is clear now.
    I wrote validation for 1st scenario
    IF(HAS_ANY_VALUE(Status.Name="Draft",TRUE), HAS_ANY_VALUE(Date="09/09/9999",TRUE))
    But its not working as required.
    What i came to know is if Date field Data Type is Text is working fine. But in my data model we declared Date field Data type as Literal Date. so it's not working and now i cannot change data type here we have lots of data in it.
    can any one have sugessions to implement these validations please welcome.
    Thanks,
    Anil

  • Jsr-201 including varargs in public review

    Now that jsr-201 has gone into public review I have sent an email about varargs to:
    [email protected]
    I have included below some of the reasons why I think the Concise Object Array Literals syntax is better than their currently proposed varargs syntax.
    They claim that most of the feedback they have got prefers the vararg syntax, I did another search in this forum and it still appears to me that people prefer the Concise Object Array Literals syntax , hence maybe others could also send their comments to [email protected]
    * the callee can clearly see that they are passing in varargs
    * the callee can pass in many var arg parameters, not just 1 at the end
    e.g.
    public void foo(int arg1, Object[] arg2, Integer[]) {
    public void test() {
      foo(1, {"hello", true, 5, 5L, 5F, 5.0}, {1, 2, 3});
    }* the callee can choose to pass in a different number of arguments based on a condition:
    e.g.
    public void foo(int arg1, Object[] arg2, int arg3) {
    public void test() {
      foo(1, condition ? {"hello", true, 5, 5L, 5F, 5.0} : {"hello", true, 5}, 3);
    }* the callee can call other 3rd party methods that already exist without having to wait for them to change all their methods to the ... syntax (Concise Object Array Literals is more compatible with existing code)

    They claim that most of the feedback they have got
    prefers the vararg syntax, I did another search in
    this forum and it still appears to me that people
    prefer the Concise Object Array Literals syntax ,
    hence maybe others could also send their comments to
    [email protected]
    I don't like varargs, too. Your observation about this forum may be quite simple to explain - people who really understand problems with varargs do not write to these forums. For lots of people, typing extra { and } with concise array literals will not be an issue. However, they consider this extra curly braces "an overhead" and submit feedback that they like varargs syntax more, just because it does not have curly braces. It seems that they do not fully realize consequences or just simply have not spent enough time to think about them. At the first glance, of course, varargs will look more attractive than concise array literals for method calls.
    I also object that "varargs are good because they help to see that certain method is interested only in values of array". We have javadoc for this! One can also use Tiger's annotation facility for this. There is no need to invent new syntaxt just for annotation/documentation. I'm alarmed when I read "this is what I like the most about varargs". It means - varargs are no good.
    However, it may not be possible to resurrect concise array literals in Tiger due to timing. My opining on this matter is expressed fully in my JSR-201 comment. Here's a copy:
    lease, do not include varargs as they currently specified into Tiger.
    There seem to be too much controversy between varagrs and concise
    array liters at this point. It is evident that a better solution that
    addresses needs for both sides is needed. It may not be enough time to
    find such solution for Tiger, but inclusion of varargs into the
    language as they currently specified may ruin better alternatives in
    the future. For example, concise array literals (or similar proposals)
    will look extremely ugly combined with varargs as per PRD.
    I understand that varargs are needed to support important marketing
    features in Tiger like printf. Yes, it is marketing (with questionable
    need in education sector), because real projects will not use printf.
    Real projects are using logging and MessageFormat. They are not very
    convenient without concise array literals, but at least everybody is
    already accustomed to them. People have already written a lot of
    helper classes themselves for MessageFormat&Logging that do not need
    any varargs and have higher performance than PRD varargs will. They
    simply declare methods with varying number of parameters. They have as
    may version of their methods as their really need in their project.
    This practice is not going to stop with introduction of varargs. Just
    look at EnumSet.of(...) series of methods! This kind of
    [unquestionably ugly] design even got into Tiger which already
    supposed to have varargs.
    Varargs break language clarity and consistency in too many places
    (overloaded method resolution is clearly getting out of hands). I
    doubt that varargs benefits justify their shortcomings.
    However, if customer demand for varargs-like facility is overwhelming,
    then, at least, consider alternatives that are not based on arrays.
    Array-based varargs (as in PRD) are especially devastating for future
    language evolution. A special interface or class shall be defined to
    pass varargs behind the scenes. For example, the following interface
    may be defined in "java.lang":
    public interface Indexed<T> extends Iterable<T> {
    public int size();
    public T get(int index);
    // Btw, java.util.List<T> can be retrofitted to implement Indexed<T>
    So, in "myMethod(T... arg)" the arg will actually have a type of
    "Indexed<T>" instead of "T[]".
    This solves a lot of issues! For example, it will become possible to
    define varargs based on generic types (which is not possible with
    array-based varargs).
    Moreover, when compiler creates code to call varargs method it may
    create an instance of a special class for chosen small number of
    arguments. It is obvious, that a special implementation of Indexed for
    one element will be always faster on modern HotSpot than a
    single-element array (although naive iteration with "foreach" facility
    will require extra Iterator object, but that can be fixed if needed by
    recognizing Indexed object as a special case in "foreach" statement).
    Performance will be on the side of array-based varargs when number of
    arguments is large, but something tells me that people who really need
    varargs and drive their inclusion into Java do not care about
    performance that much and will be perfectly Ok with extra object that
    implements Indexed interface and wraps underlying array for many
    argument cases.
    In conclusion I must stress that if the following is legal in the
    Java language (regardless of underlying implementation):
    void myMethod(MyClass... arg); // declaration
    myMethod(1, 2, 3); // call site
    Then the following must be also legal:
    MyClass... arg = 1, 2, 3;

  • Problem creating simple Script Object

    I have not been able to get this simple Script Object to work. It should be simple, but this is my first script object, and as I'm new to LS and JS I'm not very adept at writing JS (functions, variables, you name it).
    Would someone be so kind as to help me get this easy one down so I can study it and see where I went wrong?
    What this script object would do is call a function that checks the value of two check boxes. If one checkbox's value = 1 then the textstring "Male" gets written to the lower text box. If the other box's value = 1, then "Female" is written to the same box (and of course, Male is deleted)
    Thanks!
    Graham

    Hi Graham,
    Adobe Reader using the same JavaScript engine as used by Mozilla (called SpiderMonkey) and their website has a lot of information about learning and using JavaScript, https://developer.mozilla.org/en/JavaScript. Only problem is Mozilla has moved on to version 1.8.1 and I think Reader is still on 1.5, but they make it easy to work out what features are available in what version.
    Array literals are good if you aren't going to reuse them, maybe a better alternative would be to reference the captions of the checkboxes or radiobuttons.
    Bruce
    Writing ["", "MaLe", "FemaLe"] creates an array literal so I could have written something like;
    var 
    genders = new Array("", "MaLe", "FemaLe");
    var  gender = Number(Gender.rawValue);this.rawValue
    = genders[gender];

  • JScript to automatcally set Regarding on an appointment, possible?

    Hello,
    I have been trying to figure out how to accomplish this:
    I would like to on an appointment set the Regarding(regardingobjectid) field with the parent account of the contact (or account) selected to the Required (requiredattendees). The script would run on the OnChange-event of the required field.
    I am able to get the fields to polpulate with data that lies inside the current record but cannot quite figure out how to manage to get the data from the related record of the Required-field. Is it possible, surely it has to be?
    I have been looking into web pages on REST, I suppose that is the way to go, but as I said, I haven't managed to figure it out quite yet.
    Does anyone have links or tips that would help to figure this out?
    Br,
    Janne

    Dear Janne,
    Try below code :
    function SetRegardingObjectId () {
    var requiredattendees = Xrm.Page.getAttribute("requiredattendees");
    if(requiredattendees.getValue() !=null)
    var RequireAttendessType = Xrm.Page.getAttribute("requiredattendees").getValue()[0].entityType;
    if(RequireAttendessType =="contact")
    var serverUrl ;
    if(Xrm.Page.context.getClientUrl)//Post UR 12
    serverUrl = Xrm.Page.context.getClientUrl();
    else//Pre UR 12
    serverUrl = Xrm.Page.context.getServerUrl();
    var requiredAttendeesId = requiredattendees.getValue()[0].id;
    var ODataPath = serverUrl + "/XRMServices/2011/OrganizationData.svc";
    var oDataFilter ="/ContactSet?$select=ParentCustomerId&$filter=ContactId eq guid'" + requiredAttendeesId + "'";
    var userRequest = new XMLHttpRequest();
    userRequest.open("GET", ODataPath + oDataFilter , true);
    userRequest.setRequestHeader("Accept", "application/json");
    userRequest.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    userRequest.onreadystatechange = function () {
    if (this.readyState == 4) {
    if (this.status == 200) {
    var retrievedRecords = JSON.parse(userRequest.responseText).d;
    if(retrievedRecords.results.length > 0)
    var parentaccount = retrievedRecords.results[0];
    var lookup = new Array();
    lookup[0] = new Object();
    lookup[0].id = parentaccount.ParentCustomerId.Id;
    lookup[0].name = parentaccount.ParentCustomerId.Name;
    lookup[0].entityType = parentaccount.ParentCustomerId.LogicalName;
    Xrm.Page.getAttribute("regardingobjectid").setValue(lookup);
    userRequest.send();
    else
    var lookup = new Array();
    lookup[0] = new Object();
    lookup[0].id = requiredattendees.getValue()[0].id;
    lookup[0].name = requiredattendees.getValue()[0].name;
    lookup[0].entityType = requiredattendees.getValue()[0].entityType;
    Xrm.Page.getAttribute("regardingobjectid").setValue(lookup);

  • Mapping lookup up failure with input JavaBean with an array of strings

    To receive input data our Web service defines a JavaBean one element of which is
    an array of strings. When a test Java client calls the service method the call
    is completed successfully. When a Perl client calls the service method an exception
    is returned. If I understand BEA's Web service documentation, it isn't necessary
    to do development for the service specifically to enable correct processing of
    an array of strings.
    In our environment we are running WL 8.1 SP 1.
    Please review the problem documentation and explain to me the cause of the exception
    and what I must do to prevent it.
    Thank you.
    The exception:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception
    during processing: weblogic.xml.schema.binding.DeserializationException: mapping
    lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema context=TypedSchemaContext{javaType=java.lang.String}
    (see Fault Detail for stacktrace)</faultstring><detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"/>weblogic.xml.schema.binding.DeserializationException:
    mapping lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema
    context=TypedSchemaContext{javaType=java.lang.String}
         at weblogic.xml.schema.binding.RuntimeUtils.lookup_deserializer(RuntimeUtils.java:461)
         at weblogic.xml.schema.binding.SoapArrayCodecBase.getComponentDeserializer(SoapArrayCodecBase.java:574)
         at weblogic.xml.schema.binding.SoapArrayCodecBase.deserialize(SoapArrayCodecBase.java:285)
         at weblogic.xml.schema.binding.BeanCodecBase.processElement(BeanCodecBase.java:183)
         at weblogic.xml.schema.binding.BeanCodecBase.processAllElements(BeanCodecBase.java:165)
         at weblogic.xml.schema.binding.BeanCodecBase.processElements(BeanCodecBase.java:145)
         at weblogic.xml.schema.binding.BeanCodecBase.deserialize(BeanCodecBase.java:108)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:428)
         at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:328)
         at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:384)
         at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:458)
         at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
         at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
         at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:518)
         [more]
    The XML generated for the Perl client:
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getWorkOrdersByFilters
    xmlns:namesp1="ncr.com"><gIMServiceRequest xsi:type="ns:GIMServiceRequest" xmlns:ns="java:com.ncr.gim.bean.service"><applicationID
    xsi:type="xsd:string">REVLOG</applicationID><nodeId xsi:type="xsd:string">00XH</nodeId><stopCodes
    xsi:type="namesp2:array" SOAP-ENC:arrayType="xsd:string[2]"><xsd:string xsi:type="xsd:string">06</xsd:string><xsd:string
    xsi:type="xsd:string">16</xsd:string></stopCodes></gIMServiceRequest></namesp1:getWorkOrdersByFilters></SOAP-ENV:Body></SOAP-ENV:Envelope>
    The XML generated for a test Java client:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getWorkOrdersByFilters
    xmlns:m="ncr.com"><gIMServiceRequest xmlns:n1="java:com.ncr.gim.bean.service"
    xsi:type="n1:GIMServiceRequest"><CSRCode xsi:type="xsd:string">987x00</CSRCode><applicationID
    xsi:type="xsd:string">GIM</applicationID><incidentNbr xsi:nil="true"/><nodeId
    xsi:type="xsd:string">00T5</nodeId><stopCodes soapenc:arrayType="xsd:string[3]"><xsd:string
    xsi:type="xsd:string">00</xsd:string><xsd:string xsi:type="xsd:string">01</xsd:string><xsd:string
    xsi:type="xsd:string">02</xsd:string></stopCodes></gIMServiceRequest></m:getWorkOrdersByFilters></env:Body></env:Envelope>
    The JavaBean:
    public class GIMServiceRequest implements Serializable {
         private String applicationID = GIMConstants.UNKNOWN_APPLICATION_ID;
         private String nodeId = null;
         private String incidentNbr = null;
         private String CSRCode = null;
         private String[] stopCodes = null;
         public void setStopCodes(String[] aStopCodes) {
              stopCodes = aStopCodes;
         public String[] getStopCodes() {
              return stopCodes;
         [more]
    The service build.xml file:
    <project name="GIMService" default="all" basedir=".">
         <target name="all" depends="ear"/>
    <target name="ear">
    <servicegen
    destEar="GIMService.ear"
    contextURI="GIMContext" >
    <service
         ejbJar="GIMServiceEJB.jar"
         targetNamespace="ncr.com"
                        serviceName="GIMService"
                        serviceURI="/GIM_URI"
                        generateTypes="True"
                        expandMethods="True"
                        style="rpc"
                        protocol="http" >
              <client
                   clientJarName="GIMService_client.jar"
                   packageName="com.ncr.gim.gimservice.client" >
              </client>
    </service>
    </servicegen>
    </target>
    </project>

    Hi Jeff,
    Looks like the Perl client is using an older (deprecated) schema
    namespace "http://www.w3.org/1999/XMLSchema" that is causing this
    failure.
    Hope this helps,
    Bruce
    Jeff Carey wrote:
    >
    To receive input data our Web service defines a JavaBean one element of which is
    an array of strings. When a test Java client calls the service method the call
    is completed successfully. When a Perl client calls the service method an exception
    is returned. If I understand BEA's Web service documentation, it isn't necessary
    to do development for the service specifically to enable correct processing of
    an array of strings.
    In our environment we are running WL 8.1 SP 1.
    Please review the problem documentation and explain to me the cause of the exception
    and what I must do to prevent it.
    Thank you.
    The exception:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception
    during processing: weblogic.xml.schema.binding.DeserializationException: mapping
    lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema context=TypedSchemaContext{javaType=java.lang.String}
    (see Fault Detail for stacktrace)</faultstring><detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0"/>weblogic.xml.schema.binding.DeserializationException:
    mapping lookup failure. type=['http://www.w3.org/1999/XMLSchema']:xsd:string schema
    context=TypedSchemaContext{javaType=java.lang.String}
    at weblogic.xml.schema.binding.RuntimeUtils.lookup_deserializer(RuntimeUtils.java:461)
    at weblogic.xml.schema.binding.SoapArrayCodecBase.getComponentDeserializer(SoapArrayCodecBase.java:574)
    at weblogic.xml.schema.binding.SoapArrayCodecBase.deserialize(SoapArrayCodecBase.java:285)
    at weblogic.xml.schema.binding.BeanCodecBase.processElement(BeanCodecBase.java:183)
    at weblogic.xml.schema.binding.BeanCodecBase.processAllElements(BeanCodecBase.java:165)
    at weblogic.xml.schema.binding.BeanCodecBase.processElements(BeanCodecBase.java:145)
    at weblogic.xml.schema.binding.BeanCodecBase.deserialize(BeanCodecBase.java:108)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:428)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(RuntimeUtils.java:328)
    at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:384)
    at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:458)
    at weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:78)
    at weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)
    at weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:518)
    [more]
    The XML generated for the Perl client:
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:namesp2="http://namespaces.soaplite.com/perl"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:getWorkOrdersByFilters
    xmlns:namesp1="ncr.com"><gIMServiceRequest xsi:type="ns:GIMServiceRequest" xmlns:ns="java:com.ncr.gim.bean.service"><applicationID
    xsi:type="xsd:string">REVLOG</applicationID><nodeId xsi:type="xsd:string">00XH</nodeId><stopCodes
    xsi:type="namesp2:array" SOAP-ENC:arrayType="xsd:string[2]"><xsd:string xsi:type="xsd:string">06</xsd:string><xsd:string
    xsi:type="xsd:string">16</xsd:string></stopCodes></gIMServiceRequest></namesp1:getWorkOrdersByFilters></SOAP-ENV:Body></SOAP-ENV:Envelope>
    The XML generated for a test Java client:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><env:Header/><env:Body
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><m:getWorkOrdersByFilters
    xmlns:m="ncr.com"><gIMServiceRequest xmlns:n1="java:com.ncr.gim.bean.service"
    xsi:type="n1:GIMServiceRequest"><CSRCode xsi:type="xsd:string">987x00</CSRCode><applicationID
    xsi:type="xsd:string">GIM</applicationID><incidentNbr xsi:nil="true"/><nodeId
    xsi:type="xsd:string">00T5</nodeId><stopCodes soapenc:arrayType="xsd:string[3]"><xsd:string
    xsi:type="xsd:string">00</xsd:string><xsd:string xsi:type="xsd:string">01</xsd:string><xsd:string
    xsi:type="xsd:string">02</xsd:string></stopCodes></gIMServiceRequest></m:getWorkOrdersByFilters></env:Body></env:Envelope>
    The JavaBean:
    public class GIMServiceRequest implements Serializable {
    private String applicationID = GIMConstants.UNKNOWN_APPLICATION_ID;
    private String nodeId = null;
    private String incidentNbr = null;
    private String CSRCode = null;
    private String[] stopCodes = null;
    public void setStopCodes(String[] aStopCodes) {
    stopCodes = aStopCodes;
    public String[] getStopCodes() {
    return stopCodes;
    [more]
    The service build.xml file:
    <project name="GIMService" default="all" basedir=".">
    <target name="all" depends="ear"/>
    <target name="ear">
    <servicegen
    destEar="GIMService.ear"
    contextURI="GIMContext" >
    <service
    ejbJar="GIMServiceEJB.jar"
    targetNamespace="ncr.com"
    serviceName="GIMService"
    serviceURI="/GIM_URI"
    generateTypes="True"
    expandMethods="True"
    style="rpc"
    protocol="http" >
    <client
    clientJarName="GIMService_client.jar"
    packageName="com.ncr.gim.gimservice.client" >
    </client>
    </service>
    </servicegen>
    </target>
    </project>

  • Literal arrays 'in' SQL clauses

    Hi All,
    I need some help with sql syntax in BPM.
    I get the following error when I run my query: Only literal arrays are allowed 'in' SQL clauses
    Here is my SQL query:
    SELECT *
    FROM Laptop.Dbo.INVENTORY
    WHERE inventoryid in (SELECT MAX(Laptop.Dbo.INVENTORY.inventoryid)from Laptop.Dbo.INVENTORY)
    Anyone know how to write it in BPM?

    Hi Lilach,
    Sure you tried this, but are you doing this with Dynamic SQL? If you use the code below, be sure to make sure the SQL in quotes runs ok from Squirrel or Toad. If your tables / columns have underscore characters, make sure this is included in the SQL. Change the name of the "extResource" variable to match the string you used when exposing the database in Studio.
    String query = "SELECT * FROM Laptop.Dbo.INVENTORY " +
                         "WHERE inventoryid in " +
                         "(SELECT MAX(Laptop.Dbo.INVENTORY.inventoryid)from Laptop.Dbo.INVENTORY)";
    String extResource = "YourExternalResourceNameHere";
    // this only will return one row so it will enter to loop and immediately leave
    foreach (row in DynamicSQL.executeQuery(sentence : query, implname : extResource)) {
        display("Here's your returned value: " + row["inventoryid"]);
    }Dan

  • Document-Literal and Arrays - WSDL seems incorrect ??

    I have create a simple "document-literal" webservice that returns an object containing some simple fields and an array of another object.
    Task.cfc
    ===============================
    <cfcomponent>
       <cfproperty name="Id"        type="string">
       <cfproperty name="Priority"  type="numeric">
       <cfproperty name="StartTime" type="date">
       <cfproperty name="StopTime"  type="date">
       <cfproperty name="AOI"       type="VertexPoint[]">
    </cfcomponent>  
    VertexPoint.cfc
    ============================
    <cfcomponent>
       <cfproperty name="Latitude"  type="numeric">
       <cfproperty name="Longitude" type="numeric">
       <cfproperty name="Altitude"  type="numeric">
    </cfcomponent>
    My webservice returns a Task object
    <cfcomponent  style="document">
       <cffunction name="getTask" returnType="Task" access="remote" output="false"> 
       </cffunction>
    </cfcomponent>
    When I look at the generated WSDL is see the following complexTypes:
    NOTICE THE name="item" IN THE COMPLEXTYPE ArrayOf_xsd_anyType.
    <complexType name="VertexPoint">
       <sequence>
          <element name="Altitude" nillable="true" type="xsd:double"/>
          <element name="Latitude" nillable="true" type="xsd:double"/>
          <element name="Longitude" nillable="true" type="xsd:double"/>
       </sequence>
    </complexType>
    <complexType name="Task">
       <sequence>
          <element name="AOI" nillable="true" type="tns1:ArrayOf_xsd_anyType"/>
          <element name="Id" nillable="true" type="xsd:string"/>
          <element name="Priority" nillable="true" type="xsd:double"/>
          <element name="StartTime" nillable="true" type="xsd:dateTime"/>
          <element name="StopTime" nillable="true" type="xsd:dateTime"/>
       </sequence>
    </complexType>
    <complexType name="ArrayOf_xsd_anyType">
       <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="item" type="impl:VertexPoint"/>
       </sequence>
    </complexType>
    When I look at the XML/data returned when I call the webservice it is:
      <getTaskResponse xmlns="http://users">
       <getTaskReturn>
        <AOI>
         <AOI xsi:type="ns1:VertexPoint" xmlns:ns1="http://users">
          <Altitude>1.0</Altitude>
          <Latitude>1.0</Latitude>
          <Longitude>1.0</Longitude>
         </AOI>
         <AOI xsi:type="ns2:VertexPoint" xmlns:ns2="http://users">
          <Altitude>2.0</Altitude>
          <Latitude>2.0</Latitude>
          <Longitude>2.0</Longitude>
         </AOI>
        </AOI>
        <Id>1</Id>
        <Priority>99.0</Priority>
        <StartTime>2009-10-15T06:00:00.000Z</StartTime>
        <StopTime>2009-10-17T05:59:59.000Z</StopTime>
       </getTaskReturn>
      </getTaskResponse>
    Shouldn't the tags be
    <AOI>
         <item>
         </item>
         <item>
         </item>
    <AOI>
    I am trying to access this WS from a java client and the AOI is always null
    Any help would be greatly appreciated.  (BTW - If I use "rpc" WS everything work fine)

    repost.....

Maybe you are looking for

  • Can i Use The Apple Wired Keyboard With Camera Connector Kit

    Can i Use The Apple Wired Keyboard With Camera Connector Kit 3g 64gb verizon

  • Rollover menu in Flash Catalyst

    Hi, I want to make a rollover menu in Flash Catalyst. That means, that I have a "select language" PSD and a "German and Enlish" PSD. When I transform the "Select language" PSD into a Button and put the second graphic into the state "over", then the m

  • Displaying hard drive in finder

    In some MacBook Pros and iMacs,I don't get the icon for the hard drive at the top right of the desktop, while in others I do.  What settings do I need to change so the drive shows?

  • Help: Screeching noise during games, VoIP (X-Fi Pla

    I'm currently having annoying screeching noises emit from whatever speaker/headset I plug into my X-Fi Platinum, during games, using VoIP such as Ventrilo, and consistently when I alt-tab back to desktop. I have reinstalled and reseated the X-FI card

  • STS question, what would you answer. NO STS employees pls!

    You have written a procedure that checks for the existence of students registered for a course. This code must be executed whenever a course is deleted. Which type of trigger should be used to call this procedure? Key trigger Mouse trigger Validation