Simple code though what is it actually doing

           Class colorClass = Color.class;
           Field field = colorClass.getDeclaredField(command);
           Color color = (Color)field.get(Color.WHITE);Whats this doing though, how would I comment this?
Regards
KR

Class colorClass = Color.class; // 1
Field field = colorClass.getDeclaredField(command); // 2
Color color = (Color)field.get(Color.WHITE); // 31) Foo.class refers to the Class object that represents class Foo. See the API for java.lang.Class for more info about a Class object.
2) See the API for java.lang.reflect.Field. This is part of the reflection API, that lets you find out stuff about classes, fields, methods at runtime.
3) Ditto--part of java.lang.reflect.Field.

Similar Messages

  • OSX Print dialogue's Color Matching "Automatic" option - what's it actually doing?

    I'm trying to understand OSX's colour management options clearer. It seems that the Print dialogue's default option for Color Matching is set to "Automatic". Is this as good as no colour management, because a specific profile isn't selected or is it actually using a default profile?
    To stop the OSX driver from colour correcting my file and leave it to the printer manufacturer's driver you should set it to the other option (eg. eg. “Vendor Matching” (10.5) and “In Printer” (10.6) - or depends on what printer you have chosen) and then save a preset. Not everyone thinks to do this so that's why I'm interested in knowing exactly what the "Automatic" option is doing.
    Your help is most appreciated!
    Cheers,
    Cojcolds

    I understood your note to say that when "Color Matching" is set to ColorSync: Automatic the images in the file will first be converted through the monitor profile (in my case I'm currently using the "canned" LCD Display profile), then through the printer's profile (I have a desktop Fuji Xerox DocuPrint C1110B), correct?
    Correct. Let's say you're using the working RGB color space of Adobe RGB in Photoshop. At all times, that color is being translated to the monitor color space by ColorSync for the rendition that is actually displayed. The file itself remains Adobe RGB, but that's not your monitor's profile, so it needs to be continuously converted for display.
    When you print the image, the first thing ColorSync does is convert the color space from Adobe RGB to your monitor profile (all with temporary data, not to the original). Now the image is in the color space you were viewing, which is where is needs to be since the idea is for the print to match the monitor color you are looking at. But the printer is not a monitor, so the monitor profile color space the data is currently in is not correct for printing. So it goes through a second conversion from the monitor color space to the printer profile's color space. That is what finally gets sent to the printer.
    This is where any automatic color correction must be off. You've already told ColorSync to use the proper profiles to achieve a print that will match the monitor as closely as possible. This assumes of course you have accurate profiles for both your monitor, and the printer with the paper being used.
    As a further test, I then ColorSync to the AdobeRGB(1998) profile and made a new ps file. The RGB values in the distilled PDF were still the same as the Word doc.
    That's what throws people off. An RGB value isn't a specific color. It's a representation of where that RGB value falls in relation to *L*A*B. So a fully saturated red of 255,0,0 will look different in a short color space as opposed to a larger space. Here's an example (see image below). I have two different profiles overlapping each other. The red point circled in green is the most saturated red that can be attained in relation to *L*A*B in that smaller color space. The point circled in yellow is that larger space's most saturated red. In both cases (the confusing aspect), both will assign 255,0,0 to that point, but one would obviously be a richer red than the other. Think of it this way. 255,0,0 is the maximum color space that particular color space (profile) can handle within *L*A*B. It's not necessarily the maximum red we can see in the visible color spectrum.
    So, your converted files look the same because ColorSync is generating the color based on your monitor profile for display. Since that's always the same, the color will look the same, regardless of the input RGB profile. At least as long as you don't use a really small RGB space as an assigned color space and squeeze it down to some noticeably dull color.
    I'm a trainer for Fuji Xerox and am writing a course for our Mac users on Colour Management (in particular for our high-end production RIPs (Fiery/Creo/FreeFlow) with serious colour management being applied).
    Fun! I've been doing prepress work as as in-home business for quite a few years now, but worked in a couple of different high end print shops for many years. Last thing I used on that end was a Scitex Brisque RIP. As I'm sure you know, Creo bought out Scitex. I'm sure RIPs have changed a lot since I last looked at one.
    I only discovered the other day that the Mac OS has the "Color Matching" option and wondered if the OS was in any way bending the colour values before our RIPs have a chance to properly manage the colours. So far it looks like the setting is not having any impact.
    It all depends on where your settings are on both the Mac and at the RIP. Too long of an explanation to go into here I think.
    As a further note, I even tried setting ColorSync to the "Generic CMYK" profile and the distilled PDF still showed the correct RGB values. So, maybe the print to PDF option is ignoring the Color Matching settings or something else is at play but this setting is still a mystery to me...
    ColorSync will only apply matching profiles on the fly. So something would already have to by CMYK before it would apply the Generic CMYK profile. Which no one in their right mind would ever use. It's the flattest, ugliest CMYK profile you will ever see.

  • What ejbc tool actually does ??

    Hi All,
    can anybody help in understanding why actually ejbc tool is used for EJB's deploying on Weblogic 6.1 ?
    what is its purpose , if i am able to deploy & run EJB's on weblogic 6.1 without using ejbc tool.
    Thanks in advance

    Found some thing more on this for weblogic 6 (might be same for 8)
    WebLogic Server supports the use of ejb-client.jar files.
    The ejb-client.jar contains the home and remote interfaces, the primary key class (as applicable), and the files they reference. WebLogic Server does not add files referenced in your classpath to ejb-client.jar. This enables WebLogic Server to add necessary custom classes to the ejb-client.jar without adding generic classes such as java.lang.String.
    For example, the ShoppingCart remote interface might have a method that returns an Item class. Because this remote interface references this class, and it is located in the ejb-jar file, it will be included in the client jar.
    You configure the creation of an ejb-client.jar file in the bean's ejb-jar.xml deployment descriptor file.When you compile the bean with ejbc, WebLogic Server creates the ejb-client.jar.
    To specify an ejb-client.jar:
    1. Compile the bean's Java classes into a directory, using the javac compiler from the command line.
    2. Add the EJB XML deployment descriptor files to the compiled unit using the guidelines in WebLogic Server EJB Deployment Files.
    3. Edit the ejb-client-jar deployment descriptor in the bean's ejb-jar.xml file, as follows, to specify support for ejb-client.jar:
    <ejb-client-jar>ShoppingCartClient.jar</ejb-client-jar>
    4. Generate the container classes that are used to access the bean using weblogic.ejbc and create the ejb-client.jar using the following command:
    $ java weblogic.ejbc <ShoppingCart.jar>
    Container classes include both the internal representation of the EJB that WebLogic Server uses, as well as implementation of the external interfaces (home, local, and/or remote) that clients use.
    External clients can include the ejb-client.jar in their classpath. Web applications would include the ejb-client.jar in their /lib directory.
    Note: WebLogic Server classloading behavior varies, depending on whether or not the client is stand-alone. Stand-alone clients with access to the ejb-client.jar can load the necessary classes over the network. However, for security reasons, programmatic clients running in a server instance cannot load classes over the network.

  • What's the simple code for this?

    Hello, I know it is a very simple code but what is the code if I want to have different properties for headings and such in different id's. For example I want ID "sidebar"'s headings to be aligned in the center but I want ID "main-body"'s headings to be aligned to the left. How would I go about doing that?
    Thanks!

    CSS:
    body {
    text-align:left;
    #sidebar h1,
    #sidebar h2,
    #sidebar h3,
    #sidebar h4 {text-align:center}
    /**re-usable classes**/
    .center {text-align:center}
    .right {text-align:right}
    HTML:
    <div id="main_body">
         <h1>This is left aligned by default</h1>
         <h2 class="right">This is right aligned by virtue of the class .right.</h2>
    </div>
    Nancy O.

  • What is Time Machine actually doing?

    During Time Machine backups, I always get curious as to what Time Machine is actually doing.
    For example, towards the end of a backup, TM is "Cleaning up...". What does that mean? I didn't realise TM made a mess to begin with. And also, when I click "Stop Backing Up" whilst TM is cleaning up, the backup finishes a lot quicker, yet is considered a successful backup. Makes me think that "Cleaning up..." is an unnecessary part of the whole process.
    Additionally, there is also this "Finalising backup..." message. What does that even mean? Once your finished cleaning up, surely there's nothing more to be done?
    Just curious as to whether or not anybody has figured out what TM is actually doing.

    Hi, and welcome to the forums.
    The main things are converting the "in.Progress" package into an actual backup folder; deleting "expired" backups, if necessary; and finishing up the (hidden) log in each backup folder, updating the status, date of last backup, in various places.
    If you cancel while it's deleting expired backups, it just skips that step, as it will get them the next time, so yes, that's considered a successful backup.
    See #A1 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of this forum), for a handy widget to display the backup messages from your logs.

  • How can I pass a file refnum into and out of external c++ code? What type does it convert to in c++?

    I am trying to write external c++ code that will read a file already opened by Labview and therefore assigned a refnum. (Unfortunately, I definately can't use the standard Labview vis.) However I am not sure what c++ type to use in order to manage the refnum.
    All help and thoughts appreciated. Thanks,
    Joanna

    You could do ALL your file handling in C or C++ (MFC CFile for
    example) and pass Microsoft file handles into and out of LabVIEW
    instead of LabVIEW file references into and out of C. This may be an
    easier way to attack the problem.
    You could create a DLL in MSVC that exports a FileOpen function, a
    FileClose function and a FileRead and/or FileWrite Function and then
    call that DLL from place to place as required in your code.
    It would help us if you would explain what kind of data you are trying
    to read or write and what the application is. Is it binary data?
    text files? Do you need some special Win32 file system feature like
    file mapped memory? I guess what I am asking is what is your
    motivation for doing file handling in C or C++?
    Douglas De Clue
    LabVIEW developer
    [email protected]
    "Rolf" wrote in message news:...
    > A LabVIEW file refnum is an internal Magic Cookie to LabVIEW and there is no
    > way to directly extract the actual information assigned to that Magic
    > Cookie.
    > However the CIN Reference Manual describes one function which allows to
    > retrieve a lower level "File" handle and at least on Windows 32 bit and
    > LabVIEW
    > from version 5 up to and including 6.1 this "File" LabVIEW datatype directly
    > maps
    > to the Win32 API "FILE" Handle.
    >
    > The function to use is
    >
    > MgErr FRefNumToFD(LVRefNum refNum, File *fdp);
    >
    > It is declared in extcode.h or one of its dependant headers and exported
    > from "labview.lib"
    > all located in the cintools directory and you can link this lib also to a
    > normal DLL project.
    > However calling this DLL then from any other process than LabVIEW or a
    > LabVIEW
    > executable will not initialize the DLL anymore correctly.
    >
    > Your best option if you need to write in C(++) should be to use the LabVIEW
    > file manager
    > functions described on the External Code Manual (manual/lvexcode.pdf) on
    > this File handle.
    > If you need to use directly some Win32 API functions with it please note
    > that although currently
    > the "File" in the LabVIEW file manager functions matches the FILE in Windows
    > 32 bit API
    > functions this is an undocumented and hence unsupported feature. The next
    > LabVIEW version
    > may actually use a different datatype for its "File" parameter to the
    > LabVIEW file manager calls
    > and your use of assuming File == FILE may simply crash.
    >
    > Also operating on a file refnum in LabVIEW which has been accessed directly
    > with Win API
    > functions may result in strange behaviour such as the file read/write mark
    > not being updated as
    > you would maybe expect it.
    >
    > "Jo" wrote in message
    > news:50650000000800000016520000-1023576873000@exch​ange.ni.com...
    > > How can I pass a file refnum into and out of external c++ code? What
    > > type does it convert to in c++?
    > >
    > > I am trying to write external c++ code that will read a file already
    > > opened by Labview and therefore assigned a refnum. (Unfortunately, I
    > > definately can't use the standard Labview vis.) However I am not sure
    > > what c++ type to use in order to manage the refnum.
    > > All help and thoughts appreciated. Thanks,
    > > Joanna

  • Latest IOS displays fault code 1671, what does this mean?

    latest IOS displays fault code 1671, what does this mean?

    If it has NEVER been jailbroke, here are some standard repair procedures:
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore (or it doesn't help), go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, read this.

  • Downloads from itunes fail - error code 8003 - what does that mean, or more importantly, how do I get what I paid for?

    Downloads from itunes fail - error code 8003 - what does that mean, or more importantly, how do I get what I paid for?

    Try the troubleshooting for that error code on this page : iTunes: Advanced iTunes Store troubleshooting - Apple Support (search for '8003' on the page, it's just below half-way down)

  • What's wrong with this simple code?

    What's wrong with this simple code? Complier points out that
    1. a '{' is expected at line6;
    2. Statement expected at the line which PI is declared;
    3. Type expected at "System.out.println("Demostrating PI");"
    However, I can't figure out them. Please help. Thanks.
    Here is the code:
    import java.util.*;
    public class DebugTwo3
    // This class demonstrates some math methods
    public static void main(String args[])
              public static final double PI = 3.14159;
              double radius = 2.00;
              double area;
              double roundArea;
              System.out.println("Demonstrating PI");
              area = PI * radius * radius;
              System.out.println("area is " + area);
              roundArea = Math.round(area);
              System.out.println("Rounded area is " + roundArea);

    Change your code to this:
    import java.util.*;
    public class DebugTwo3
         public static final double PI = 3.14159;
         public static void main(String args[])
              double radius = 2.00;
              double area;
              double roundArea;
              System.out.println("Demonstrating PI");
              area = PI * radius * radius;
              System.out.println("area is " + area);
              roundArea = Math.round(area);
              System.out.println("Rounded area is " + roundArea);
    Klint

  • HT201269 I am trying to restore my phone from the backed up information on my computer.  It is asking me for a password.  I tried my screen lock code and my apple id.  Does anyone know what password it wants?

    I am trying to restore my phone from the backed up information on my computer.  It is asking me for a password.  I tried my screen lock code and my apple id.  Does anyone know what password it wants?

    recovery mode
    open itunes on computer
    plug cable into computer not phone
    turn phone off
    hold home button and plug cable into phone.  do not release home button until an itunes graphic appears on device.
    look to computer should have message about recovery mode click ok and restore
    Peace, Clyde
    if u need an article see
    http://support.apple.com/kb/HT1808
    if it says turn find my device off can be done at icloud.com or on the device settings - icloud - find my device

  • Data Binding: Simple code does not work.

    hi... the following simple code is used to display the ename field for a record selected in scott.emp on the console. the code is placed in an event handler. it is as follows:
    DCBindingContainer bindings = ctx.getBindingContainer();
    DCControlBinding binding = bindings.findCtrlBinding("ename");
    String Name = (binding != null) ? binding.toString() : "";
    System.out.println(Name);
    is the code above correct????
    if so, why it does not work???
    thanks for every help in advance & best regards.

    Hi,
    please check the UIModel.xml file for the page if the binding name is "name". The code you have is the same code we published in our QBE workshop and it works there. The only difference is the name of the control binding. So please check if the binding name exists. (e.g. it could be ename1 instead of ename)
    Frank

  • When synchig my iphone to my itunes, I get an error message at the end with code 1150.  What is this error code and what does it mean?

    When synching my iphone to my itunes, I get an error message at the end with code 1150.  What is this error code and what does it mean?

    try uninstalling and reinstalling itunes on your computer. here is a link for that http://support.apple.com/kb/HT1925

  • HT204003 I can't get passbook to accept my loyalty cards. It keeps saying no pass available for this code. What am I doing wrong?

    I can't get passbook to accept my loyalty cards. It keeps saying no pass available for this code. What am I doing wrong?

    You may have installed your TextWrangler application without administrator privileges. In this you'll have to look for the twdiff file in the Local Applications Support Folder (refer to TextWrangler User Manual).
    To fix your problem with Dreamweaver, while selecting your File Compare tool, try looking for the twdiff file in the following location :
    Macintosh HD:usr:local:bin:twdiff
    That should definitely work. It did for me
    Cheers!

  • I have a scanner and i get the error code:201 what does this mean?

    i have a scanner and i get the error code:201 what does this mean?

    More information needed for someone to help... please click below and provide the requested information
    -PPro Information FAQ http://forums.adobe.com/message/4200840

  • I am unable to download Acrobat XI Standard purchased 19Feb15 & unable to locate on your web site simple steps to do this - please help; what am I not doing?

    I am unable to download Acrobat XI Standard purchased 19Feb15 & unable to locate on your web site simple steps to do this - please help; what am I not doing?

    Make sure you have cookies enabled and clear your cache.  If it continues to fail try using a different browser.

Maybe you are looking for

  • The text in my links run together.

    The text in my links run together. Any ideas how to fix this? Here's a link to the page: http://bodyprecision.com/main-line-pilates-teacher-training/pilates-full-training-test.htm l Thank you!

  • Data not reflecting in Table

    Hi, I've simply added the Table Component from the Pallete to my web page and Connected with a Table named "Role_master". while running the web application it shows me the following syntax on the Browser: <table id="form1:table1:_table" class="Tbl_su

  • Totally impressed with this device

    I have to admit, initially I was disappointed that there wasn't an iPhone 5 released. I've been an apple devotee for some time, and am rarely if at all disappointed in the products they introduce. I had gone as far as to purchase a droid device for t

  • Upgrading from 10.7SC to 11i

    Has anyone considered upgrading on a plant-by-plant basis or a module-by-module basis? We have 15+ plants implemented on the same instances. Our senior executives are looking for ways to mitigate the risks of upgrading in a "big bang" appraoch.

  • [HOWTO] Mplayer music daemon

    Hello fellow Archers, I recently noticed that XMMS2 was using 40% of my CPU (not sure how I missed it but it no doubt has something to do with my setup) and decided I needed to correct this. My plan was to initially write my own music server, but tha