A code example

Hi,
I'm quite new at Java (and at programming on the whole). Can someone explain this to me (saw it in an code example on the internet):
final private char PI_NAME = 0xFF01;
/M

Hi,
a char is a variable that is supposed to contain a
character. However, not all characters exist on the
keyboard, so you define them using their hex value.
final private char PI_NAME = 0xFF01;final = no one can change it
private = no one can see it
char = see above
PI_NAME = the name of the variable
0xFF01 = the value of the variable in hexadecimal
Generally, in Java you can define any number using
octal, decimal or hexadecimal numbers
Octals (based on the number 8, which means it has
digits from 0 to 7) ALWAYS start with a leading 0,
decimals are entered as you know them (for example
17) and hexadecimal numbers are entered with a
leading 0x.
So in this case 0x means "hexadecimal number ahead",
FF01 is its value.
To know its value in decimal, do the following:
1 x 1 (value of last digit)
0 x 16 (value of second from last)
15 x 16 x 16 (F in hex represents the decimal 15)
15 x 16 x 16
All in all, this results in the decimal number
65281.

Similar Messages

  • C# Code Example for Configuring SQL 2005 Reporting Services?

    I have found the MSDN articles describing the classes, public methods, etc. for configuring SQL Server 2005 Reporting Services via WMI. I need to initially configure them and just do this:
    - Report Server Virtual Directory
    - Windows Service Identity
    - Web Service Identity
    - Database Setup
    - Email Settings
    - Execution Account
    Is there a C# code example that already exists putting together all of this? I didn't want to reinvent the wheel if I didn't need to.
    -Ed

    Jin,
    Thanks so much! This is great! Your work is awesome!
    I have a couple of issues that came up...
    1) CreateVirtualDirectory.vbs creates the virtual directory for the Report Server just fine. Now how do I distinguish a script to create the virtual directory for the Report Manager?
    2) I decided to go ahead and use what you did for scripting CreateApplicationPool (using http://msdn.microsoft.com/en-us/library/ms155349(SQL.90).aspx). I found the syntax is wrong here when I kept getting an error, so I put PowerShell on the server and pulled the following info:
    Name       : CreateApplicationPool
    MemberType : Method
    Definition : System.Management.ManagementBaseObject CreateApplicationPool(System.String Name, System.Boolean UseBuiltIn
                 Account, System.String Account, System.String Password)
    However, I'd like to use "NT Authority\NetworkService" or "Network Service" as the account (which is an option for the Builtin accounts when I us RSConfigTool.exe). This is the syntax I used:
    objInParam.Properties_.Item(
    "Name") = "ReportServer"
    objInParam.Properties_.Item("UseBuiltInAccount") = true
    objInParam.Properties_.Item("Account") = "NT Authority\NetworkService"
    objInParam.Properties_.Item("Password") = ""
    But I always get an error with a negative number for the HRESULT.
    Any ideas?-Ed

  • [code] does not work correctly, cannot post code example.

    Hi, I tried to do a code example, but HTML tags inside java quoted strings were intereperted. Like the <IMG> tag and the <H1> tag..
    How do I prevent this????
    Re: How to post an audio file in JSP or servlet

    OK, it was the IMG and H1 tags....
    Looks like I can embed an image though <img src="http://www.oracle.com/admin/images/ocom/oralogo_small.gif">

  • Beginner Question | The use of modulus in this simple code example.

    Hello everyone,
    I am just beginning to learn Java and have started reading "Java Programming for the absolute beginner". It is quite a old book but seems to be doing the trick, mainly.
    There is a code example which I follow mostly but the use of the modulus operator in the switch condition doesn't make sense to me, why is it used? Could someone shed some light on this for me?
    import java.util.Random;
    public class FortuneTeller {
      public static void main(String args[]) {
        Random randini = new Random();
        int fortuneIndex;
        String day;
        String[] fortunes = { "The world is going to end :-(.",
          "You will have a HORRIBLE day!",
          "You will stub your toe.",
          "You will find a shiny new nickel.",
          "You will talk to someone who has bad breath.",
          "You will get a hug from someone you love.",
          "You will remember that day for the rest of your life!",
          "You will get an unexpected phone call.",
          "Nothing significant will happen.",
          "You will bump into someone you haven't seen in a while.",
          "You will be publicly humiliated.",
          "You will find forty dollars.",
          "The stars will appear in the sky.",
          "The proper authorities will discover your secret.",
          "You will be mistaken for a god by a small country.",
          "You will win the lottery!",
          "You will change your name to \"Bob\" and move to Alaska.",
          "You will discover first hand that Bigfoot is real.",
          "You will succeed at everything you do.",
          "You will learn something new.",
          "Your friends will treat you to lunch.",
          "You will meet someone famous.",
          "You will be very bored.",
          "You will hear your new favorite song.",
          "Tomorrow... is too difficult to predict" };
        System.out.println("\nYou have awakened the Great Randini...");
        fortuneIndex = randini.nextInt(fortunes.length);
        switch (randini.nextInt(7) % 7) {   
          case 0:
            day = "Sunday";
            break;
          case 1:
            day = "Monday";
            break;
          case 2:
            day = "Tuesday";
            break;
          case 3:
            day = "Wednesday";
            break;
          case 4:
            day = "Thursday";
            break;
          case 5:
            day = "Friday";
            break;
          case 6:
            day = "Saturday";
            break;
          default:
            day = "Tomorrow";
        System.out.println("I, the Great Randini, know all!");
        System.out.println("I see that on " + day);
        System.out.println("\n" + fortunes[fortuneIndex]);
        System.out.println("\nNow, I must sleep...");
    }

    randini.nextInt(7) % 7randini.nextInt(7) returns a value in the range 0 <= x < 7, right? (Check the API!) And:
    0 % 7 == 0
    1 % 7 == 1
    2 % 7 == 2
    3 % 7 == 3
    4 % 7 == 4
    5 % 7 == 5
    6 % 7 == 6Looks like superfluous code to me. Maybe originally they wrote:
    randini.nextInt() % 7Note this code has problems, because, for example -1 % 7 == -1

  • Need code example for dynamicly changing UI Propertey

    Hello,
    Can someone show me a simple code example that does the following:
    A view which contains a button and a label.
    Each press on the button changes the color (or other visible property) of the label.
    But note: Don't bind the property to the Context for that, I want to do it through the doModifyView method.

    hi Roy Cohen,
    I think u r not looking for the visibility property they have mentioned.
    I think u r looking for a procedure to change the way the element looks..is it..
    The problem is if u want any change to be visible when the button is pressed u can only change the length or the width.There is no option to change the semantic color or whatever.
    To change the size u can try this code
    IWDInputField in = (IWDInputField)view.getElement("<element name>");
    in.setWidth(some value which is set when the button is pressed);
    Is this wat u r looking for?
    Jus mention it if there is something  else.
    Regards
    Bharathwaj

  • I need code example for server act as client and vice versa

    Hi all,
    I want code example for performing both server and clients using RMI. I mean Server will act as client and client will act as server. So a single program will act as both client and server .
    Please give example, it will helpful to complete my project. I am struggling in this stage. Its like peer to peer action.
    Thanks & Regards
    R.Ragupathi

    1. The tutorial shows you how to do cleint/server.
    2. Search on the topic "callback" to see how cleint and server roles can be reversed.

  • Embedding images in excel cells-please provide code examples

    I need to create excel worksheet and embed an image in a cell. After looking at the POI javadoc and examples, I cannot figure out how to embed the image in a cell, only in the sheet. Does POI support this? I have also been looking a using Jexcel and would like to know if Jexcel supports this? If anyone has answers, please provide code examples.
    thanks

    I need to create excel worksheet and embed an image in a cell. After looking at the POI javadoc and examples, I cannot figure out how to embed the image in a cell, only in the sheet. Does POI support this? I have also been looking a using Jexcel and would like to know if Jexcel supports this? If anyone has answers, please provide code examples.
    thanks

  • ABAP Code example using "GENERATE DYNPRO"

    I am looking for ABAP code example who use the "Generate dynpro" dynamic generation of dynpro at runtime under SAP 4.6C version.
    Best regards,

    We have some programs that do:
    form %view.
    data: anz type i,
          prog like sy-repid.
      prog = sy-repid.
      perform init_download(rsaqexce).
      case %tab.
      when 'G00'.
        perform generate_view_dynpro(rsaqexce)
                using prog text-grl.
        describe table %g00 lines anz.
        tview100-lines = anz.
        perform init_view(rsaqexce) tables %g00 using tview100.
        call screen 100.
        perform reset_view_dynpro(rsaqexce).
      when others.
        message s860(aq).
      endcase.
    endform.
    I think they were copied from existing SAP programs. In any event, look at the relevant forms in program rsaqexce.
    And as Rich noted, SAP doesn't recommend this.
    Rob

  • Code Example connection to MS Exchange

    Hi
    Has anyone got a link to a code example showing how to log into an account on MS Exchange server
    I am trying to log in and read emails from my student account that is on a ms exchange server but am having little luck.
    Could someone give me a couple of good links where i can get some helpful information.
    Thanks very much

    hi
    i am sitting with the same problem, if you find anything please let me know. thanx

  • Need Code Example

    Can someone please show me a code example of how to use RS_EXTERNAL_SELSCREEN_STATUS function.
    I want to delete "Create delivery in background" pushbutton from report vl10h.

    This is the example given in the FM documentation.
    Example
    Example for calling RS_EXTERNAL_SELSCREEN_STATUS:
    PROGRAM SAPDBxyz DEFINING DATABASE xyz.
    FORM INIT.
    CALL FUNCTION 'RS_EXTERNAL_SELSCREEN_STATUS'
    EXPORTING P_FB = 'TEST_EXTERNAL_STATUS'.
    ENDFORM.
    Example for function module that sets the status:
    FUNCTION TEST_EXTERNAL_STATUS.
    ""Local interface:
    *" IMPORTING
    *" P_SUBMIT_MODE
    *" TABLES
    *" P_EXCLUDE STRUCTURE RSEXFCODE
    *" EXCEPTIONS
    *" NO_ACTION
    IF P_SUBMIT_MODE NE SPACE.
    RAISE NO_ACTION.
    ENDIF.
    SET PF-STATUS 'TEST' EXCLUDING P_EXCLUDE.
    SET TITLEBAR 'TST'.
    ENDFUNCTION.
    INITIALIZATION.
    CUA *
    IMPORT T185V FROM MEMORY
    ID SD_COND_MEM_01. "JAY
    RV13B-KVEWE = 'B'.
    RV13B-KOTABNR = '001'.
    CALL FUNCTION 'RS_SUBMIT_INFO'
    IMPORTING
    P_SUBMIT_INFO = RSSUBINFO.
    IF NOT RSSUBINFO-MODE_NORML IS INITIAL.
    TITEL = T185V-CTITEL.
    CALL FUNCTION 'RV_CONDITION_GET_CUA_REPO'
    EXPORTING
    PFKEY_I = 'BSELE'
    TITLE_I = TITEL
    PAR1_I = T185V-PARA1
    PAR2_I = T185V-PARA2
    PAR3_I = T185V-PARA3
    PAR4_I = T185V-PARA4
    TABLES
    EXCL_I = AUSSCHLUSS.
    CALL FUNCTION 'RS_EXTERNAL_SELSCREEN_STATUS'
    EXPORTING
    P_FB = 'RV_CONDITION_SET_CUA_REPO'.
    ENDIF.

  • Save Large Value code example

    I am trying to import the above example into my APEX online workspace, the file is upload ok and the install application portion of the import completes.
    The import supporting objects however hangs....
    Is anyone else encountering this problem?
    When i log back into the APEX workspace the application is visible but i can't seem to find the apex_save_large.js file in the shared components???
    when i click on the save value or retrieve values in the sample form nothing happens....

    Hello,
    I'll look into the install issues, I've never seen it but I'll look again.
    the $a() functions are included in the apex_save_large.js and will be included in the standard js files in a future version.
    $x() is the new format of html_GetElement() so if your in a 2.0 instance just add
    function $x(pNd){return html_GetElement(pNd);}
    ver 2.2 should be fine.
    Is this by design? If so, what are the reasons that it appears there instead of in the static files area.Developer Error and when I get my hands on that lazy guy he's gonna hear about it :)
    When I have a second I'll fix it and get a new version uploaded to the code examples page.
    I added a link to the js file here http://apex.oracle.com/pls/otn/f?p=27916:5
    (hint for digging files out of workspace images adding this real quick to a page &lt;a href="#WORKSPACE_IMAGES#filename.js">filename.js&lt;/a>)
    Carl

  • Code example for virtual list view control

    I'm writing a client (C++) application to access an LDAP directory (that supports virtual lists), and I'm trying to make use of the virtual list view control to "page" my results. However, I'm having trouble getting the code to work correctly. Can anyone provide a C++ code example?
    Thanks in advance.

    I think I've found my problem with writing this code.
    Unless I'm mistaken, the Netscape SDK for C appears to be incomplete. After an LDAP search operation, I believe there should be a way to parse the virtual list response control for a context id. Then, I would return this context id to the directory server in subsequent Virtual List View controls (which I'd send via LDAP search calls). However, the concept of context id in VLV search controls doesn't appear to exist in the Netscape SDK for C.

  • Code example using interface controller ?

    Hi, guys:
    I have a question.
    In CRM UI, I need to integrate one component with another component, and I want to pass the value from 1st component to 2nd component using interface controller. Does any one who have done this before and have a code example?
    Really appreciate!
    Eric

    Hi Eric,
    Refer:
    [http://forums.sdn.sap.com/thread.jspa?threadID=2014259|http://forums.sdn.sap.com/thread.jspa?threadID=2014259]
    [http://forums.sdn.sap.com/thread.jspa?threadID=1909625|http://forums.sdn.sap.com/thread.jspa?threadID=1909625]
    Regards,
    Leon

  • Event-related scrambling rule type - Code example?

    Hi experts,
    I am currently working on an SAP TDMS project which requires me to develop some event-related scrambling rules. As this type of rule doesn't have parameters I'm having trouble understanding how to access the data. I tried to find an example in the forums and searching the internet but I wasn't successful.
    Any help will be much appreciated.
    Thank you.
    Kindest regards,
    Bruno Esperança
    Edited by: Rob Burbank on Feb 3, 2012 9:37 AM

    Hi Rupam!
    Yes, I am using TDMS 3.0.
    Thank you very much for your e-mail.
    I did not find standard package TDSAD. However, I did find include CNV_MBT_TDSAD_ADDR_SCRAM1 which has the code example for an event-related rule.
    Nonetheless, I do have a small concern. This rule was designed to be used by more than one table. Thus, there is a piece of code in the beginning which determines the object (table) that is currently being converted.
      IF g_wa_name IS INITIAL.
    * get receiver structure name of the current conv. obj.:
    *    CONCATENATE g_dmc_cobj_guid ' = ''' g_dmc_cobj_guid_val
    *      '''' INTO g_where_clause_dmc_cobj.
        CONCATENATE g_dmc_cobj_guid ' = ''' _GUID_COBJ
          '''' INTO g_where_clause_dmc_cobj.
        SELECT SINGLE (g_dmc_cobj_rcontainer) FROM (g_dmc_cobj_tabname)
            INTO g_dmc_cobj_rcontainer_into WHERE (g_where_clause_dmc_cobj).
        CONCATENATE g_dmc_stree_container ' = '''
          g_dmc_cobj_rcontainer_into''''
          ' AND' g_dmc_stree_seqnum ' = ''' g_dmc_stree_seqnum_val''''
          ' AND' g_dmc_stree_struclevel ' = ''' g_dmc_stree_struclevel_val
          '''' INTO g_where_clause_dmc_stree.
        SELECT SINGLE (g_dmc_stree_guid) FROM (g_dmc_stree_tabname)
            INTO g_dmc_stree_guid_into WHERE (g_where_clause_dmc_stree).
        CONCATENATE g_dmc_struct_stree ' = ''' g_dmc_stree_guid_into
             '''' INTO g_where_clause.
        SELECT SINGLE (g_dmc_struct_ident) FROM (g_dmc_struct_tabname)
            INTO g_structname WHERE (g_where_clause).
    *  select single ident from dmc_struct into g_structname
    *    where stree = ( select GUID FROM dmc_stree WHERE container =
    *  ( select RCONTAINER FROM dmc_cobj WHERE guid = _guid_cobj )
    *      AND seqnum = '0001' AND struclevel = '01' ).
        CONCATENATE '_WA_' g_structname INTO g_wa_name.
        ASSIGN (g_wa_name) TO <g_wa_name>.
      ENDIF.
    As you can see this has some selects in it, and I'm affraid these selects might be executed for each record of each table. So, in a performance point of view, this might not be so good...
    Is there a reason why I shouldn't use one rule per table, and therefore disregard this piece of code?
    Thank you very much!
    Bruno
    EDIT:
    From what I understood from the code, this is a code example if I assume I'm scrambling table ADRC:
    ASSIGN ('_WA_R_ADRC') TO <g_wa_name>.
    ASSIGN COMPONENT 'NAME1' OF STRUCTURE <g_wa_name> TO <g_name1>.
    Does this make sense to you?
    Thanks.

  • DAQ Quadrature Code Example and Simulated Mode

    Hi,
    I have what I hope is a quick question:
    I currently am trying to develop .Net software for an NI-DAQmx device. I am
    attempting to read data from either 1 or 2 attached quadrature devices sampled
    at 1000hz with the resulting data streamed to a file on a Windows machine. I
    was wondering which code example(s) would be applicable and how I can run the
    example both in simulated and live modes.
    Thank you,

    Hi, you can find those examples on your computer. You just have to go to the NI-DAQ folder under National Instruments on your C drive. For example on my computer the file path is this : C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples  in there you can find many examples of text based DAQmx.

  • Code Examples

    Are there any good code examples around that show how to capture video on client A and broadcast it over the network to client B which then plays it?
    Thanks, in advance.

    You can see media4j project in http://media4j.dev.java.net
    There is an audiochat sample and others more.

Maybe you are looking for

  • Cost of production

    where we manintain COST OF PRODUCTION TYPE in SPRO.i want to change year in  cost of production type

  • Swap items from Sales Document to Billing Document

    Hello, I am facing with the following issue. We had customizing a Billing plan, that means that the information to make the billing document comes from the sales order. The sales document have 2 materials for sale, the first one must be delivered (it

  • Nokia n8 update no Notifications Widget

    I have upgraded my n8-00 to newest belle and i am not finding Notifications widget any more, i liked to have it on my homescreen to see when who called, how many sms have i not read and etc. Is there a way to restore this widget? as it is very useful

  • Cannot bookmark a Youtube video

    Whenever I try to bookmark a specific Youtube video, the bookmark does not get added. For example, if I click the Star icon while viewing a video, the little animation plays where the star goes into the clipboard icon, but the star does not turn blue

  • Is anyone else experiencing repeated crashing of new iPad Air?

    My new iPad Air crashes at least 3-4 times per day when opening apps.  Not always the same one either.  Apps are all updated and work fine on my pevious generation iPad.