Subset of collection

Is it possible to accomplish the following without unchecked casts warnings? I want to be able to extract a subset of a collection (based on class) and return the appropriate type. For example I have a collection of Animals and I want to return a collection of Lions from it. See sample code below:
class Animal {}
class Lion extends Animal {}
class Monkey extends Animal {}
class Zoo {
   Collection<Animal> animals;
   public Zoo() {
      animals = new HashSet<Animal>();
   public <T extends Animal> Collection<T> getAnimals(Class<T> clazz) {
      Collection<T> temp = new HashSet<T>();
      for (Animal animal : animals) {
         if (animal.getClass().equals(clazz)) {
            temp.add((T)animal); // Here is the problem (unchecked warning)
      return temp;
   public void addAnimal(Animal animal) {
      animals.add(animal);
   public static void main(String[] args) {
      Zoo zoo = new Zoo();
      zoo.addAnimal(new Lion());
      zoo.addAnimal(new Lion());
      zoo.addAnimal(new Monkey());
      Collection<Lion> lions = zoo.getAnimals(Lion.class);
      for (Lion lion : lions) System.out.println(lion);//works (all lions)
}

Call me old fashioned, but how is the Zoo class above any conceivable advance upon the below??
public class Zoo {
      Collection animals = new HashSet();  
      public Zoo() { }
      public Collection getAnimals(Class clazz) {     
           Collection temp = new HashSet();     
           for (Iterator iter = this.animals.iterator(); iter.hasNext(); ) {
                Animal animal = (Animal)iter.next();// Here is the problem (unchecked warning)
                if (animal.getClass().equals(clazz)) {           
                     temp.add(animal);        
           return temp;  
      public void addAnimal(Animal animal) {     
           this.animals.add(animal);  
      public static void main(String[] args) {     
           Zoo zoo = new Zoo();     
           zoo.addAnimal(new Lion());     
           zoo.addAnimal(new Lion());     
           zoo.addAnimal(new Monkey());     
           Collection lions = zoo.getAnimals(Lion.class);     
           for (Iterator iter = lions.iterator(); iter.hasNext(); )  {
                System.out.println(iter.next()); //works (all lions)  
}...and I bet you read this snippet twice as fast as the OP.
/k1

Similar Messages

  • Changing font in Oracle Report in PDF output

    Hi,
    I have created reports using dev10g(report builder). I can run report from client side in pdf format but I want to change the font (i.e from courier to Arial narrow).
    How can I do this?
    Is there anyone who can help me?
    my unifont.ali file is:
    # $Header: uifont.ali@@/main/22 \
    # Checked in on Tue Jan 8 15:32:42 PST 2002 by idc \
    # Copyright (c) 1999, 2004, Oracle. All rights reserved.
    # $
    # $Revision: tk2/admin/uifont.ali#0 $
    # Copyright (c) 1994, 2004, Oracle. All rights reserved.
    # All Rights Reserved.
    # DESCRIPTION:
    # Each line is of the form:
    # <Face>.<Size>.<Style>.<Weight>.<Width>.<CharSet> = \
    # <Face>.<Size>.<Style>.<Weight>.<Width>.<CharSet>
    # The <Face> must be the name (string/identifier) of a font face. The
    # <Style>, <Weight>, <Width>, and <CharSet> may either be a numeric
    # value or a predefined identifier/string. For example, both US7ASCII
    # and 1 are valid <CharSet> values, and refer to the same character set.
    # The <Size> dimension must be an explicit size, in points.
    # The following is a list of recognized names and their numeric
    # equivalents:
    # Styles Numeric value
    # Plain 0
    # Italic 1
    # Oblique 2
    # Underline 4
    # Outline 8
    # Shadow 16
    # Inverted 32
    # Overstrike 64
    # Blink 128
    # Weights Numeric value
    # Ultralight 1
    # Extralight 2
    # Light 3
    # Demilight 4
    # Medium 5
    # Demibold 6
    # Bold 7
    # Extrabold 8
    # Ultrabold 9
    # Widths Numeric value
    # Ultradense 1
    # Extradense 2
    # Dense 3
    # Semidense 4
    # Normal 5
    # Semiexpand 6
    # Expand 7
    # Extraexpand 8
    # Ultraexpand 9
    # Styles may be combined; you can use plus ("+") to delimit parts of a
    # style. For example,
    # Arial..Italic+Overstrike = Helvetica.12.Italic.Bold
    # are equivalent, and either one will map any Arial that has both Italic
    # and Overstrike styles to a 12-point, bold, italic Helvetica font.
    # All strings are case-insensitive in mapping. Font faces are likely to
    # be case-sensitive on lookup, depending on the platform and surface, so
    # care should be taken with names used on the right-hand side; but they
    # will be mapped case-insensitively.
    # See your platform documentation for a list of all supported character
    # sets, and available fonts.
    # BUGS:
    # o Should accept a RHS ratio (e.g., "Helv = Arial.2/3").
    #===============================================================
    [ Global ] # Put mappings for all surfaces here.
    # Mapping from MS Windows
    "arial narrow" = "Arial Narrow"
    Arial = helvetica
    "Courier New" = courier
    "Times New Roman" = times
    Modern = helvetica
    "MS Sans Serif" = helvetica
    "MS Serif" = times
    "Small Fonts" = helvetica
    # Mapping from Macintosh
    "New Century Schlbk" = "new century schoolbook"
    "New York" = times
    geneva = helvetica
    #===============================================================
    [ Printer ] # Put mappings for all printers here.
    #===============================================================
    [ Printer:PostScript1 ] # Put mappings for PostScript level 1 printers here.
    # Sample Kanji font mappings
    ...UltraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...UltraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...ExtraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...ExtraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...Light..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...Light..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...DemiLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...DemiLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    .....JEUC = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..JEUC
    .....SJIS = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..SJIS
    # Mapping from MS Windows
    Roman = palatino
    Script = "itc zapf chancery"
    FixedSys = courier
    System = helvetica
    # Mapping from Macintosh
    "Avant Garde" = "itc avant garde gothic"
    # Mapping from Motif display
    fixed = courier
    clean = times
    lucidatypewriter = courier
    lucidabright = times
    #===============================================================
    [ Printer:PostScript2 ] # Put mappings for PostScript level 2 printers here.
    # Sample Kanji font mappings
    ...UltraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...UltraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...ExtraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...ExtraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...Light..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...Light..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...DemiLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...DemiLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    .....JEUC = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..JEUC
    .....SJIS = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..SJIS
    # Mapping from MS Windows
    Roman = palatino
    Script = "itc zapf chancery"
    FixedSys = courier
    System = helvetica
    # Mapping from Macintosh
    "Avant Garde" = "itc avant garde gothic"
    # Mapping from Motif display
    fixed = courier
    clean = times
    lucidatypewriter = courier
    lucidabright = times
    #===============================================================
    [ Printer:PCL5 ] # Put mappings for PCL 5 printers here.
    helvetica = univers
    times = "cg times"
    clean = "antique olv"
    fixed = courier
    lucida = univers
    lucidabright = "cg times"
    lucidatypewriter = courier
    "new century schoolbook" = univers
    terminal = "line printer"
    #===============================================================
    [ Display ] # Put mappings for all display surfaces here.
    #===============================================================
    [ Display:Motif ] # Put mappings for Motif displays here
    # Fix for bug no 778937 DO NOT MOVE!
    Roman.....sjis = lucida.....jeuc
    Script.....sjis = lucidabright.....jeuc
    FixedSys.....sjis = fixed.....jeuc
    System.....sjis = lucida.....jeuc
    .....sjis = .....jeuc
    # Mapping from MS Windows
    Roman = lucida
    Script = lucidabright
    FixedSys = fixed
    System = lucida
    # Mapping from Macintosh
    "Avant Garde" = helvetica
    "Bookman" = times
    #===============================================================
    [ Display:CM ] # Put mappings for all CM displays here.
    # These are DEC-specific, and may need localization
    *..Blink = Blinking
    *..Inverted+Underline.Bold = ReverseBoldUnderline
    *..Inverted+Underline. = UnderlineReverse
    *..Underline.Bold = UnderlineBold
    *..Inverted.Bold = ReverseBold
    *...Bold = Bold
    *..Underline = Underline
    *..Inverted = Reverse
    * = Plain # The font of last resort
    # Oracle Report PDF sections
    # Three new sections have been added:
    # [ PDF ] - Used for font aliasing and Multibyte language support
    # [ PDF:Embed ] - Used for Type 1 font embedding
    # [ PDF:Subset ] - Used for True Type Font subsetting
    [ PDF ]
    "helvetica narrow" = "Arial Narrow"
    # This example shows how to rename helvetica font to Courier font
    # helvetica = Courier
    # You can Alias specific styles of font as below
    # helvetica.12..Bold.. = Courier.14....
    # "Lucida Bright".12..Bold = "New Century Schoolbook"
    # Support for Far Eastern Languages:
    # PDF section can be additionally used to enable Multibyte language support
    # built into Reports. To use this feature with Adobe (r) Acrobat (c), you
    # need to install the Asian font pack available online at the Adobe web site.
    # .....SJIS = "HeiseiKakuGo-W5-Acro"
    # A Japanese report run with Shift-JIS character set is replaced to
    # HeiseiKakuGo-W5-Acro CID font.
    [ PDF:Embed ]
    # This example shows how to embed Type 1 helvetica font into the PDF file:
    # helvetica = "helvetica.afm helvetica.pfa"
    # You need to specify the .afm file before the .pfa file.
    # The font files must exist in one of the folders specified in REPORTS_PATH.
    [ PDF:Subset ]
    "arial narrow" = "Arialn.ttf"
    # This example shows how to subset Arial True Type font into the PDF file:
    # helvetica = "Arial.ttf"
    # The True Type font files must exist in any one of the folders specified in
    # REPORTS_PATH.
    # Subsetting TrueType Collection fonts:
    # Typically, a TTC font contains several fonts in one file. For example,
    # the TTC file, msgothic.ttc consists of three fonts in the order -
    # MS Gothic, MS PGothic and MS UI Gothic. To subset MS PGothic, the
    # entry in the PDF:Subset section of uifont.ali would be:
    # "MS PGothic" = "msgothic.ttc,1"
    # NOTES ON PRECEDENCE OF PDF SECTIONS:
    # If you have entries for a same font in many PDF sections, then Font
    # Aliasing entry will take precedence over Font Subsetting entry. Entries
    # in Font Subsetting will take precedence over the entries in Font Embedding
    # section.
    # Generic entries for a font must follow more specific entries for the same
    # font. For instance, if you want to subset helvetica Plain, helvetica Bold,
    # helvetica Italic and helvetica Bold-Italic fonts, your entries must be:
    # [ PDF:Subset ]
    # helvetica..Italic.Bold.. = "Arialbi.ttf"
    # helvetica...Bold.. = "Arialb.ttf"
    # helvetica..Italic... = "Ariali.ttf"
    # helvetica..... = "Arial.ttf"
    # If helvetica..... entry appears in the top of the list, all the styles of
    # helvetica font in the layout will be subset as helvetica Plain font.
    Thanks,
    Rafikul

    Welcome to OTN
    Check the two link..
    1. Re: Oracle Reports 10g Fonts issue
    2. Re: Adding new font to my Reports Setup
    Hope this will help you
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.

  • Lightroom mobile experience on iPad and iPhone

    I've been using LR Mobile since the week it came out and have a few experiences to share--maybe I'm not understanding perfectly..
    Last week, I updated my iPad to iOS 8.1.3. When I tasked it to enable offline editing for several collections, the program crashed. Restarting it caused it to crash again. Restarting the iPad fixed it. Uninstalled and reinstalled LR Mobile and seems to be working ok, however I need to select enable offline editing for each collection. The way the program reacted I suspect something in the software cannot handle a large number of requests to enable offline editing simultaneously. I believe, in this case, I had asked it to enable offline editing for about 15 collections and about 7000 photos. It seems ok 1 collection at a time.
    Occasionally, maybe monthly, I will go to LR Mobile and find I am no longer signed in (occurs on both iPad and iPhone). It could be there was an update from Adobe (current version is 1.3.0)
    The offline editing button on the front of the collection has inconsistent behavior. If offline editing is off, selecting it raises a window indicating how much storage is required and available and you have to say go ahead. If offline editing is on, selecting the button turns if off but never asks if you want to delete the photos that were already downloaded or not. I also find the two different states of the button are not particularly noticeable--I just sat down today to figure it out and can see the arrow drops when offline editing is on, but maybe adding a white background or something would make it more obvious what happened.
    I don't think there is a way to choose a subset of collections for different devices. So, if I set up the collection on the Mac, both devices get it, although I can select offline editing independently. Selecting "Remove" on an iOS device simply removes the synch with LR marker from the desktop (and causes the collection to no longer be available on any iOS device).
    Not too sure what the value is if you don't enable offline editing. Download is too slow to be particularly useful. I could see a photographer might want to download only the client set s/he is working with, but for me, I need to be able to look at all the photos while not connected to the web.
    I think a pretty consistent thread has been to synch smart collections, and I sure vote for that!

    Thanks!
    Ignacio,
    I'm testing the manipulation on my way home tonight, I do not have my iPad with me.
    I do well refer to IOS app.
    DdeGannes,
    If I allow myself to work on this forum, it is because I have the CC Version!
    I have a problem on my ipad, nothing to do with the Mac OS version.
    I'll try the manipulation proposed by Ignacio, and you'll keep.

  • Fonts issue on 10g Reports (Linux)

    A while back I posted some questions about installing fonts on Linux RHEL 5.
    Currently, I'm in process of upgrading Client/Server Forms/Reports from 6i on a Windows platforms to 10g forms/reports on a Linux RHEL5 platform. No database is installed on the server since we are using the TNSNames in the Network Admin to connect to the database.
    I have been able to convert all forms and all reports to 10g. I had an issue with the Arial, Arial Narrow, and Courier New fonts not displaying in output when I generated a PDF file via the screen using the WEB.SHOW_DOCUMENT command. The fonts were translating. I was able to use Metalink Note 261879.1 and run the scripts to generate the AFM files and copy the TTF fonts to the appropriate directories. When I run the reports in 10g on Linux, those 3 fonts display just fine.
    However, I have 3 other fonts (Monotype Sorts, Arial Unicode MS, and one of Barcode fonts) that I need to get working. I've worked with Oracle Support and I'll be honest, the steps they are telling me either aren't very clear or just flat out aren't right.
    I've tried on Windows to use the ttf2pt1 program to generate the AFM files and copied those up to guicommon/tk/admin/AFM directory. I've copied the TTF file up to the associated directory. I've modified the uifont.ali directory to include the font, to no success.
    Has anyone tried to move a Windows font up to Linux (Unix) and got it to work successfully? If so, could you provide me some steps? I've really been trying to get this to work and would do anything at this point to get it to work. I've got about 5 reports that use these 3 fonts and if I get them working, I'm done.
    Please provide good detail, if possible. Oracle Support has just confused me more by providing notes to read and little tidbits here and there but haven't given me something that works in a straightforward manner.
    Chris

    My uifont.ali:
    # Corrected uifont.ali - Matt Jernigan, Brown University, 31 MAR 2010
    # Corrected [ Global ] aliasing standard Windows fonts.
    # Corrected [ PDF:Subset ] Arial Unicode MS and less standard fonts.
    # Note: These corrections do not necessarily match Oracle docs.
    # 05 APR 2010 - Decided to subset Arial, Arial Narrow, Courier New,
    # and Times New Roman in addition to Arial Unicode MS due to lack of
    # support of UTF-8 in Oracle's PDF engine at this time.  A charset
    # conversion feature for specific fonts would be nice but nothing was
    # found that was working such as arial.....=helvetica.....WE8ISO8859P1
    # $Header: uifont.ali@@/main/22 \
    # Checked in on Tue Jan  8 15:32:42 PST 2002 by idc \
    # Copyright (c) 1999, 2004, Oracle. All rights reserved. 
    # $
    # $Revision: tk2/admin/uifont.ali#0 $
    # Copyright (c) 1994, 2004, Oracle. All rights reserved. 
    #  All Rights Reserved.
    # DESCRIPTION:
    # Each line is of the form:
    #     <Face>.<Size>.<Style>.<Weight>.<Width>.<CharSet> = \
    #                      <Face>.<Size>.<Style>.<Weight>.<Width>.<CharSet>
    # The <Face> must be the name (string/identifier) of a font face.  The
    # <Style>, <Weight>, <Width>, and <CharSet> may either be a numeric
    # value or a predefined identifier/string.  For example, both US7ASCII
    # and 1 are valid <CharSet> values, and refer to the same character set.
    # The <Size> dimension must be an explicit size, in points.
    # The following is a list of recognized names and their numeric
    # equivalents:
    #     Styles                Numeric value
    #       Plain                      0
    #       Italic                     1
    #       Oblique                    2
    #       Underline                  4
    #       Outline                    8
    #       Shadow                    16
    #       Inverted                  32
    #       Overstrike                64
    #       Blink                    128
    #     Weights               Numeric value
    #       Ultralight                 1
    #       Extralight                 2
    #       Light                      3
    #       Demilight                  4
    #       Medium                     5
    #       Demibold                   6
    #       Bold                       7
    #       Extrabold                  8
    #       Ultrabold                  9
    #     Widths                Numeric value
    #       Ultradense                 1
    #       Extradense                 2
    #       Dense                      3
    #       Semidense                  4
    #       Normal                     5
    #       Semiexpand                 6
    #       Expand                     7
    #       Extraexpand                8
    #       Ultraexpand                9
    # Styles may be combined; you can use plus ("+") to delimit parts of a
    # style.  For example,
    #        Arial..Italic+Overstrike = Helvetica.12.Italic.Bold
    # are equivalent, and either one will map any Arial that has both Italic
    # and Overstrike styles to a 12-point, bold, italic Helvetica font.
    # All strings are case-insensitive in mapping.  Font faces are likely to
    # be case-sensitive on lookup, depending on the platform and surface, so
    # care should be taken with names used on the right-hand side; but they
    # will be mapped case-insensitively.
    # See your platform documentation for a list of all supported character
    # sets, and available fonts.
    # BUGS:
    #    o Should accept a RHS ratio (e.g., "Helv = Arial.2/3").
    #===============================================================
    [ Global ]  # Put mappings for all surfaces here.
    # Mapping from MS Windows
    #MJJ# - Unix apparently lowercases what it reads from the Report
    # and this case must be corrected.
    # Arial = Helvetica will not work. Likely due to Oracle not supporting
    # Regular as a weight such as Arial...Regular = Helvetica...Medium
    #arial               = Arial
    #"arial narrow"      = "Arial Narrow"
    #"courier new"       = "Courier New"
    #"times new roman"   = "Times New Roman"
    "ms sans serif"         = "MS Sans Serif"
    "microsoft sans serif"  = "Microsoft Sans Serif"
    # Note: I'm not providing AFM files for the Sans Serifs.  I'll let
    # the engine do with them as it sees fit.  Best to avoid use of them.
    # Arial Narrow is not really standard enough to be included here
    # so limit use to clients that are known to have it installed.
    # Consider moving Arial Narrow TTF's to the server and subsetting it.
    #MJJ# - Alternative mappings to the above. The PDF engine appears to
    # take liberty with mapping Courier New to Courier and Times New Roman
    # to Times and, if wanted, these mappings appeared to correct this
    # behavior.  Note: not thoroughly tested.  Changing the AFM files
    # from CourierNewPS to CourierNew and such may produce more compatible
    # results on Mac (just a guess) -- though leaving at Courier would be
    # most compatible.
    #arial..Italic.Bold..                = "Arial-BoldItalicMT"..Italic.Bold..
    #arial...Bold..                      = "Arial-BoldMT"...Bold..
    #arial..Italic...                    = "Arial-ItalicMT"..Italic...
    #arial                               = "ArialMT"
    #"courier new"..Italic.Bold..        = "CourierNewPS-BoldItalicMT"..Italic.Bold..
    #"courier new"...Bold..              = "CourierNewPS-BoldMT"...Bold..
    #"courier new"..Italic...            = "CourierNewPS-ItalicMT"..Italic...
    #"courier new"                       = "CourierNewPSMT"
    #"times new roman"..Italic.Bold..    = "TimesNewRomanPS-BoldItalicMT"..Italic.Bold..
    #"times new roman"...Bold..          = "TimesNewRomanPS-BoldMT"...Bold..
    #"times new roman"..Italic...        = "TimesNewRomanPS-ItalicMT"..Italic...
    #"times new roman"                   = "TimesNewRomanPSMT"
    # Mapping from Macintosh
    #"New Century Schlbk" = "new century schoolbook"
    #"New York"        = times
    #geneva            = helvetica
    #===============================================================
    [ Printer ]  # Put mappings for all printers here.
    #===============================================================
    [ Printer:PostScript1 ]  # Put mappings for PostScript level 1 printers here.
    # Sample Kanji font mappings
    ...UltraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...UltraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...ExtraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...ExtraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...Light..JEUC      = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...Light..SJIS      = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...DemiLight..JEUC  = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...DemiLight..SJIS  = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    .....JEUC           = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..JEUC
    .....SJIS           = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..SJIS
    # Mapping from MS Windows
    Roman             = palatino
    Script            = "itc zapf chancery"
    FixedSys          = courier
    System            = helvetica
    # Mapping from Macintosh
    "Avant Garde"     = "itc avant garde gothic"
    # Mapping from Motif display
    fixed             = courier
    clean             = times
    lucidatypewriter  = courier
    lucidabright      = times
    #===============================================================
    [ Printer:PostScript2 ]  # Put mappings for PostScript level 2 printers here.
    # Sample Kanji font mappings
    ...UltraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...UltraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...ExtraLight..JEUC = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...ExtraLight..SJIS = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...Light..JEUC      = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...Light..SJIS      = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    ...DemiLight..JEUC  = "Ryumin-Light-83pv-RKSJ-H"...Light..JEUC
    ...DemiLight..SJIS  = "Ryumin-Light-83pv-RKSJ-H"...Light..SJIS
    .....JEUC           = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..JEUC
    .....SJIS           = "GothicBBB-Medium-83pv-RKSJ-H"...Medium..SJIS
    # Mapping from MS Windows
    Roman             = palatino
    Script            = "itc zapf chancery"
    FixedSys          = courier
    System            = helvetica
    # Mapping from Macintosh
    "Avant Garde"     = "itc avant garde gothic"
    # Mapping from Motif display
    fixed             = courier
    clean             = times
    lucidatypewriter  = courier
    lucidabright      = times
    #===============================================================
    [ Printer:PCL5 ]  # Put mappings for PCL 5 printers here.
    helvetica         = univers
    times             = "cg times"
    clean             = "antique olv"
    fixed             = courier
    lucida            = univers
    lucidabright      = "cg times"
    lucidatypewriter  = courier
    "new century schoolbook" = univers
    terminal          = "line printer"
    #===============================================================
    [ Display ]  # Put mappings for all display surfaces here.
    #===============================================================
    [ Display:Motif ]  # Put mappings for Motif displays here
    # Fix for bug no 778937 DO NOT MOVE!
    Roman.....sjis    = lucida.....jeuc
    Script.....sjis   = lucidabright.....jeuc
    FixedSys.....sjis = fixed.....jeuc
    System.....sjis   = lucida.....jeuc
    .....sjis         = .....jeuc
    # Mapping from MS Windows
    Roman             = lucida
    Script            = lucidabright
    FixedSys          = fixed
    System            = lucida
    # Mapping from Macintosh
    "Avant Garde"     = helvetica
    "Bookman"         = times
    #===============================================================
    [ Display:CM ]     # Put mappings for all CM displays here.
    # These are DEC-specific, and may need localization
    *..Blink          = Blinking
    *..Inverted+Underline.Bold = ReverseBoldUnderline
    *..Inverted+Underline.     = UnderlineReverse
    *..Underline.Bold = UnderlineBold
    *..Inverted.Bold  = ReverseBold
    *...Bold          = Bold
    *..Underline      = Underline
    *..Inverted       = Reverse
    *                 = Plain                # The font of last resort
    #===============================================================
    # Oracle Report PDF sections
    # Three new sections have been added:
    # [ PDF ]         - Used for font aliasing and Multibyte language support
    # [ PDF:Embed ]   - Used for Type 1 font embedding
    # [ PDF:Subset ]  - Used for True Type Font subsetting
    # NOTES ON PRECEDENCE OF PDF SECTIONS:
    # If you have entries for a same font in many PDF sections, then Font
    # Aliasing entry will take precedence over Font Subsetting entry. Entries
    # in Font Subsetting will take precedence over the entries in Font Embedding
    # section.
    # Generic entries for a font must follow more specific entries for the same
    # font.  For instance, if you want to subset helvetica Plain, helvetica Bold,
    # helvetica Italic and helvetica Bold-Italic fonts, your entries must be:
    # [ PDF:Subset ]
    # helvetica..Italic.Bold.. = "Arialbi.ttf"
    # helvetica...Bold..       = "Arialb.ttf"
    # helvetica..Italic...     = "Ariali.ttf"
    # helvetica.....           = "Arial.ttf"
    # If helvetica..... entry appears in the top of the list, all the styles of
    # helvetica font in the layout will be subset as helvetica Plain font.
    [ PDF ]
    # This example shows how to rename helvetica font to Courier font
    # helvetica = Courier
    # You can Alias specific styles of font as below
    # helvetica.12..Bold.. = Courier.14....
    # "Lucida Bright".12..Bold = "New Century Schoolbook"
    # Support for Far Eastern Languages:
    # PDF section can be additionally used to enable Multibyte language support
    # built into Reports.  To use this feature with Adobe (r) Acrobat (c), you
    # need to install the Asian font pack available online at the Adobe web site.
    # .....SJIS = "HeiseiKakuGo-W5-Acro"
    # A Japanese report run with Shift-JIS character set is replaced to
    # HeiseiKakuGo-W5-Acro CID font.
    [ PDF:Embed ]
    # This example shows how to embed Type 1 helvetica font into the PDF file:
    # helvetica = "helvetica.afm helvetica.pfa"
    # You need to specify the .afm file before the .pfa file.
    # The font files must exist in one of the folders specified in REPORTS_PATH.
    [ PDF:Subset ]
    # This example shows how to subset Arial True Type font into the PDF file:
    # helvetica = "Arial.ttf"
    # The True Type font files must exist in any one of the folders specified in
    # REPORTS_PATH.
    # Subsetting TrueType Collection fonts:
    # Typically, a TTC font contains several fonts in one file. For example,
    # the TTC file, msgothic.ttc consists of three fonts in the order -
    # MS Gothic, MS PGothic and MS UI Gothic. To subset MS PGothic, the
    # entry in the PDF:Subset section of uifont.ali would be:
    # "MS PGothic" = "msgothic.ttc,1"
    #MJJ# - Removed old subset mappings.
    "arial unicode ms".....             = "ARIALUNI.TTF"
    arial..Italic.Bold..                = "arialbi.ttf"
    arial...Bold..                      = "arialbd.ttf"
    arial..Italic...                    = "ariali.ttf"
    arial                               = "arial.ttf"
    "arial narrow"..Italic.Bold..       = "arialnbi.ttf"
    "arial narrow"...Bold..             = "arialnb.ttf"
    "arial narrow"..Italic...           = "arialni.ttf"
    "arial narrow"                      = "arialn.ttf"
    "courier new"..Italic.Bold..        = "courbi.ttf"
    "courier new"...Bold..              = "courbd.ttf"
    "courier new"..Italic...            = "couri.ttf"
    "courier new"                       = "cour.ttf"
    "times new roman"..Italic.Bold..    = "timesbi.ttf"
    "times new roman"...Bold..          = "timesbd.ttf"
    "times new roman"..Italic...        = "timesi.ttf"
    "times new roman"                   = "times.ttf"
    tahoma...Bold..                     = "tahomabd.ttf"
    tahoma.....                         = "tahoma.ttf"
    # Tahoma is a narrower adaption of Verdana more appropriate for print.
    # Tahoma also has more charsets such as Arabic, Hebrew and Thai.
    # No italics.  Verdana and Tahoma were designed for screen anyhow.
    #MJJ# Miscellaneous Notes:
    # oracle::devlpar4:/u01/app/oracle/Forms1/fonts
    # ARIALUNI.TTF  arialbd.ttf   courbd.ttf    tahomabd.ttf  verdana.ttf
    # arial.ttf     cour.ttf      tahoma.ttf    times.ttf
    # PFA's might be found here: /usr/lib/X11/fonts/type1
    My screenprinter.ppd:
    *% Corrected screenprinter.ppd - Matt Jernigan, Brown U, 31 MAR 2010
    *% Reverted baseline from hp4mp6_1.ppd back to datap462.ppd (Oracle's
    *% default).  Added Arial, Arial Narrow, Arial Unicode MS, Courier New,
    *% Tahoma, and Times New Roman.
    *% 05 APR 2010 - ArialUnicodeMS wants to be before the other Arials
    *% for some unknown reason, else it is not found for subsetting.
    *PPD-Adobe: "4.0"
    *% Adobe Systems PostScript(R) Printer Description File
    *% Copyright 1987-1992 Adobe Systems Incorporated.
    *% All Rights Reserved.
    *% Permission is granted for redistribution of this file as
    *% long as this copyright notice is intact and the contents
    *% of the file is not altered in any way from its original form.
    *% End of Copyright statement
    *FormatVersion: "4.0"
    *FileVersion: "3.1"
    *PCFileName: "DATAP462.PPD"
    *LanguageVersion: English
    *Product: "(Dataproducts LZR 2665)"
    *PSVersion: "(46.2) 1"
    *ModelName: "Dataproducts LZR-2665"
    *NickName: "Dataproducts LZR-2665 v46.2"
    *% ==== Options and Constraints =====
    *OpenGroup: InstallableOptions/Options Installed
    *OpenUI *Option1/Optional Lower Tray: Boolean
    *DefaultOption1: False
    *Option1 True/Installed: ""
    *Option1 False/Not Installed: ""
    *CloseUI: *Option1
    *CloseGroup: InstallableOptions
    *UIConstraints: *Option1 False *InputSlot Lower
    *% General Information and Defaults ===============
    *ColorDevice: False
    *DefaultColorSpace: Gray
    *FreeVM: "178744"
    *LanguageLevel: "1"
    *VariablePaperSize: False
    *FileSystem: False
    *Throughput: "26"
    *Password: "0"
    *ExitServer: "
      count 0 eq {  % is the password on the stack?
        true
        dup    % potential password
        statusdict /checkpassword get exec not
      } ifelse
      {  %  if no password or not valid
        (WARNING : Cannot perform the exitserver command.) =
        (Password supplied is not valid.) =
        (Please contact the author of this software.) = flush
        quit
      } if
      serverdict /exitserver get exec
    *End
    *Reset: "
      count 0 eq {  % is the password on the stack?
        true
        dup    % potential password
        statusdict /checkpassword get exec not
      } ifelse
      {  %  if no password or not valid
        (WARNING : Cannot reset printer.) =
        (Password supplied is not valid.) =
        (Please contact the author of this software.) = flush
        quit
      } if
      serverdict /exitserver get exec
      systemdict /quit get exec
      (WARNING : Printer Reset Failed.) = flush
    *End
    *DefaultResolution: 300dpi
    *?Resolution: "
    save
      initgraphics
      0 0 moveto currentpoint matrix defaultmatrix transform
      0 72 lineto currentpoint matrix defaultmatrix transform
      3 -1 roll sub dup mul
      3 1 roll exch sub dup mul
      add sqrt round cvi
      (          ) cvs print (dpi) = flush
    restore
    *End
    *% Halftone Information ===============
    *ScreenFreq: "50.0"
    *ScreenAngle: "54.0"
    *DefaultScreenProc: Dot
    *ScreenProc Dot: " {dup mul exch dup mul add sqrt 1 exch sub } "
    *ScreenProc Line: "{ pop }"
    *ScreenProc Ellipse: "
    { dup 5 mul 8 div mul exch dup mul exch add sqrt 1 exch sub }"
    *End
    *DefaultTransfer: Null
    *Transfer Null: "{ }"
    *Transfer Null.Inverse: "{ 1 exch sub }"
    *% Paper Handling ===================
    *% Use these entries to set paper size most of the time, unless there is
    *% specific reason to use PageRegion.
    *OpenUI *PageSize: PickOne
    *OrderDependency: 30 AnySetup *PageSize
    *DefaultPageSize: Letter
    *PageSize Letter: "statusdict /lettertray get exec letterR"
    *PageSize Letter.Transverse: "statusdict /lettertray get exec letter"
    *PageSize Legal: "statusdict /legaltray get exec"
    *PageSize Ledger: "statusdict /ledgertray get exec"
    *PageSize Statement: "statusdict /statementtray get exec"
    *PageSize Tabloid: "statusdict /11x17tray get exec"
    *PageSize A3: "statusdict /a3tray get exec"
    *PageSize A4: "statusdict /a4tray get exec a4R"
    *PageSize A4.Transverse: "statusdict /a4tray get exec a4"
    *PageSize A5: "statusdict /a5tray get exec"
    *PageSize B4: "statusdict /b4tray get exec"
    *PageSize B5: "statusdict /b5tray get exec b5R"
    *PageSize B5.Transverse: "statusdict /b5tray get exec b5"
    *CloseUI: *PageSize
    *% These entries will set up the frame buffer. Usually used with manual feed.
    *OpenUI *PageRegion: PickOne
    *OrderDependency: 40 AnySetup *PageRegion
    *DefaultPageRegion: Letter
    *PageRegion Letter: "letterR"
    *PageRegion Letter.Transverse: "letter"
    *PageRegion Legal: "legal"
    *PageRegion Ledger: "ledger"
    *PageRegion Tabloid: "11x17"
    *PageRegion A3: "a3"
    *PageRegion A4: "a4R"
    *PageRegion A4.Transverse: "a4"
    *PageRegion A5: "a5"
    *PageRegion B4: "b4"
    *PageRegion B5: "b5R"
    *PageRegion B5.Transverse: "b5"
    *PageRegion Statement: "statement"
    *CloseUI: *PageRegion
    *% The following entries provide information about specific paper keywords.
    *DefaultImageableArea: Letter
    *ImageableArea Letter: "20 16 591 775 "
    *ImageableArea Letter.Transverse: "18 19 593 773 "
    *ImageableArea Legal: "18 19 593 990 "
    *ImageableArea Ledger: "18 16 1205 775 "
    *ImageableArea Tabloid: "16 19 775 1206 "
    *ImageableArea A3: "18 21 823 1170 "
    *ImageableArea A4: "18 18 576 823 "
    *ImageableArea A4.Transverse: "18 19 577 823 "
    *ImageableArea A5: "18 19 401 577 "
    *ImageableArea B4: "19 15 709 1017 "
    *ImageableArea B5: "20 19 495 709 "
    *ImageableArea B5.Transverse: "20 19 495 709 "
    *ImageableArea Statement: "22 19 374 594 "
    *?ImageableArea: "
    save
      /cvp {(                ) cvs print ( ) print } bind def
      /upperright {10000 mul floor 10000 div} bind def
      /lowerleft {10000 mul ceiling 10000 div} bind def
      newpath clippath pathbbox
      4 -2 roll exch 2 {lowerleft cvp} repeat
      exch 2 {upperright cvp} repeat flush
    restore
    *End
    *% These provide the physical dimensions of the paper (by keyword)
    *DefaultPaperDimension: Letter
    *PaperDimension Letter: "612 792"
    *PaperDimension Letter.Transverse: "612 792"
    *PaperDimension Legal: "612 1008"
    *PaperDimension Ledger: "1224 792"
    *PaperDimension Tabloid: "792 1224"
    *PaperDimension A3: "842 1191"
    *PaperDimension A4: "595 842"
    *PaperDimension A4.Transverse: "595 842"
    *PaperDimension A5: "420 595"
    *PaperDimension B4: "729 1032"
    *PaperDimension B5: "516 729"
    *PaperDimension B5.Transverse: "516 729"
    *PaperDimension Statement: "396 612"
    *RequiresPageRegion All: True
    *OpenUI *InputSlot: PickOne
    *OrderDependency: 20 AnySetup *InputSlot
    *DefaultInputSlot: Upper
    *InputSlot Upper: "0 statusdict /setpapertray get exec"
    *InputSlot Lower: "1 statusdict /setpapertray get exec"
    *?InputSlot: "
    save
      [ (Upper) (Lower) ] statusdict /papertray get exec
      (get exec) stopped ( pop pop (Unknown)} if = flush
    restore
    *End
    *CloseUI: *InputSlot
    *OpenUI *ManualFeed: Boolean
    *OrderDependency: 20 AnySetup *ManualFeed
    *DefaultManualFeed: False
    *ManualFeed True: "statusdict /manualfeed true put"
    *ManualFeed False: "statusdict /manualfeed false put"
    *?ManualFeed: "
    save
      statusdict /manualfeed get {(True)}{(False)}ifelse = flush
    restore
    *End
    *CloseUI: *ManualFeed
    *DefaultOutputOrder: Reverse
    *% Font Information =====================
    *%DefaultFont: Error
    *DefaultFont: Courier
    *Font ArialUnicodeMS: Special "(Version 1.01)" Special ROM
    *Font ArialMT: Special "(Version 3.06)" Special ROM
    *Font Arial-BoldMT: Special "(Version 3.06)" Special ROM
    *Font Arial-BoldItalicMT: Special "(Version 3.06)" Special ROM
    *Font Arial-ItalicMT: Special "(Version 3.06)" Special ROM
    *Font ArialNarrow: Special "(Version 2.40)" Special ROM
    *Font ArialNarrow-Bold: Special "(Version 2.40)" Special ROM
    *Font ArialNarrow-BoldItalic: Special "(Version 2.40)" Special ROM
    *Font ArialNarrow-Italic: Special "(Version 2.40)" Special ROM
    *Font CourierNewPSMT: Special "(Version 2.90)" Special ROM
    *Font CourierNewPS-BoldMT: Special "(Version 2.90)" Special ROM
    *Font CourierNewPS-BoldItalicMT: Special "(Version 2.90)" Special ROM
    *Font CourierNewPS-ItalicMT: Special "(Version 2.90)" Special ROM
    *Font TimesNewRomanPSMT: Special "(Version 3.06)" Special ROM
    *Font TimesNewRomanPS-BoldMT: Special "(Version 3.06)" Special ROM
    *Font TimesNewRomanPS-BoldItalicMT: Special "(Version 3.06)" Special ROM
    *Font TimesNewRomanPS-ItalicMT: Special "(Version 3.06)" Special ROM
    *Font Tahoma: Special "(Version 3.15)" Special ROM
    *Font Tahoma-Bold: Special "(Version 3.15)" Special ROM
    *Font Courier: Standard "(001.004)" Standard ROM
    *Font Courier-Bold: Standard "(001.001)" Standard ROM
    *Font Courier-BoldOblique: Standard "(001.001)" Standard ROM
    *Font Courier-Oblique: Standard "(001.001)" Standard ROM
    *Font Helvetica: Standard "(001.001)" Standard ROM
    *Font Helvetica-Bold: Standard "(001.001)" Standard ROM
    *Font Helvetica-BoldOblique: Standard "(001.001)" Standard ROM
    *Font Helvetica-Oblique: Standard "(001.001)" Standard ROM
    *Font Symbol: Special "(001.001)" Special ROM
    *Font Times-Bold: Standard "(001.001)" Standard ROM
    *Font Times-BoldItalic: Standard "(001.001)" Standard ROM
    *Font Times-Italic: Standard "(001.001)" Standard ROM
    *Font Times-Roman: Standard "(001.001)" Standard ROM
    *?FontQuery: "
    save
    /str 100 string dup 0 (fonts/) putinterval def
       count 1 gt
         exch dup str 6 94 getinterval cvs
         (/) print print (:) print
         FontDirectory exch known
         {(Yes)}{(No)} ifelse =
       {exit} ifelse
    }bind loop
    (*) = flush
    restore
    *End
    *?FontList: "
    FontDirectory { pop == } bind forall flush
    (*) = flush
    *End
    *% Printer Messages (verbatim from printer):
    *Message: "%%[ exitserver: permanent state may be changed ]%%"
    *Message: "%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%"
    *Message: "\FontName\ not found, using Courier"
    *% Status (format: %%[ status: <one of these> ]%% )
    *Status: "idle"
    *Status: "busy"
    *Status: "waiting"
    *Status: "printing"
    *Status: "warming up"
    *Status: "PrinterError: BD check"
    *Status: "PrinterError: Paper jam"
    *Status: "PrinterError: Replace toner bag"
    *Status: "PrinterError: Warming up"
    *Status: "PrinterError: Timing error"
    *Status: "PrinterError: Fuser check"
    *Status: "PrinterError: Cover opened"
    *Status: "PrinterError: Toner empty"
    *Status: "PrinterError: Empty & reset output bin(s)"
    *Status: "PrinterError: Sorter or jogger error"
    *Status: "PrinterError: Scanner check"
    *% Input Sources (format: %%[ status: <stat>; source: <one of these> ]%% )
    *Source: "serial9"
    *Source: "serial25"
    *Source: "AppleTalk"
    *Source: "Centronics"
    *% Printer Error (format: %%[ PrinterError: <one of these> ]%%)
    *PrinterError: "BD check"
    *PrinterError: "Paper jam"
    *PrinterError: "Replace toner bag"
    *PrinterError: "Warming up"
    *PrinterError: "Timing error"
    *PrinterError: "Fuser check"
    *PrinterError: "Cover opened"
    *PrinterError: "Toner empty"
    *PrinterError: "Empty & reset output bin(s)"
    *PrinterError: "Sorter or jogger error"
    *PrinterError: "Scanner check"
    *%DeviceAdjustMatrix: "[1 0 0 1 0 0]"
    *% Color Separation Information =====================
    *DefaultColorSep: ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi
    *InkName: ProcessBlack/Process Black
    *InkName: CustomColor/Custom Color
    *InkName: ProcessCyan/Process Cyan
    *InkName: ProcessMagenta/Process Magenta
    *InkName: ProcessYellow/Process Yellow
    *% For 60 lpi / 300 dpi =====================================================
    *ColorSepScreenAngle ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi: "45"
    *ColorSepScreenAngle CustomColor.60lpi.300dpi/60 lpi / 300 dpi: "45"
    *ColorSepScreenAngle ProcessCyan.60lpi.300dpi/60 lpi / 300 dpi: "15"
    *ColorSepScreenAngle ProcessMagenta.60lpi.300dpi/60 lpi / 300 dpi: "75"
    *ColorSepScreenAngle ProcessYellow.60lpi.300dpi/60 lpi / 300 dpi: "0"
    *ColorSepScreenFreq ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi: "60"
    *ColorSepScreenFreq CustomColor.60lpi.300dpi/60 lpi / 300 dpi: "60"
    *ColorSepScreenFreq ProcessCyan.60lpi.300dpi/60 lpi / 300 dpi: "60"
    *ColorSepScreenFreq ProcessMagenta.60lpi.300dpi/60 lpi / 300 dpi: "60"
    *ColorSepScreenFreq ProcessYellow.60lpi.300dpi/60 lpi / 300 dpi: "60"
    *% For 53 lpi / 300 dpi =====================================================
    *ColorSepScreenAngle ProcessBlack.53lpi.300dpi/53 lpi / 300 dpi: "45.0"
    *ColorSepScreenAngle CustomColor.53lpi.300dpi/53 lpi / 300 dpi: "45.0"
    *ColorSepScreenAngle ProcessCyan.53lpi.300dpi/53 lpi / 300 dpi: "71.5651"
    *ColorSepScreenAngle ProcessMagenta.53lpi.300dpi/53 lpi / 300 dpi: "18.4349"
    *ColorSepScreenAngle ProcessYellow.53lpi.300dpi/53 lpi / 300 dpi: "0.0"
    *ColorSepScreenFreq ProcessBlack.53lpi.300dpi/53 lpi / 300 dpi: "53.033"
    *ColorSepScreenFreq CustomColor.53lpi.300dpi/53 lpi / 300 dpi: "53.033"
    *ColorSepScreenFreq ProcessCyan.53lpi.300dpi/53 lpi / 300 dpi: "47.4342"
    *ColorSepScreenFreq ProcessMagenta.53lpi.300dpi/53 lpi / 300 dpi: "47.4342"
    *ColorSepScreenFreq ProcessYellow.53lpi.300dpi/53 lpi / 300 dpi: "50.0"
    *% For "Dataproducts LZR 2665" version 46.2
    *% Produced by "GETapd.ps" version 2.0 edit 47
    *% Converted to meet 4.0 specification
    *% Last Edit Date: Sep 15 1992
    *% The byte count of this file should be exactly 011228 or 011572
    *% depending on the filesystem it resides in.
    *% end of PPD file for Dataproducts LZR 2665

  • How to move only subset of data from one database to another?

    Both source & destination are Oracle11g databases.
    The requirement details are as below,
    1) The database contains static as well as transactional data for telecom domain.
    2) We have to move region-wise data from one database to another.
    3) There are around 10 regions.
    4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
    static data & it will not change.
    5) The volume is around 1 million subscribers per region.
    6) The migration is required because
    a) The client is upgrading its base product which uses this database
    b) There is a change in structure of static tables
    c) Hardware upgrade
    d) The client want to start with single region on new database & rest of the regions will be operated from old
    database.
    7) Keep execution time to very minimum.
    I am thinking to have solution as below,
    1) Create destination database with upgraded db structure (as mentioned in 6b)
    2) Create database links to access source db in destination db.
    3) Write SQL queries to fetch data from all the respective tables for a specific region
    4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
    destination db
    a) Use FOR ALL & bulk collect to improve the performance
    b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
    5) Validate pre & post counts to verify the success of migration
    Is there any other better way?
    Regards,
    Sandeep

    How to move only subset of data from a partiular table by using transportable tablespace?
    E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
    The indexes defined on SUB table are under SMP_IDX_SUB tablespace
    The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
    any specific example would be helpful.

  • Multiple Comboboxes with single instance of Array Collection

    First off - thanks to everyone for their contributions.  This forum provides a lot of good information.
    I'm stuck on a particular problem and I suspect I'm not thinking about the issue correctly.
    I'm developing a dynamic module that instantiates components at runtime based on an XML scheme.  Many of these components are drop-downs that are chained togther (a selection in one drives the population of the next)
    I loop through the initial XML document to create and layout the components.  I have been using a single Array Collection to populate the drop-down.  This worked fine with the chained comboboxes since I only load one combox initially.  However, when I add a couple of static combo boxes, the arraycollection seemed to be binding to the orginal combobox.  For example, if I create 3 combo boxes they have drop-down values that display all 3 lists appended together.  I was a bit surprised because I didn't think that I could bind an Array Collection.  I certainly haven't defined a Binable ArrayCollection.
    I thought I could solve the issue by simply creating a unique Array Collection at runtime - one for each element.  However, I don't think this is possible or I can't figure out how to create a new Array Collection with a dynamic name - something like this:
    I was hoping this would work -
    var newDropDown_[numOfElement]:ArrayCollection = new ArrayCollection(); 
    I've tried to use a Dictionary object to store each ArrayCollection.  I couldn't get that to work properly.
    Essentially - my code loops on the number of components to add:
    for (var i:int = 0; i < numFormElements; i++)
              for (var j:int = 0; j < numvalues; j++)
                                    var valuefield:String = 'value_' + [j+1];
                                    var obj:Object=new Object();
                                    obj.label=instFields[i][valuefield].@label;
                                    obj.data=instFields[i][valuefield].@data;
                                    newDropDown.addItemAt(obj,j);
    Then I add the components:
              var c:ComboBox = new ComboBox ();
                c.labelField='label';
                c.name=numberOfElement.toString();                                  
                c.dataProvider=    newDropDown;
                _h1.addChild(c);
                numComboDropDwns.push(c);
    I need a way of looping, getting data and populating each component independently??
    Any ideas?
    Thanks,
    John

    I went a different route and solved the issue.  For someone looking at a similar problem - this what I ended up doing:
    I just loaded one array collection with data for all of the drop-downs on the form.  I then populated each dataprovider with individual elements from the array.
    for (var i:int = 0; i < numFormElements; i++)
    for (var j:int = 0; j < numvalues; j++)
                                    var valuefield:String = 'value_' + [j+1];
                                    var obj:Object=new Object();
                                    obj.label=instFields[i][valuefield].@label;
                                    obj.data=instFields[i][valuefield].@data;
                                    newDropDown.addItemAt(obj,elementCounter);
                                    elementCounter = elementCounter + 1;
    I keep track of the element #, number of values for each element and the overall index for the array.
    Each data provider is then loaded with the subset from the array:
    for (var z:int = (_counter - _numvalues) ; z < _counter; z++)
                                var _label:String=    newDropDown.getItemAt(z).label.toString();
                                var _data:String = newDropDown.getItemAt(z).data.toString();
                                c.dataProvider.addItem({label:[_label],data:[_data]});
    This seems to work nicely - each component is created and loaded with only their data.  I spent 3 days searching for a way to create a dynamic arraycollection at runtime.  I don't think it's possible - but I'm not sure it was the best method anyway.

  • How to create collection (query) based on report results?

    Hello everyone,
    I have the following report;
    I would like to create a collection based on the "Non Compliant" and the "Unable to find compatible TPM" so I can re-deploy with right-click tools.
    If the above is NOT the solution to create a group for redeployment. How would I address this?
    Thank you in advance for any help.

    Unfortunately, there is no straight-forward answer here. ConfigMgr console queries use WQL and only have visibility to a subset of the complete information in the database. Most things you are probably interested in creating queries from are probably visible,
    but that's not guaranteed. Additionally, they are named slightly differently also so it really just takes some trial and error and personal investigation to see what is there and what isn't. The place to start is to open the root\sms\site_<sitecode>namespace
    on the system hosting the SMS provider. The public reference for most of the classes is at
    http://msdn.microsoft.com/en-us/library/hh948405.aspx . These all directly map to data in the database but as mentioned, not all views in the DB have a corresponding WMI class.
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • Using bulk collect and for all to solve a problem

    Hi All
    I have a following problem.
    Please forgive me if its a stupid question :-) im learning.
    1: Data in a staging table xx_staging_table
    2: two Target table t1, t2 where some columns from xx_staging_table are inserted into
    Some of the columns from the staging table data are checked for valid entries and then some columns from that row will be loaded into the two target tables.
    The two target tables use different set of columns from the staging table
    When I had a thousand records there was no problem with a direct insert but it seems we will now have half a million records.
    This has slowed down the process considerably.
    My question is
    Can I use the bulk collect and for all functionality to get specific columns from a staging table, then validate the row using those columns
    and then use a bulk insert to load the data into a specific table.?
    So code would be like
    get_staging_data cursor will have all the columns i need from the staging table
    cursor get_staging_data
    is select * from xx_staging_table (about 500000) records
    Use bulk collect to load about 10000 or so records into a plsql table
    and then do a bulk insert like this
    CREATE TABLE t1 AS SELECT * FROM all_objects WHERE 1 = 2;
    CREATE OR REPLACE PROCEDURE test_proc (p_array_size IN PLS_INTEGER DEFAULT 100)
    IS
    TYPE ARRAY IS TABLE OF all_objects%ROWTYPE;
    l_data ARRAY;
    CURSOR c IS SELECT * FROM all_objects;
    BEGIN
    OPEN c;
    LOOP
    FETCH c BULK COLLECT INTO l_data LIMIT p_array_size;
    FORALL i IN 1..l_data.COUNT
    INSERT INTO t1 VALUES l_data(i);
    EXIT WHEN c%NOTFOUND;
    END LOOP;
    CLOSE c;
    END test_proc;
    In the above example t1 and the cursor have the same number of columns
    In my case the columns in the cursor loop are a small subset of the columns of table t1
    so can i use a forall to load that subset into the table t1? How does that work?
    Thanks
    J

    user7348303 wrote:
    checking if the value is valid and theres also some conditional processing rules ( such as if the value is a certain value no inserts are needed)
    which are a little more complex than I can put in a simpleWell, if the processing is too complex (and conditional) to be done in SQL, then doing that in PL/SQL is justified... but will be slower as you are now introducing an additional layer. Data now needs to travel between the SQL layer and PL/SQL layer. This is slower.
    PL/SQL is inherently serialised - and this also effects performance and scalability. PL/SQL cannot be parallelised by Oracle in an automated fashion. SQL processes can.
    To put in in simple terms. You create PL/SQL procedure Foo that processes SQL cursor and you execute that proc. Oracle cannot run multiple parallel copies of Foo. It perhaps can parallelise that SQL cursor that Foo uses - but not Foo itself.
    However, if Foo is called by the SQL engine it can run in parallel - as the SQL process calling Foo is running in parallel. So if you make Foo a pipeline table function (written in PL/SQL), and you design and code it as a thread-safe/parallel enabled function, it can be callled and used and executed in parallel, by the SQL engine.
    So moving your PL/SQL code into a parallel enabled pipeline function written in PL/SQL, and using that function via parallel SQL, can increase performance over running that same basic PL/SQL processing as a serialised process.
    This is of course assuming that the processing that needs to be done using PL/SQL code, can be designed and coded for parallel processing in this fashion.

  • How can I select a subset of the apps in iTunes to load to an iPod Touch

    My kids have collectively downloaded more apps to iTunes than will fit on thier iPod touchs. How can I select a subset of those apps to load to a particular iPod touch?

    Open itunes, connect ipod, go to apps tab, select what you want to sync, sync.
    iPod touch User Guide (For iOS 5.0 Software)

  • How to build a array with collected data

    Hi,
    I have collected data from serial port with VISA. Now I want to build a array with 100 date points. Should I connect VISA Read with Build Array directly? How to do it?
    PS: All of them are in a While Structure.
    Thank you!

    An inefficient way to create the array is to use the build array and a shift register as shown below. It's more effecient in terms of memory management to create the array and then use the replace array subset as shown in the other image. Of course, if you don't need the array inside the loop, just wire the value out of the while loop and on the exit tunnel, right click and select 'Enable Indexing'.
    Message Edited by Dennis Knutson on 07-03-2007 10:25 PM
    Message Edited by Dennis Knutson on 07-03-2007 10:26 PM
    Attachments:
    Crude Build Array.PNG ‏4 KB
    Better Build Array.PNG ‏6 KB

  • Unable to Update Collection from Tabular Form

    I have built several Tabular Forms where I have updated the apex_collection with the data entered into the form. Then I loop thru the collection and update the database.
    I now Copy a working form to create a new form using data from a different table. All I am doing is changing the underly apec_collection with a different select statement and give it a new collection name. The number of columns on the tabular form are the same as the working form.
    Now I run the form and I get ORA-01403: no data found Error UNABLE to UPDATE ROWS
    It is acting like it is not finding any data from the collection. But I put in the same selection critera for the update into a report below the tabular form and I see data just fine.
    Here is the code I am using to update the collection when the SAVE button is pressed (Process on Submit before Calculations).
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = 'IPR_MATRIX' and c001 = :P21_FACILITY
    and c002 = :P21_DEPT
    order by seq_id) loop
    c := c+1;
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>5,p_attr_value=>wwv_flow.g_f01(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f02(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>7,p_attr_value=>wwv_flow.g_f03(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>8,p_attr_value=>wwv_flow.g_f04(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>9,p_attr_value=>wwv_flow.g_f05(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>10,p_attr_value=>wwv_flow.g_f06(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>11,p_attr_value=>wwv_flow.g_f07(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>12,p_attr_value=>wwv_flow.g_f08(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>13,p_attr_value=>wwv_flow.g_f09(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>14,p_attr_value=>wwv_flow.g_f10(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>15,p_attr_value=>wwv_flow.g_f11(c));
    apex_collection.update_member_attribute (p_collection_name=> 'IPR_MATRIX',
    p_seq=> c1.seq_id,p_attr_number =>16,p_attr_value=>wwv_flow.g_f12(c));
    end loop;
    end;
    Any Ideas what I am doing wrong?

    c is set to 0
    It looks like I may have found my problem.
    There tabular form is limited by a where clause in the report to a subset of the collection. Making the collection match the same where clause seems to have fixed my problem.
    Not clear on why that works like that but it looks like I may have it working.

  • Clustering only a subset of documents

    I am using unsupervised classification with CTX_CLS.CLUSTERING. Our document table has several million rows and the user might only want to cluster a few thousand. Because this method of clustering uses the text index on the documents table is it possible to only cluster those few thousand without copying the text off to another table and creating a separate text index for the clustering? When the user wants to cluster 10-20K of content this method is too resource and time consuming.
    Here is the example given in the documentation
    /* set the preference */
    exec ctx_ddl.drop_preference('my_cluster');
    exec ctx_ddl.create_preference('my_cluster','KMEAN_CLUSTERING');
    exec ctx_ddl.set_attribute('my_cluster','CLUSTER_NUM','3');
    /* do the clustering */
    exec ctx_output.start_log('my_log');
    exec ctx_cls.clustering('collectionx','id','restab','clusters','my_cluster');
    exec ctx_output.end_log;
    Thanks

    Sorry, I missed this first time round.
    There is no direct way to create a cluster on a subset of the table.
    However, although you have to create an index to base the clustering on, you do NOT need to populate that index. As in the example at
    http://docs.oracle.com/cd/B28359_01/text.111/b28303/classify.htm#i1007174
    create index collectionx on collection(text)
       indextype is ctxsys.context parameters('nopopulate');So this is effectively instant. But you still need to copy the subset of the data. Can we avoid that?
    Yes, it seems we can. The CONTEXT index is really there just to tell clustering how to get and process the data. If we use a USER_DATASTORE procedure for the index, we can specify which rows should be processed and which should not. I've adapted the example from the doc to add a column to the table called USE_THIS_ROW. If set to 1, then the row is used. If set to 0, then it isn't. And you can see that the clustering results do not include any rows with USE_THIS_ROW = 0.
    -- Clustering example from the docs, adapted to use a user_datastore to decide which rows to process
    /* collect document into a table */
    drop table collection;
    create table collection (id number primary key, text varchar2(4000), use_this_row number);
    insert into collection values (1, 'Oracle Text can index any document or textual content.', 1);
    insert into collection values (2, 'Ultra Search uses a crawler to access documents.', 0);
    insert into collection values (3, 'XML is a tag-based markup language.', 1);
    insert into collection values (4, 'Oracle Database 11g XML DB treats XML as a native datatype in the database.', 1);
    insert into collection values (5, 'There are three Text index types to cover all text search needs.', 0);
    insert into collection values (6, 'Ultra Search also provides API for content management solutions.', 1);
    create or replace procedure my_proc
         (rid in rowid, tlob in out nocopy clob) is
    begin
         -- this "for loop" will only execute once but it's easier this way than declaring a
         -- separate cursor
         for c in ( select text, use_this_row from collection
                    where rowid = rid ) loop
              if c.use_this_row = 1 then
                    tlob := c.text;
              else
                    tlob := '';
              end if;
         end loop;
    end;
    list
    show errors
    exec ctx_ddl.drop_preference('my_datastore')
    exec ctx_ddl.create_preference('my_datastore', 'user_datastore')
    exec ctx_ddl.set_attribute('my_datastore', 'procedure', 'my_proc')
    create index collectionx on collection(text)
       indextype is ctxsys.context parameters('datastore my_datastore nopopulate');
    drop table restab;
    /* prepare result tables, if you omit this step, procedure will create table automatically */
    create table restab (      
           docid NUMBER,
           clusterid NUMBER,
           score NUMBER);
    drop table clusters;
    create table clusters (
           clusterid NUMBER,
           descript varchar2(4000),
           label varchar2(200),
           sze   number,
           quality_score number,
           parent number);
    /* set the preference */
    exec ctx_ddl.drop_preference('my_cluster');
    exec ctx_ddl.create_preference('my_cluster','KMEAN_CLUSTERING');
    exec ctx_ddl.set_attribute('my_cluster','CLUSTER_NUM','3');
    /* do the clustering */
    exec ctx_output.start_log('my_log');
    exec ctx_cls.clustering('collectionx','id','restab','clusters','my_cluster');
    exec ctx_output.end_log;
    select docid, clusterid, score from restab order by clusterid, docid;You could probably get the same results by using a FILTER column, with some rows set to IGNORE. I've not tried that.

  • PL/SQL - counting values' occurences in a collection - how to optimize?

    Hi all,
    I'm new here and working currently on my PhD thesis, using Oracle (XE) to do some data manipulation stuff.
    Following is defined:
    TYPE stat_col_type IS TABLE OF INTEGER;
    rows_lens stat_col_type;
    Using MULTISET UNION operations, I get the final rows_lens as a set of values, e.g. {1,2,3,1,1,2,2,2,3,3,3,3,3,3,3,1,1,2,1,1,4,5,6,2,2,2,3,3}.
    What I need is to count the occurences of the unique values :
    value of 1 : 7 occurences
    value of 2 : 8 occurences
    value of 3 : 10 occurences
    value of 4 : 1 occurence
    value of 5 : 1 occurence
    value of 6 : 1 occurence
    Ideally, the result should be a separate collection where the values become indexes (there are numbers, natural, unique and countable) and the number of occurences - their values :
    output_col( value ) := number-of-occurences ;
    Of course, I could just go through all the elements incrementing the counters in the output collection, but surely there must be a most efficient way - probably using POWERMULTISET or some kind of SUBSETS. As haven't been using /developing in/ Oracle for a longer period... it's better to ask :)
    Thanks in advance for your suggestions.
    Regards,
    Bart
    Edited by: user3698166 on 2010-01-16 13:44

    What I need is to count the occurences of the unique values :
    Following is defined:Why don't you define in PLSQL and not in SQL?
    It would be so much easier:
    SQL> create type stat_col_type as table of integer
    Type created.
    SQL> select column_value, count (column_value) cnt
      from table (
              stat_col_type (1,
                              2,
                              3,
                              1,
                              1,
                              2,
                              2,
                              2,
                              3,
                              3,
                              3,
                              3,
                              3,
                              3,
                              3,
                              1,
                              1,
                              2,
                              1,
                              1,
                              4,
                              5,
                              6,
                              2,
                              2,
                              2,
                              3,
                              3
    group by column_value
    order by column_value
    COLUMN_VALUE        CNT
               1          7
               2          8
               3         10
               4          1
               5          1
               6          1
    6 rows selected.
    SQL> drop type stat_col_type
    Type dropped.

  • How to query in memory on a subset?

    TopLink query in memory is quite an exclusive feature. However, it doesn't the obvious need for indexing. If anybody has exposure to .NET they will be aware of a paradimn shift of using SQL against structure in memory. I would like in my application to use TopLink query in memory to query against a specific list of persistent objects. I mean, I don't want TopLink iterate the 5000 instance of class X that is in the cache. I would like the following use cases be supported:
    - query against UOW registered object, excluding session cache
    - query against a specific list of registered objects
    Please provide existing API in TopLink 10.x and if only exist in EclipseLink, let me know the API.
    If API is missing, please create enhancement request and let me know the number.

    Below are the use cases so that you can easily derive API needed:
    1- Load all instances of class X, the query for specific instances with where condition other than PK
    - if loading is just one time, then query should check both uow/session, so already supported, but need index if lot of data.
    - another way to see this, is that for each class that doesn't have too much instances, we want to load everything in memory, then redirect all query against the class to be in memory.
    2- Batch method handling a range or subset. Like on a domain having many organizations. Start by getting all timesheets of organization X for last week from DB for optimization purpose. Then code start to classify/process the data, like query in memory for timesheets of this subset with state x, then y, z. This last query could just be against UOW, because just loaded the data. However, next query, which is againt only timesheet with state x, should ideally be against the list of timesheet with state x already populated in a collection. So having scope on UOW should be used only for performance, but having scope on a specific collection provide both specific result and performance. This use case may seems weird, but in complex/legacy application, it's often the case that we have existing not batch oriented code, which query for similar subset one after another which is not performant. Then faster refactoring to get performance, is to try to not modify existing not batch oriented query but redirect to memory when we are able to insure that memory is loaded with data needed before jumping on the not batch oriented legacy code.
    3- Simplification of iteration by moving from verbose Java to SQL. We do have lot of code having a Collection of a Map having a Map. Then iterate when looking at some state of the leaf item we still filter out stuff. Be able to query in memory against collection/set, should simplify our code.
    4- Remove duplicate SQLs. Complex application may end-up with different module calling same module to get a piece of information, so duplicate SQLs sent to DB if query is not against PK. Like select * from X where FK = y. If FK is unique, then I can avoid all duplicate SQLs to be sent to DB by looking first in UOW if any instances of object X exist with FK = y. In this case I want to look only in UOW for performance reason because index is not supported.

  • Block \ deny option to deploy mandatory advertisements to collections

    In CM 2007; I was able to write an SQL trigger on insert\update and attach it to a database table so when anyone made a required\mandatory advertisement to the all systems or all desktops and workstations collections it would rollback the transaction. This
    worked really well and kept my colleagues from deploying mandatory Task sequences to every computer by mistake :)
    I do not want to make it so that other users cannot create other collections, or have to manually assign permissions every time a new collection is created to the users.
    I modified the trigger to work with CM2012, but alas it does not work. For some reason ALL advertisements are hitting this trigger, not just mandatory\required ones. This is despite the fact that optional ones have the value offertypeid = 1.
    ALTER TRIGGER [dbo].[tr_ERRORON_MANDATORY_ADV_ALLSYSTEMS]
       ON  [dbo].[ProgramOffers_G]
       AFTER INSERT,UPDATE
    AS
    IF EXISTS (Select CollectionID, Offertypeid from dbo.programoffers_g where CollectionID in ('SMS00001','SMSDM003') AND (Offertypeid = '0'))
    BEGIN
        -- SET NOCOUNT ON added to prevent extra result sets from
        -- interfering with SELECT statements.
        SET NOCOUNT ON;
        RAISERROR ('Cannot Create Mandatory Advertisement to the all systems group due to SMU Policy.', 16,1)
    ROLLBACK TRANSACTION
    END

    You might be able to do something with a WMI trigger on the CM provider. But IMO the real advantage of CM12 is RBA, particularly in lager orgs.
    Why do all CM12 staff need access to all devices? Why can't you restrict most of the admins to just Workstations or a subset of workstations?
    http://www.enhansoft.com/
    I did more research, it seems that collections cannot be controlled used rba.
    "There are no procedures to configure collections for role-based administration. Collections do not have a role-based administration configuration; instead, you assign collections to an administrative user when you configure the administrative user. The
    collection security operations that are enabled in the users assigned security roles determine the permissions an administrative user has for collections and collection resources (collection members)."
    Basically I am the sys admin; and we have four users at two sites.  I want to make sure they do not deploy anything mandatory to all systems as has been mistakenly done in the past which is a HUGE problem.
    It looks like I can go to administration->security->Administrative Users -> security scopes and modify the account name properties, go to security scopes, press only the instances of objects that are assigned to the specified scopes and explicitly
    add collections which they can administer.
    That works great; but these other users will be the ones creating collections and managing applications not me. I do not want them to have to contact me each time they create a collection so I can add it to their security scope. Is this correct?

Maybe you are looking for

  • External monitor for macbook pro with dead screen

    Macbook pro built in 2007 has a dead screen but is otherwise ok. Connected external monitor displays only the astral starburst screen on all macs. How can I get the monitor to display my desktop if I can't see the macbook screen?

  • How to Restrict the Rows In Pivot Table

    Hi All, how to Restrict the Row in the Pivot table. My Requirement is like this. i have to show the top 10 values in the pivot table but My report is show all the values. how can we achieve this. any quick solution for this appreciated. Thanks, Yogi.

  • Commision to sales employee

    Hi, I like to calculate sales commission to sales employee every month end after sales closing. The scenario is: Upon achievement of 100% of targeted sales - commision is 4% of total sales Upon achievement of 95% of targeted sales - commision is 2% o

  • W540 Express Card Chipset

    Hi there, I'm trying to figure out if I can use my RME Fireface 800 Audio Interface with the W540. It is firewire 800 so my two options are either thunderbolt > firewire adapter....or getting a firewire card for the Express 34 slot. Could anyone tell

  • Removing table gaps on catalog pages

    Has anyone found a solution to the following? Instead of using products on a Catalog page, I want to add my own images and direct them as needed. When I do this, I get a gap under the category and Cart Summary as seen here: http://advantagerigging.co