How to implement Enum (like in c)

Hi !
I want to modify some values using enum, like in c.
How can I do it ?
Example: authorization = enam {trainee, trainer, supervisor}
10x

Actually I just tracked down that article a few
minutes ago:
http://developer.java.sun.com/developer/Books/shiftinto
ava/page1.htmlGood article, expecially as it covers the "readResolve()" topic.
Martin

Similar Messages

  • How to implement Excel like functionality using Table?

    I have a requirement to implement excel like functionality in a table, i.e when I update the amount in the first row and tab out, the values in the rows below should get affected.
    Could any one suggest idea how to get this done?

    Hi Timo,
    Thanks for your Reply.
    Can you please provide the code for capturing the key stroke in java script and queue it in the server and calling only the adf data table values from it.
    Thanks And Regards,
    Lovenish Garg
    Edited by: lovenish on 21-Jan-2011 04:25

  • How to implement installer like yahoo/Google toolbar in C/C++/MFC

    Hello All,
    I want to implement installer like yahoo/google toolbar in C/C++/MFC that get install on users internet browser and i am new to MFC and i ultimate aim is after implement that toolbar application in mentioned language then i want call that application through java using JNI technology.
    Hope u understand and problem because i am new to develop installer kind of thing.
    and sorry if i posting my problem on wrong forum.
    thanks and regards
    Vinay Suryawanshi

    Only1Vinay wrote:
    Hello All,
    I want to implement installer like yahoo/google toolbar in C/C++/MFC that get install on users internet browser and i am new to MFC and i ultimate aim is after implement that toolbar application in mentioned language then i want call that application through java using JNI technology.
    Hope u understand and problem because i am new to develop installer kind of thing.
    and sorry if i posting my problem on wrong forum.I hope you understand that your question isn't related to Java. Ask in a windows programming forum.
    Kaj

  • How to implement bundle-like mechanism in Arch Linux

    I like Chakra's bundle system and I want to make it in Arch.
    I heard that bundle system is just a separate file system(like loop? I am not sure).
    Can you give some details?
    However, I think there must be some reasons that Arch does not implement such a convenient tool as bundle system.
    I want to hear about these reasons.
    Thank you.

    If you go back more in the history behind Chakra, how it came to live, you might know, it started bc of a desire to do another split.  That one was for KDE, resulting in KDEmod, which was fully accepted by Arch, a few years after, and is currently the way KDE is build in Arch too (KDE being split in multiple packages).
    While Chakra was just Arch + KDEmod, more and more users stated, there was a desire to split toolkits too.  Have a system that was either based on GTK, and for Chakra users, a system base on just Qt/KDE.  When the late Chakra founder Jan Mette called the meeting in February 2010 the discuss the plans for a full split from Arch, this desire expressed by many users was one of the driving factors for his decision.
    To have a fully functioning distro, and doing something this different, the discussion included finding some MacOS way of including some of the most well known, and revered Linux apps, that were GTK based.  That is how the idea of bundles came to fruit.
    At the start, a few hundred packages had either makedeps  or full dependency to gtk2, so it was left up to the user to install those apps, though the ISO's were gtk free.
    Once the bundles became more functional, and included all those most well known and revered Linux apps, the majority of the gtk apps were removed (slowly) from all repo's.  Plus in the good 2 years since, many apps/libs have been stripped of gtk, since many apps are build to function on both gtk and qt based systems, though they do not need the gtk libs at all to work just fine on a qt based system.  To remove gtk libs/functions from one app, makes very little difference, for ten, it is not a big difference, but you repeat it over a hundred times.....
    GTK is still in the repo's, and probably will stay there.  Users who do not want to stay gtk free have added many such apps in ccr, and as a service to them, it is nice to not have to compile gtk.  Plus there is no real solid substitute yet for flash, again as a service, it is still an option.  The bundle buildsystem also draws from the repo's, if a certain lib/app is set to draw from there during the bundle process, that is another reason gtk/gtk-apps are still in the repo's.
    As Allan states, downloading multiple bundles, will download multiple instance of a highly compressed gtk (or other lib/app).  This is ofc a draw back for bundles, but again, a well thought out, and chosen draw back.  Users who need more then 4-5 bundles, should really rethink using a distro that made the choice to see if a distro can be fully functional, when splitting toolkits.  Those users can install their needed apps from ccr, or perhaps should choose another distro.  But to have an application not needing a rebuild/break bc of a .so update is a big plus.  When libreoffice was not stripped of it's gtk deps, it was one of those bundles.  It included all, and one such bundle still runs perfectly on one of my installs, it was build February 2011 (granted, I'm using this one as a test case for bundle longevity).
    For those who do not need but 3-5 bundles, there is no gtk installed (takes more room, then downloading it in compressed form a few times).  And many bundles do contain more then one gtk app (GIMP bundle includes xsane for example, chromium includes flash, google-talkplugin, pdf plugin), so as an example in my case, I run one bundle almost all the time, and it brings me the only 3 gtk apps I need and I my installs are gtk free.  Btw, all bundled browser include the flashplugin.
    But bundles are not just for gtk, Skype is another example for bundle use.  This app brings in about 50 lib32 packages, if you are on x86_64, why install all those for just one app?  Some will state, it makes no difference, don't care to have a lot of extra libs installed, some will prefer to keep a more "clean" system.  Chakra goes with the latter.
    Since the bundle process can draw from the repo's, or build all needed packages in that system, in any setting chosen, any security update is no extra work, then any other rebuild.  That security update was either done in the regular repo's, all needed then is rebundle all included apps (the final bundle process, squash them, etc, takes about 40 secs), or if the apps is not in the repo's, just that one is rebuild/adjusted in the bundle system, and again, bundled with the rest of the existing packages included in that particular bundle.
    To address as a final note, the point made, you can't be bleeding edge bc of bundles.  I'll give the example of the gimp-dev bundle.  It needed the latest babl, gegl, much newer glib2, gtk2 (and more from that stack) then was in the repo's.  All those were updated in the bundle system (though not a visible repo, the bundle build system has some 200-250 packages at most times), tested and ran successfully for many users, and always making the latest dev version available for gimp, until the final release this week.  Since all glib2 updates were tested in this bundle for quite some time, when it was time for this update in the regular repo's, it was a simple and quick update for the whole stack.
    Bundles are not perfect at this stage, far from it, there are still many plans to improve on the whole system, but for something that is in use just 1 1/2 years, it truly is a viable option to have a system running on a single tooolkit.
    To address a question posted while writing this.  Chakra uses testing repo's a lot too.  Bundles are fully rolling, always the latest available, just like the apps and games repo in Chakra.
    Last edited by abveritas (2012-05-04 18:17:43)

  • How to implement table like structure in MIDP?

    I am a starter of midp, and now need to implement something using MIDP 1.0.
    I would like to know can I have table like structure in MIDP, just like HTML; or I can only work with List/Form (one dimension display). I can't find related information at api doc come with wireless toolkits

    not really knowing what you want to acomplish I have this suggestion: check Mobile Information Device Profile (JSR-37) at http://www.jcp.org/aboutJava/communityprocess/final/jsr037/index.html . This might shed more light on applicable classes/methods/interfaces within MIDP 1.0.

  • How to implement language like in SDN?

    Hi,
    I'm interested in changing language similar as the language setting in SDN i.e. The language option on top right hand corner, next to Log Off. Anyone know how to accomplish this?
    Thanks,
    Iwan

    Björn,
    I posted the solution in the same thread on Sept. 20, 2006, I'm not sure why you can't see the solution. Did you read the whole thread? I did not mentioned any servlet filter at all in the solution. I went that approach and got help from Darrell (forgot his last name) from SAP. The solution he provided me was way over my head and got another solution that works for me and I posted this in this thread on Sept. 20 so if someone have the same problem will be able to use this solution.
    The meat of the solution:
    When you create a resource file, SAP by default create this file under localization folder. We need to move this file to private/classes folder instead. This way, when we use a new Locale and get the resource bundle for that new local, the resource file can be found.
    The following is my post which you can see it as separate post in this thread as well.
    Start of duplicate posting -
    FYI, found the solution.
    I put the properties file in private/classes instead in localization, and then user ResourceBundle and Locale combo.
    Locale myLocale = new Locale("es","CO");
    ResourceBundle resc = ResourceBundle.getBundle("label",myLocale);
    response.write(resc.getString("text1"));
    This will pick up your assign Locale instead of portal/component Locale."

  • How to implement the Export to Excel funtionality in VC like in Webdynpro

    Hi
    I have requirement to display the BAR charts, Pie charts ,Line graphs based on the data retreiving from the R/3 thorgh VC.
    I hope it is possible .
    i have requirement like exporting the data whichis pulled from the R3 to display those charts, this data need to be exported to the Excel sheet by providing the button in VC. Like same way we have the privision in WEbdynpro exporting table data to excell sheet.
    How to implement the same thing in VC,
    Can any body help me
    Regards
    Vijay

    1) yes, it's possible
    2) Another one that's in the Visual Composer WIKI:
    https://wiki.sdn.sap.com/wiki/display/VC/Exportingdatafrom+VC

  • How to implement a back functionally like the back of the browser

    Hi, I have a commandImageLink("go back") in a template jspx. How to implement the back functionally like the back of the browser with a managed bean method??. For know I m not using task flows.

    I think you can use a javascript method to go back to the previous browser page.
    http://javascript.about.com/library/blback.htm
    http://www.pageresource.com/jscript/jhist.htm
    http://www.w3schools.com/jsref/met_his_back.asp
    Perhaps you find something useful and related to backing beans here:
    http://adfdevelopers.blogspot.com/2009/04/some-handy-code-for-backing-beans-adf.html
    NA
    http://nickaiva.blogspot.com

  • Implement enum in java

    I need help in implementing enums in java.
    I am using java 1.4.2
    I want to implement enum inside my public class.
    Any pointers....
    Thanks
    Cheers

    thanks for the responses...
    dont have much control over java version...achieved
    this using static final int
    thanks
    cheersI strongly recommend you buy this book. Not only does it tell you how to implement typesafe enums, it's chock-full of very useful tips and the like, that if you pay attention to will make you a better programmer

  • How to implement Tool TIP in Table Control

    Hello Everyone,
    Can you please tell me how to implement a tooltip messages in table control columns.
    The Tooltip contains a simple message like "Doublde click on column.
    Thanks in advance.
    Edited by: Suruchi Razdan on Jun 6, 2011 7:57 AM

    Hello,
    In table Control->first Header Row has chance to maintain the Tooltip option.
    In table control columns maintain Double click options in attributes .
    Regards,
    Praveen

  • How to implement table in applet

    hi friends
    i have no idea ,how to implement tables in awt for applet can u suggest way to solve my problem.im using jcreator to implement my project.

    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=783376
    You already got plenty of answers. Why do you ask again? Didn't you like the answers?

  • How to implement Strategy pattern in ABAP Objects?

    Hello,
    I have a problem where I need to implement different algorithms, depending on the type of input. Example: I have to calculate a Present Value, sometimes with payments in advance, sometimes payment in arrear.
    From documentation and to enhance my ABAP Objects skills, I would like to implement the strategy pattern. It sounds the right solution for the problem.
    Hence I need some help in implementing this pattern in OO. I have some basic OO skills, but still learning.
    Has somebody already implemented this pattern in ABAP OO and can give me some input. Or is there any documentation how to implement it?
    Thanks and regards,
    Tapio

    Keshav has already outlined required logic, so let me fulfill his answer with a snippet
    An Interface
    INTERFACE lif_payment.
      METHODS pay CHANGING c_val TYPE p.
    ENDINTERFACE.
    Payment implementations
    CLASS lcl_payment_1 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                 
    CLASS lcl_payment_2 DEFINITION.
      PUBLIC SECTION.
      INTERFACES lif_payment.
      ALIASES pay for lif_payment~pay.
    ENDCLASS.                   
    CLASS lcl_payment_1 IMPLEMENTATION.
      METHOD pay.
        "do something with c_val i.e.
        c_val = c_val - 10.
      ENDMETHOD.                   
    ENDCLASS.                  
    CLASS lcl_payment_2 IMPLEMENTATION.
      METHOD pay.
        "do something else with c_val i.e.
        c_val = c_val + 10.
      ENDMETHOD.  
    Main class which uses strategy pattern
    CLASS lcl_main DEFINITION.
      PUBLIC SECTION.
        "during main object creation you pass which payment you want to use for this object
        METHODS constructor IMPORTING ir_payment TYPE REF TO lif_payment.
        "later on you can change this dynamicaly
        METHODS set_payment IMPORTING ir_payment TYPE REF TO lif_payment.
        METHODS show_payment_val.
        METHODS pay.
      PRIVATE SECTION.
        DATA payment_value TYPE p.
        "reference to your interface whcih you will be working with
        "polimorphically
        DATA mr_payment TYPE REF TO lif_payment.
    ENDCLASS.                  
    CLASS lcl_main IMPLEMENTATION.
      METHOD constructor.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD set_payment.
        IF ir_payment IS BOUND.
          me->mr_payment = ir_payment.
        ENDIF.
      ENDMETHOD.                  
      METHOD show_payment_val.
        WRITE /: 'Payment value is now ', me->payment_value.
      ENDMETHOD.                  
      "hide fact that you are using composition to access pay method
      METHOD pay.
        mr_payment->pay( CHANGING c_val = payment_value ).
      ENDMETHOD.                   ENDCLASS.                  
    Client application
    PARAMETERS pa_pay TYPE c. "1 - first payment, 2 - second
    DATA gr_main TYPE REF TO lcl_main.
    DATA gr_payment TYPE REF TO lif_payment.
    START-OF-SELECTION.
      "client application (which uses stategy pattern)
      CASE pa_pay.
        WHEN 1.
          "create first type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_1.
        WHEN 2.
          "create second type of payment
          CREATE OBJECT gr_payment TYPE lcl_payment_2.
      ENDCASE.
      "pass payment type to main object
      CREATE OBJECT gr_main
        EXPORTING
          ir_payment = gr_payment.
      gr_main->show_payment_val( ).
      "now client doesn't know which object it is working with
      gr_main->pay( ).
      gr_main->show_payment_val( ).
      "you can also use set_payment method to set payment type dynamically
      "client would see no change
      if pa_pay = 1.
        "now create different payment to set it dynamically
        CREATE OBJECT gr_payment TYPE lcl_payment_2.
        gr_main->set_payment( gr_payment ).
        gr_main->pay( ).
        gr_main->show_payment_val( ).
      endif.
    Regads
    Marcin

  • How to implement a single sign on  feature using java.

    Hi,
    I have a question like , How to implement **single sign on** feature in java without using any third party framework or tool like LDAP or any other which is available in the market.
    Actually the situation is i have all security information into the table and those information is used for single sign on . If a user logged in from a jsp loging page all the security role should be assigned to that particular user.
    We can do this using LDAP but i am not supposed to use the LDAP or any third party tool . I have to write a java class for that .
    please suggest me the method , how to implement this in a web application.
    Edited by: Rakesh_Singh on Mar 19, 2008 11:55 AM

    you could setup a token that specifies a user is authenticated. other applications that u want SSO can check for existance of this token
    if it is HTTP - you can save the token as a cookie and downstream apps look for this token
    yr code needs to validate that the token/cookie was indeed a valid one and not subject to man-in-the middle attack.

  • How to implement this logic in odi

    suposse my table is like this
    a b c
    1234 01-JAN-09 0
    1234 02-JAN-09 1
    1234 05-JAN-09 1
    1244 06-JAN-09 1
    1234 10-JAN-09 0
    1234 13-JAN-09 1
    1234 25-JAN-09 0
    1234 27-JAN-09 1
    1234 30-JAN-09 1
    1235 01-JAN-09 1
    1235 02-JAN-09 0
    1235 05-JAN-09 1
    1245 06-JAN-09 1
    1235 10-JAN-09 1
    1235 13-JAN-09 3
    1235 25-JAN-09 2
    1235 27-JAN-09 0
    1235 30-JAN-09 0
    i want out put like this
    a b c
    1234 01-JAN-09 0
    1234 02-JAN-09 1
    1234 05-JAN-09 2
    1244 06-JAN-09 3
    1234 10-JAN-09 3
    1234 13-JAN-09 4
    1234 25-JAN-09 4
    1234 27-JAN-09 5
    1234 30-JAN-09 6
    1235 01-JAN-09 1
    1235 02-JAN-09 1
    1235 05-JAN-09 2
    1245 06-JAN-09 3
    1235 10-JAN-09 4
    1235 13-JAN-09 7
    1235 25-JAN-09 9
    1235 27-JAN-09 9
    1235 30-JAN-09 9
    to get out put like that iam using this query
    select a,b,sum(c) over(partition by a order by b) from table.
    how to implement "sum(c) over(partition by a order by b)" in odi interface mappings

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • How to implement this function in JSP/Servlet env?

    Hi all,
    I working on a project, it provides functionality to upload file using JSP/Servlet. In the first JSP page, there is file location and submit button. After user select a file to upload and click submit button, a message, like "sending file to XXXX", will be shown on the screen. Once uploading and validation are done on the server-side, a successful/error msg will be shown to user.
    Here I have a question for the "sending..." msg and the successful/error msg. They should be put in one jsp page or in two separate page? how to implement them?
    Thanks for any help!
    Tranquil

    For the sending message... Well, the thing is, when you click submit, it's sending the file to the server and the server is processing it, and this is all done before the "complete" page is sent to the server. So one would need to use some Javascript on the page before the actual submit happens to show some message. This is done on Ebay when you put something for sale, you can upload an image, and there is a little popup message telling you that it's uploading, and it is removed when the process is done. Now, I'm not sure the exact details of how this works, but my educated guess is this:
    1) The onsubmit function of the form checks that the file upload fields have a value (no need to popup a message if no file upload, since that's what usually takes the time, although it could just be assumed there is a file). If a file is to be uploaded, or just want to show the message anyway, a new popup window is opened with the window.open method and the "sending" message is shown (either written via Javascript or just load a small web page to the window).
    2) The popup window, since you can't transfer the window object from the form page to the next page, has to check window.opener for some value that the success/error page would have to set. The success/error page could use it's body onload function to set a variable in it's own window object to denote that the page is loaded. The popup window can use a looping check using setTimeout or setInterval in Javascript to check for window.opener.isLoadedVariable to be present, and if so, close itself.
    I've never done that, but I see no reason why it wouldn't work.

Maybe you are looking for

  • TA22652 can I have 2 itunes accounts on one computer

    Can I have 2 itunes accounts on one computer?

  • Web Service connect problem, Please Help!!!

    I developed a web service end point following the pattern of adventure as Purchase Order End Point Bean, WSDL is correctly generated for both Server anc Client End: <?xml version="1.0" encoding="UTF-8"?> <definitions name="DownloadWSService" targetNa

  • Attachments in SOAP adapter

    Hi, I am working on SOAP adapter and in the adapter there is an option called "keep attachments".Can you please let me know what this is.Does it mean we can send any file attachements like pdf,.txt etc?Not sure how the webservice can hold the file an

  • The search function in App Store, is not working in my iPhone 4, after upgrading to ios6

    The search function in App Store, is not working in my iPhone 4, after upgrading to ios6. Does anyone have a solution for this problem?

  • Weird sqlplus issue.

    Hello, Recently I came across a weird issues using sqlplus, SELECT statement when typed in uppercase using MAX() function says "table or view does not exists" e.g. SELECT MAX(COLUMN_NAME) FROM TABLE_NAME; When the above query typed with one lowercase