Passing data through parameters or return?

Here are too samples:
void doStuff (String s)
void String doStuff()
}they both pass a String to the caller, but I found they are totally different. Can anyone give me some idea about it?

Let me take a whack at this. I think the original poster got hamstrung because his example data type was
immutable (String). Consider the simple mutable type java.awt.Rectangle which has public int fields x, y,
width and height. Now consider two or three way to write a method that supplies the caller with rectangle
data:
public Rectangle getBounds1() {
    int x = calculation...
    int y = calculation...
    int w = calculation...
    int h = calculation...
    return new Rectangle(x, y, w, h);
public void getBounds2(Rectangle r) {
    int x = calculation...
    int y = calculation...
    int w = calculation...
    int h = calculation...
    r.setBounds(x, y, w, h);
public Rectangle getBounds3(Rectangle r) {
    int x = calculation...
    int y = calculation...
    int w = calculation...
    int h = calculation...
    if (r == null)
        r = new Rectangle(x, y, w, h);
    else   
        r.setBounds(x, y, w, h);
    return r;
}There are examples of these variations in the API, for example java.awt.Component has getBounds
methods that are version 1 and 3 here. My rule of thumb is to keep it simple: go with getBounds1. The
other two allow you to avoid constructing temporary rectangles, but construction is cheap these days.

Similar Messages

  • "secured by passing data through LWAPP tunnels."

    Hi,
    The WLC v4.1 Config Guide says,
    "all Layer 2 wired communications between
    controllers and lightweight access points are secured by passing data through LWAPP tunnels."
    Is it correct that this is only true for the LWAPP Control channel which is encrypted - the LWAPP Data channel is in clear text which WireShark has no problem parsing, right?
    Regards, MH

    Only LWAPP control message payloads are encrypted. As you've stated however LWAPP data payaloads are not encrypted as the wired network is assumed to be relatively secure (compared to wireless).
    Additional Reference Appendix B in this document:
    http://www.cisco.com/en/US/netsol/ns340/ns394/ns348/networking_solutions_white_paper0900aecd805e0862.shtml

  • How to pass dates as parameters in GO URL?

    Hi,
    Can we pass date values as parameters in GO URL?
    I have a date column in my source report that I would like to pass as filter parameter to target reports via GO URL. Could you please let me know the correct syntax if this is possible?

    How can i convert the CHAr to date in the target?? I am using the below syntax and it is receiving a value of 20-JUL-2011.
    '<a href="http://sunt2000-10.wfs.com:9704/analytics/saw.dll?GO&path=/shared/WFS%20Financials/WFS%20Business%20Aviation/WFS%20Business%20Aviation%20Retail%20Volume&Action=Navigate&P0=1&P1=eq&P2="WFS%20Day%20Date"."Calendar%20Date"&P3=' || CAST("WFS Day Date"."Calendar Date" AS CHAR)  || ' ">QTY(USG)</a>'
    I need to convert this as a DATE when navigating to a different page to pass as a parameter.

  • Passing date over parameters

    Dear all,
    I have created a report which consists of 3 sub reports. All three sub reports uses different date fields from different tables (though the database is the same). The main report uses its own date field which is from another table.
    So, there are 4 reports in all
    Main Report takes date field from table A
    Sub Report 1 takes date field from table B
    Sub Report 2 takes date field from table C
    Sub Report 3 takes date field from table D
    Now when I run the main report, it asks me to input dates 4 places (total of 8 places where I have to replicate same date each time I run the report.
    Now to over come this I linked the Date parameters of the main report with the date fields of the sub reports.The problem occurs when the results are shown.
    All of the results are incorrect except the main report results.
    I am wondering how can I pass dates which I have entered into the main report parameter field to all sub report fields so that I don't have to enter dates 8 times each time I open a report.
    Here is the record selection formula for main report date field
    ({foccredsum.date_created} in {?Start Date} to {?End Date})
    Now for the sub reports the date fields are different.
    How can I integrate the date parameters?
    Regards
    Jehanzeb

    Hi J,
    Try the following :
    --Delete all Sub report parameters which you have created
    --Create From and To date parameters in Main report.
    --Place sub report and edit sub report links and select main report From parameter and link to sub report date field.
    Note : If you are not finding sub report date field while linking main report parameter then check the main / sub report date datatype.  (Both should have either Date or DateTime data type)
    --Please go in sub report and go in Record selection and check whether the parameter is filtering correct date or not.
    I think, in your case all date fields are not Date or DateTime.
    Hope this helps you
    Regards,
    Sastry

  • Passing data through address bar

    hi all,
    I am implementing a forum application on the java studio creator, and Iam having a problem in getting data from the address from page to page.
    The problem is that i have a table containes records of table "data IDs" when you click on the data Id it will take you to another page and show you the data complete. Iam passing Data Id in the address bar, how could i get it in the other page.
    Best Regards.

    Hi,
    Please go through the tutorial named "Sharing Data Between Two Pages". This is available at:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    Hope this helps
    Cheers
    Giri

  • Passing data through TCP/IP

    Hello ! My challenge is this: I have a vi that i have to use as a server and a vi as a client. In the server vi, i want to modify multiple parameters of one graph and these modifications should reflect on the client vi. How can i transmit, through TCP/IP, the modified graph to the client vi/application ? I would appreciate very much a link or a example vi that can show me exactly how such an opperation can be achieved. Thank you!

    You can make the string you pass include any data.  Here is a simple example using an XML string.
    <Graph>
    <Value>1,2,3,4,5,6</Value>
    <Visible>True<\Visible>
    </Graph>
    Send this string on the server side taking a reference to a graph and build a simple vi to generate a string containing  the data you want to send.
    At the client side you parse this string an a loop as set the appropriate property node as the tag dictates.
    I cant think of a precanned solution for this but my morning coffee has not kicked in yet.
    Paul 
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Passing date range parameters in MDX Query

    Following is my mdx query
    SELECT NON EMPTY
        [Measures].[Cache Attendees Count]
    ON COLUMNS,
    NON EMPTY
        ([Cache Attendees].[Visit Id].[Visit Id].ALLMEMBERS *
        [Cache Attendees].[User Id].[User Id].ALLMEMBERS *
        [Cache Attendees].[Screen Name].[Screen Name].ALLMEMBERS *
        [Cache Attendees].[User Type Id].[User Type Id].ALLMEMBERS *
        [Cache Attendees].[User Type Name].[User Type Name].ALLMEMBERS *
        [Cache Attendees].[Group Date Count].[Group Date Count].ALLMEMBERS *
        [Cache Attendees].[Insert Time Stamp].[Insert Time Stamp].ALLMEMBERS )
        DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM
        SELECT
                STRTOMEMBER(@FromCacheAttendeesInsertTimeStamp) : STRTOMEMBER(@ToCacheAttendeesInsertTimeStamp)
            ) ON COLUMNS FROM (
            SELECT
                STRTOSET(@CacheAttendeesConferenceId) ) ON COLUMNS FROM [Cube_Attendee])
            WHERE ( IIF( STRTOSET(@CacheAttendeesConferenceId).Count = 1, STRTOSET(@CacheAttendeesConferenceId), [Cache Attendees].[Conference Id].currentmember ) )
    CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
    I want to filter my cube with three parameters
    1. @CacheAttendeesConferenceId
    2. @FromCacheAttendeesInsertTimeStamp
    3. @ToCacheAttendeesInsertTimeStamp
    When i pass following parameters
    ConferenceId = 1, StartDate='2010-01-28T00:00:00', EndDate='2010-02-03T00:00:00'
    Then it show records
    But When i pass following parameters
    ConferenceId = 1, StartDate='2010-01-27T00:00:00', EndDate='2010-02-03T00:00:00'
    Then it display message No Data Available
    PLease help me on this issue why not FromDate & ToDate range works properly.

    Step1:- First i create a SSAS datasource. Then i create a cube for my table CacheAttendees.
    It has following columns:-
    [Cache Attendees].[Conference Id]
    [Cache Attendees].[Group Date Count]
    [Cache Attendees].[Insert Time Stamp]
    [Cache Attendees].[Screen Name]
    [Cache Attendees].[User Id]
    [Cache Attendees].[User Type Id]
    [Cache Attendees].[User Type Name]
    [Cache Attendees].[Visit Id]
    Step2:- Then i create a dimension with this cube with all columns.
    Step3:- Then i deploy my SSAS project.
    Step4:- Use SSAS datasource in my SSRS datasource.
    Step5:- Create a report with chart control. Add a parameter ConferenceId. Set default to 1. When i preview my report then it show Cache Attendees].[Conference Id].[1] in header of report instead of that, When i pass the parameter value as 1 then report cannot show & throw an error. I want to pass this parameter at runtime.
    Step6:- Please help me how is it possible to pass parameter at runtime.

  • Retriving data through stored procedure returning Table of object type

    I am trying to retrieve the data returned as a table(secret_tab_type) of object type(secret_type). Now we can get the secret_tab_type table through
    rset = (ResultSet) cstmt.getObject(1); but how to map the SQL object type to Java object type ??
    FUNCTION Fetchthat(
    secretinfo      out      SECRET_TAB_TYPE,
    message     OUT varchar2
    ) return number;
    These are the declaration of secret_type object and secret_tab_type(table returned by fetchthat procedure)
    create or replace type secret_type as object
    (secret_id number(3),
    secret_question varchar2(100),
    valid_flag char);
    create or replace type secret_tab_type as table of secret_type;

    Amit,
    Your question has been previously asked (and answered) on this forum. I suggest searching this forum's archives for the terms STRUCT and ARRAY.
    For your benefit, here are the results of my search:
    http://tinyurl.com/auvl8
    Good Luck,
    Avi.

  • Problem in passing date through hyperlink reports in Linux version(CRS2008)

    Hi,
    How to pass value of a date paramater through hyperlink(open doc) from main report to target report(clicking on hyperlink )
    thanks in ADVANCE

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Passing data through connect().

    Hi, I found this example of a lobby in my flash media server book. But there's a little issue...
              var nc:NetConnection;
              var rtmpNow:String;
              var userName:String;
              var users_so:SharedObject;
              var connectName:DataProvider;
              nc=new NetConnection();
              rtmpNow="rtmp://localhost/userlist/roomlist";
              nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect);
              button.addEventListener (MouseEvent.CLICK,addName);
              connectName=new DataProvider();
              function addName (e:MouseEvent)
                   nc.connect (rtmpNow,textInput.text);
              function listPlace (e:SyncEvent)
                   list.dataProvider=connectName;
                   list.removeAll ();
                   for (var uName:String in users_so.data)
                   {//no uName found.
                         if (users_so.data[uName] != null)
                              connectName.addItem ({label:users_so.data[uName]});
              private function checkConnect (e:NetStatusEvent)
                   if (e.info.code == "NetConnection.Connect.Success")
                         button.label="Connected";
                         users_so=SharedObject.getRemote("users_so",nc.uri,false);
                         users_so.addEventListener (SyncEvent.SYNC,listPlace);
                         users_so.connect (nc);
    When I press "connect", the name in textInput.text normally will be passed and added to the list under the button. But the list stays empty and textInput.text isn't passed. Does anyone know a solution?
    Really thanks,
    Thomas

    Hi,
    The list is displayed empty because, you are populating the list with the value of the shared object's properties. Since you have not set any property in the code its displaying empty.
    Regards,
    Manish.

  • Passing data through webservices.

    Hi All,
    I have two doubts.
    1. Can we call a webservice without calling creating an ABAP Proxy?
    2. If yes how can i pass my internal table through webservice.
    any code snippet or wiki link regarding this will be very helpful.
    TIA
    Vikash Singh

    Hi Vikash,
    Go through the below link, it has a simple example which will help you,
    just search for "Calling a web service in ABAP that validates an email id" and click on the link of saptechnicaldotcom
    or try this
    http://help.sap.com/saphelp_nw70ehp2/helpdata/EN/1f/93163f9959a808e10000000a114084/content.htm
    Also, for transforming your internal table into XML, you can use the below piece of code
    CALL TRANSFORMATION ID  
       SOURCE root = ITAB
       RESULT XML xml_string.
    And you can pass the XML_STRING as input to the "CREATE_BY_URL_METHOD".
    But the XML_STRING will need to be in the format that the service can understand, you might have to modify it accordingly.
    Regards,
    Chen
    Edited by: Chen K V on Apr 26, 2011 1:04 PM
    Edited by: Chen K V on Apr 26, 2011 1:07 PM

  • Passing data acqusition parameters from Measure to Excel

    How do I automatically insert the number of points and frequency from the Measure setup screen (DAQ-700) into the spreadsheet?
    If I don't do it manually, there is no way to determine these parameters from the single column of data placed by Measure in the worksheet.
    Tony Gozdz

    Tony,
    Thanks for the suggestion. Usually we suggest that whenever customers want to customize their acquisition in any way, they use one of our more powerful, robust development tools like LabVIEW or Measurement Studio. With LabVIEW, sending DAQ data to a database, along with the acquisition parameters, is a piece of cake, particularly with the new "Waveform" datatype in LabVIEW 6i.
    Anyway, good luck with your application, and have a great day.
    Darren N.
    P.S. - I got your voicemail, but only after I answered your discussion post...so don't worry, I got it.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Error when passing data through Business connector

    Dear all,
    we are getting below exception in BC trace while connecting to the remote url through SAP BC. Please guide us how to solve this problem.
    java.lang.RuntimeException: iaik.security.ssl.SSLCertificateException: Peer certificate rejected by TrustDecider
         at com.wm.pkg.sap.rfc.ListenerCallHandler.handleRequest(ListenerCallHandler.java:516)
         at com.sap.conn.idoc.jco.DefaultJCoIDocServerWorker$IDocDispatcher.handleRequest(DefaultJCoIDocServerWorker.java:72)
         at com.sap.conn.jco.rt.DefaultServerWorker.dispatchRequest(DefaultServerWorker.java:141)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.dispatchRequest(MiddlewareJavaRfc.java:2621)
         at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcServer.listen(MiddlewareJavaRfc.java:1919)
         at com.sap.conn.jco.rt.DefaultServerWorker.dispatch(DefaultServerWorker.java:258)
         at com.sap.conn.jco.rt.DefaultServerWorker.loop(DefaultServerWorker.java:320)
         at com.sap.conn.jco.rt.DefaultServerWorker.run(DefaultServerWorker.java:219)
         at com.wm.util.TimeWrappingProvider$TimeMesuredTask.run(TimeWrappingProvider.java:40)
         at com.wm.pkg.sap.rfc.ListenerThread.run(ListenerThread.java:70)
    Caused by: iaik.security.ssl.SSLCertificateException: iaik.security.ssl.SSLCertificateException: Peer certificate rejected by TrustDecider
         at com.wm.app.b2b.client.Context.invoke(Context.java:1290)
         at com.wm.app.b2b.client.Context.invoke(Context.java:1106)
         at com.wm.app.b2b.client.Context.connect(Context.java:764)
         at com.wm.app.b2b.client.Context.connect(Context.java:706)
         at wm.server.remote.checkConnection(remote.java:888)
         at wm.server.remote.checkConnection(remote.java:861)
         at wm.server.remote.invoke(remote.java:397)
         at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:310)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:699)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:496)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:468)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:574)
            at com.wm.app.b2b.server.Service.doInvoke(Service.java:499)
         at pub.JSBC_remote.invoke(JSBC_remote.java:34)
         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:585)
         at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:310)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:699)
         at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:147)
         at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:279)
         at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:556)
         at com.wm.lang.flow.FlowState.step(FlowState.java:427)
         at com.wm.lang.flow.FlowState.invoke(FlowState.java:397)
         at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:972)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:699)
         at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:481)
         at com.wm.app.b2b.server.Service.doInvoke(Service.java:590)
         at com.wm.pkg.sap.rfc.ListenerCallHandler.handleRequest(ListenerCallHandler.java:454)
         ... 9 more
    Thanks and Regards,

    Dear sandeep,
    Thank you very much for your fast response.
    We have alredy downloaded certificate given by the other party and configured in BC.We are able to get the response from a from third party from url separtely from internet explorer.while executing by using service we are getting the above exception.
    Please give us some inputs on this issue.
    Thanks and  Regards,
    Edited by: chandra madapati on Dec 30, 2008 1:28 PM

  • WRE54G V2 connects with network, appears to work, but won't allow devices to pass data through

    This is the number one problem I've had with the WRE since I got it several months ago.....
    I originally set it up exactly in line with the instructions.....I turned off my WEP to prevent security issues at the start....
    My WRE starts up, red lights, then blue lights, then solid blue lights....All appears perfect....
    That is, until I attempt to use my PDA (HP 27XX) running Windows Mobile 5.....It just won't connect via the WRE......I have to unplug the WRE, then the PDA will connect, no problem, although with a weak signal......
    My laptop running a DLink wireless card will connect via the WRE, so I know it works!.....
    I have 3 PDA's....all HP, a 24XX, and 2 27XX models....all 3 won't connect through the WRE.....
    My Zune also won't connect via the WRE.....not sure why?....
    Any ideas?.....

    O.k.....I set it up as instructed.....No Go.....not even the Laptop would connect through it this time around.....
    The WRE appears in the "site survey", but nothing will connect to it or through it.....it acts like a VERY EFFECTIVE jammer!.....
    I'm surprised the "underground" hasn't discovered just how easy it is to use this as a network jammer.....
    Since I've owned mine, I'm guessing it's only worked 10 to 15% of the entire time....and NEVER with a PDA or ZUNE.......
    Please don't give up on me though, I really do appreciate and need tips and advice getting this thing to work......

  • Binding a report to data passed in as parameters

    How do I build a report that is not bound to any datasource at design time? When invoking through a URL I want to pass the data as part of the query string and I want that to appear as part of the report. How can I do it?
    thanks
    Srinivas

    If you are saying that you want to create the query to execute at runtime then you can use lexical parameters.
    At design time you create a user parameter "P_myQuery" with a default value of "select ename from emp" and then create a query whose only content is "&P_myQuery". You can then change the query completely at runtime.
    Now, if you want to pass data through at runtime, you either have: Single values that you want do display or rows of data.
    For single values you can create a report with no queries and just display the user parameters directly.
    For rows of data that you want to pass in, you can either create a dynamic query using the lexical method described above; insert the values into a table in the before report trigger and query them back or use one of the Text/XML pluggable datasource to retieve the values through a URL.

Maybe you are looking for