Can java quickly produce an  array with specified values?

In Fortran I can quickly generate an array by typing
Dimension SMF(20,2)
DATA SMF/25*1.,3*0.,9*1.,3*0./
this creates SMF with the value 1 in allocations 1 to 25, 0 in 26 to 27 and so on .
Is there a way for java to do this ?

Not necessarily. Maybe you can write a general Matrix type (an interface) and then write an implementation of Matrix in which its values are specified by an algorithm. So maybe your code would have lines like:
Matrix m1 = new InitWithHardcodedValuesMatrix("{ { 1 2 } { 3 4 }}");
Matrix m2 = new InitWithFormulaMatrix("/25*1.,3*0.,9*1.,3*0./");Or maybe someone has already done this. Have you tried Google?
Anyway, the primary purpose of Java is not formula translation, so it's not surprising that it doesn't have this kind of thing built into the standard libraries.

Similar Messages

  • MapBuilder Error:Can not find a GeoRaster object with specified rdt and rid

    Hello,
    I can't GeoRaster data in the preview of the MapBuilder and MapViewer. The GeoRasterViewer shows the Raster images without problems.
    MapBuilders error message:
    19.11.2008 13:07:11 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    19.11.2008 13:07:11 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    19.11.2008 13:07:11 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    The errror message of MapViewer is nearly the same with some more informations about the spatial query and the coordintes of the query window. If I run that spatial query in the sqldeveloper it returns a result!
    I did following stebs:
    - saved a tiff-Image in a GeoRaster table with pyramid an tiled images.
    - checked the sdo_geom_metadata --> they are correct
    - checked the sdo_georaster object for the rdt table name and rasterid --> they are correct
    - checked the rdt table --> objects with that rid are saved
    - checked the mdsys.sdo_geor_sysdata table --> entry is correct
    - validate the geraster with the sdo_geor.validategeoraster function --> object is valid
    - updated the spatial extend of the image and try again the preview functio--> the same error
    The databse server is a virtual Linux server with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit.
    The web server is a Window 2003 R2 Server with a weblogic server and mapviewer patch 5 (Ver1033p5_B081010).
    For a test I did the same (the same table script, the same raster data, the same import method) on a developer pc (WinXP Pro SP2) with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 (32bit) the same mapbuilder version but with the MapViewer QuickStartKid and it works fine!!!
    Has anyone an idea?
    Greeting,
    Cord
    Edited by: Corti on Nov 19, 2008 2:14 PM

    Hi Joao,
    Thanks so far.
    I'm previewing a GeoRaster theme. I created it with the MapBuilder GeoRaster wizard. The theme difinition is (out of the export file):
    RAS_DGK|
    null|
    RAS_DGK|
    GEORASTER|
    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster">
    </styling_rules>|
    (GeoRaster table name is "RAS_DGK", theme name is also "RAS_DGK")
    I get following log information:
    preview without a coordinate or scale:
    MapBuilder Error (as pop up): MAPVIEWER 01005: no spatial data to render
    log file:
    20.11.2008 10:17:27 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-43
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: -Infinity,-Infinity,NaN,NaN
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER, grt.GEORASTER.metadata.getClobVal() from RAS_DGK grt
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:17:27 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:17:27 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    preview with a center coordinate of the image and a scale:
    20.11.2008 10:18:43 oracle.sdovis.SRS getOptimalQueryWindow
    AM FEINSTEN: *** isGeodetic=false, unit=METER
    20.11.2008 10:18:43 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-45
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: 2550045.7746478873,5608500.0,2551954.2253521127,5609500.0
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER, grt.GEORASTER.metadata.getClobVal() from RAS_DGK grt WHERE MDSYS.SDO_FILTER(grt.GEORASTER.spatialextent, MDSYS.SDO_GEOMETRY(2003, 31466, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?,?,?,?)), 'querytype=WINDOW') = 'TRUE'
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:18:43 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:18:43 oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on loading features: 234ms.
    20.11.2008 10:18:43 oracle.sdovis.RenderingEngine prepareForRendering
    AM FEINSTEN: xfm: 0.284 0.0 0.0 -0.284 -724212.9999999999 1593097.9999999998
    20.11.2008 10:18:43 oracle.sdovis.ImageRenderer renderGeoRasterTheme
    WARNUNG: GeoRaster theme RAS_DGK has no rendered images.
    20.11.2008 10:18:43 oracle.sdovis.VectorRenderer render
    FEINER: time to render theme RAS_DGK with 0 styled features: 0ms
    20.11.2008 10:18:43 oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on rendering: 16ms
    If I run the sql statement in the log file, it returns a result.
    select grt.georid, grt.GEORASTER, grt.GEORASTER.metadata.getClobVal()
    from ras_dgk grt
    WHERE MDSYS.SDO_FILTER(grt.GEORASTER.spatialextent,
    MDSYS.SDO_GEOMETRY(2003, 31466, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(2550045.7746478873,5608500.0,2551954.2253521127,5609500.0)), 'querytype=WINDOW') = 'TRUE';
    GEORID
    2
    GEORASTER
    MDSYS.SDO_GEORASTER(20001,MDSYS.SDO_GEOMETRY(2003,31466,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(2550000,5608000,2552000,5610000)),RDT_RAS_DGK,522,oracle.xdb.XMLType@194a7ec)
    GEORASTER.metadata.getClobVal()
    <georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
    <objectInfo>
    <rasterType>20001</rasterType>
    <isBlank>false</isBlank>
    <defaultRed>1</defaultRed>
    <defaultGreen>1</defaultGreen>
    <defaultBlue>1</defaultBlue>
    </objectInfo>
    <rasterInfo>
    <cellRepresentation>UNDEFINED</cellRepresentation>
    <cellDepth>8BIT_U</cellDepth>
    <totalDimensions>2</totalDimensions>
    <dimensionSize type="ROW">
    <size>6299</size>
    </dimensionSize>
    <dimensionSize type="COLUMN">
    <size>6299</size>
    </dimensionSize>
    <ULTCoordinate>
    <row>0</row>
    <column>0</column>
    </ULTCoordinate>
    <blocking>
    <type>REGULAR</type>
    <totalRowBlocks>4</totalRowBlocks>
    <totalColumnBlocks>4</totalColumnBlocks>
    <rowBlockSize>2048</rowBlockSize>
    <columnBlockSize>2048</columnBlockSize>
    </blocking>
    <interleaving>BSQ</interleaving>
    <pyramid>
    <type>DECREASE</type>
    <resampling>NN</resampling>
    <maxLevel>6</maxLevel>
    </pyramid>
    <compression>
    <type>NONE</type>
    </compression>
    </rasterInfo>
    <spatialReferenceInfo>
    <isReferenced>true</isReferenced>
    <SRID>31466</SRID>
    <modelCoordinateLocation>UPPERLEFT</modelCoordinateLocation>
    <modelType>FunctionalFitting</modelType>
    <polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScale="1" columnScale="1" xScale="1" yScale="1" zScale="1">
    <pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>17668678.695368 0 -3.14949718277477</polynomialCoefficients>
    </pPolynomial>
    <qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1</polynomialCoefficients>
    </qPolynomial>
    <rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>-8031218.31607409 3.14949718277477 0</polynomialCoefficients>
    </rPolynomial>
    <sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1</polynomialCoefficients>
    </sPolynomial>
    </polynomialModel>
    </spatialReferenceInfo>
    <layerInfo>
    <layerDimension>BAND</layerDimension>
    <subLayer>
    <layerNumber>1</layerNumber>
    <layerDimensionOrdinate>0</layerDimensionOrdinate>
    <layerID>1</layerID>
    <colorMap>
    <colors>
    <cell value="0" blue="255" red="255" green="255" alpha="255"/>
    <cell value="1" blue="0" red="0" green="0" alpha="255"/>
    </colors>
    </colorMap>
    </subLayer>
    </layerInfo>
    </georasterMetadata>
    I checked also the content of rdt table and it contains entries with that raster id (= 522).
    Finally the log file when I use the preview directly on the GeoRaster table without a theme:
    20.11.2008 10:23:46 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-55
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: -Infinity,-Infinity,NaN,NaN
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER from RAS_DGK grt where grt.GEORASTER.rasterid = ? and grt.GEORASTER.rasterdatatable = ?
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:23:46 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:23:46 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    If you need more information - please ask for it.
    Cord

  • Fill array with Hue values

    Trying to build (simple) color palette, but keep getting ArrayIndexOutOfBoundsException: 0 when trying to fill the array with Hue values (Saturation and Brightness remain 100%):
    private Color[] hsb = new Color[numberOfCircles];
    float h=0;
    float raise=(1.f/numberOfCircles);
    for (int i=0; i<stKrogcev; i++) {
        hsb=Color.getHSBColor(h,1.0f,1.0f); //getHSBColor: "Creates a Color object based on the specified values for the HSB color model."
    h+=raise;
    }What am I doing wrong?
    What other way could you fill array (Color, int, float, ...) with Hue values?
    This is what I have thus far (only colors missing; not sure whether Sun supports images):  [http://www.shrani.si/f/1G/uM/v29MKIC/palette.jpg]. First three columns in the right-hand table are awaiting RGB values respectively, the last column gets Hue value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    pbrockway2, numberOfCircles (or stKrogcev ) is an int, and is NOT zero. That Color[] hsb is zero.
    import javax.swing.*;
    import java.awt.*;
    public class BarvnaPaleta {
         public static void main (String[] args) {
              System.out.print("Stevilo krogcev: ");
              int n = BranjePodatkov.preberiInt(); // BranjePodatkov: just some custom class for reading input
              Okno o = new Okno(n);
              o.setVisible(true);
    class Okno extends JFrame {
         RisalnaPlosca risalna;
         public Okno(int n) {
              setTitle("Barvna Paleta");
              setSize(1200,900);
              setLocation(0,0);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              risalna = new RisalnaPlosca(n);
              add(risalna);
    class RisalnaPlosca extends JPanel {
         private final int ROB = 300;     
         int     stKrogcev;
         private int izhX, izhY;     
         private int     r1;
         private int     sirina = 60;     
         private int     visina = 20;     
         private double x, y, r2, r3;     
         private double vmesniKot;
         private double polovicaVmesnegaKota;
         //the much needed color arrays
         public Color[] hsb = new Color[stKrogcev];     
         private String[] red = new String[stKrogcev];     
         private String[] green = new String[stKrogcev];     
         private String[] blue = new String[stKrogcev];     
         public RisalnaPlosca(int n) { //constructor     
              stKrogcev = n;
              setBackground(Color.white);
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              izhX = getWidth()/2 -r1;
              izhY = getHeight()/2 -r1;          
              vmesniKot=(2*Math.PI/stKrogcev);
              polovicaVmesnegaKota=(vmesniKot)/2;          
              r1=getHeight();
              r3=(r1*Math.sin(polovicaVmesnegaKota))/(1+Math.sin(polovicaVmesnegaKota));
              r2=r1-r3;                    
              narisiKrog(g);
              napolniHSB(g); //  LINE 53
              narisiKrogce(g);
         private void narisiKrog(Graphics g) { //draw the BIG Circle
              g.setColor(Color.BLACK);
              g.drawOval(0, 0, r1, r1);
         private void narisiKrogce(Graphics g) { //draw small circles (as many as user wants, max. is 256 of Hue values!
              for(int i=0; i<stKrogcev; i++) {
                   x=(r2/2)*(Math.cos(vmesniKot*i)+1);
                   y=(r2/2)*(Math.sin(vmesniKot*i)+1);
                           //can't use below two because of the "fillHSB"=="napolniHSB" method not working
                   //Color c = new Color(Integer.parseInt(red),Integer.parseInt(green[i]),Integer.parseInt(blue[i]));
                   //g.setColor(c);
                   g.drawOval((int)x, (int)y, (int)r3, (int)r3);
                   narisiLegendo((int)x,(int)y, i, g); //draw a legend (last method)
         private void napolniHSB(Graphics g) { //fillHSB method
    float h=0, raise=1.0f/stKrogcev;
    for (int i=0; i<stKrogcev; i++) {
    hsb[i]=Color.getHSBColor(h,1.0f,1.0f); // LINE 75
    red[i]=Integer.toString(hsb[i].getRed()); // this and below two for converting HSB/HSL into RGB
    green[i]=Integer.toString(hsb[i].getGreen());
    blue[i]=Integer.toString(hsb[i].getBlue());
    h+=raise;
         private void narisiLegendo(int x, int y, int i, Graphics g) { //draw a legend, i.e. 4 right columns
    //can't use drawString as there are no color arrays (yet)
                   g.drawLine((int)(x+r3/2),(int)(y+r3/2),getWidth()-ROB,(visina+i*visina)+visina/2);
                   g.drawRect(getWidth()-ROB, (visina+i*visina), sirina, visina); //Red
                   //g.drawString(red[i], getWidth()-ROB, (visina+i*visina));
                   g.drawRect(getWidth()-ROB+sirina, (visina+i*visina), sirina, visina); //Green
                   //g.drawString(green[i], getWidth()-ROB, (visina+i*visina));
                   g.drawRect(getWidth()-ROB+2*sirina, (visina+i*visina), sirina, visina); //Blue
                   //g.drawString(blue[i], getWidth()-ROB, (visina+i*visina));
                   g.drawRect(getWidth()-ROB+3*sirina, (visina+i*visina), sirina, visina); //Hue
                   //g.drawString(, getWidth()-ROB, (visina+i*visina));

  • Deprecated system parameters with specified values:

    Hi ,
    I am getting below in alert log:
    Deprecated system parameters with specified values:
    remote_os_authent
    IS this parameter is suppotable in 11G and also how can i remove it from SP file with out bouncing the instance.
    thanks..

    1) It is deprecated in 11g as er your alert log message. http://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams199.htm
    2) Set it in your spfile to FALSE which will reset this back to the default. This can't be changed dynamically and you will have to reboot your instance.
    alter system set remote_os_authent=false scope=spfile;

  • How Can I replace newScale Text Strings with Custom Values?

    How Can I replace newScale Text Strings with Custom Values?
    How can I replace newScale text strings with custom values?
    All  newScale text is customizable. Follow the procedure below to change the  value of any text string that appears in RequestCenter online pages.
    Procedure
    1. Find out the String ID of the text string you would like to overwrite by turning on the String ID display:
    a) Navigate to the RequestCenter.ear/config directory.
    b) Open the newscale.properties file and add the following name-value pair at the end of the file:res.format=2
    c) Save the file.
    d) Repeat steps b and c for the RmiConfig.prop and RequestCenter.prop files.
    e) Stop and restart the RequestCenter service.
    f) Log  in to RequestCenter and browse to the page that has the text you want  to overwrite. In front of the text you will now see the String ID.
    g) Note down the String ID's you want to change.
    2. Navigate to the directory: /RequestCenter.ear/RequestCenter.war/WEB-INF/classes/com/newscale/bfw.
    3. Create the following sub-directory: res/resources
    4. Create the following empty text files in the directory you just created:
    RequestCenter_0.properties
    RequestCenter_1.properties
    RequestCenter_2.properties
    RequestCenter_3.properties
    RequestCenter_4.properties
    RequestCenter_5.properties
    RequestCenter_6.properties
    RequestCenter_7.properties
    5. Add the custom text strings to the appropriate  RequestCenter_<Number>.properties file in the following manner  (name-value pair) StringID=YourCustomTextString
    Example: The StringID for "Available Work" in ServiceManager is 699.
    If you wanted to change "Available Work" to "General Inbox", you  would add the following line to the RequestCenter_0.properties file
         699=General Inbox
    Strings are divided into the following files, based on their numeric ID:
    Strings are divided into the following files, based on their numeric ID:
    String ID  File Name
    0 to 999 -> RequestCenter_0.properties
    1000 to 1999 -> RequestCenter_1.properties
    2000 to 2999 -> RequestCenter_2.properties
    3000 to 3999 -> RequestCenter_3.properties
    4000 to 4999 -> RequestCenter_4.properties
    5000 to 5999 -> RequestCenter_5.properties
    6000 to 6999 -> RequestCenter_6.properties
    7000 to 7999 -> RequestCenter_7.properties
    6. Turn off the String ID display by removing (or commenting out) the line "res.format=2" from the newscale.properties, RequestCenter.prop and RmiConfig.prop files
    7. Restart RequestCenter.
    Your customized text should be displayed.

    I've recently come across this information and it was very helpful in changing some of the inline text.
    However, one place that seemed out of reach with this method was the three main buttons on an "Order" page.  Specifically the "Add & Review Order" button was confusing some of our users.
    Through the use of JavaScript we were able to modify the label of this button.  We placed JS in the footer.html file that changes the value of the butt

  • Search Array with multiple values

    Hello,
    I've been helped with the prototype below by blemmo (thanks).
    It allows me to search my array using one property == a
    value.
    Now, I'd like to use it to:
    if ((prop1 == val1) &&(prop2 == val2) &&
    (prop3 == val3) {
    // search array for all values in array with the values of
    val1, val2 and val3
    Also, a way to search if one of the prop and val's are blank,
    ie...
    ((prop1 == val1) &&(prop2 == val2) && (prop3
    == val3)
    where prop2 and val2 are "undefined"
    so the search will only search for the prop and val that are
    not "undefined"
    make since? Don't know where to start.
    help and thanks in advance.

    it is an array like this.. but with more properties... also,
    is it better to use XML to load large arrays or is it ok to use
    actionscript in the file.
    which is faster to load? say if I had an array of 150
    elements?
    myArray = [{myname:"bob", county:"skagit", city:"Sedro
    Woolley", id:1,
    pic:"1.jpg",pic1:"2.jpg",pic2:"3.jpg",pic3:"4.jpg"},
    {myname:"bob", county:"skagit", city:"Sedro Woolley", id:1,
    pic:"1.jpg",pic1:"2.jpg",pic2:"3.jpg",pic3:"4.jpg"

  • Can the Delivery Date be left with no value in Purchasing Order?

    Hi SAP Experts,
    Good day!  I just want to ask if it is possible for the Delivery Date in the Purchase Order to be left with no value?  Whenever we remove the delivery date, it comes back when we save the PO.  Is there a way for it to be blank?
    Thanks,
    Matt

    hi Senthil P,
    Here is the situation.  For most of the PO that we are creating, we rarely use the delivery time.  However, there are rare occasions where we put the delivery date.  We made an enhancement of our PO print out and the date in the delivery date field was taken from the table.  Is there a way where the delivery date in the printout can be left blank and show it when we need to?
    Thanks,
    Matt

  • Build an array with 2 values assigned to 1 dimension

    I am wanting to build a 1D array where two values are assigned to each dimension.  For example:
    Index 0 would have a 1 and 4 assigned to it
    Index 1 would have a 2 and 3 assigned to it
    Index 2 would have a 0 and 1 assigned to it.
    Then I can unbundle this arrayand grab the two values for index 0, index 1, etc....  I want to put this array inside a typedef control.  Is this possible?
    Solved!
    Go to Solution.

    Thanks for the replies.  I considered using a cluster and had the typedef control modified to include the cluster.  I may just go back to this method if this is the simplest for the code I am modifiing.
    A 2D array assigns two values i.e. row and column to one number.  I need it the other way around.
    Here is what I am trying to do.  I need to control a rotary valve.  I am using compact filedpoint to control the rotary valve.  The valve requires a pulse (1 then 0) for the rotary valve to move 1 position. If the valve is on channel 1 of the fieldpoint module and I want it to turn to position 2, the I send two pulses to channel 1. 
    My thinking is I will have two values associated per rotary valve... a channel and a pulse value. So for example, valve 0 has a Boolean and a numeric value assigned to it in an array. Although, it doesn't have to be a boolean and a numeric.  it could be 2 numeric values for simplicity.
    I hope this makes sense because without knowing this posting a VI or image is useless.  Its the chicken before the egg thing. :-)

  • Populate input array with spreadsheet values

    Is it possible to populate an input array with values from a text or spreadsheet file? If so, how is it done?
    Solved!
    Go to Solution.

    Hi Joseph,
    "to be more exact":
    load the [text] file and use "spreadsheet string to array" (older LV versions) or use "read spreadsheet file" (LV8+)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can i combine a string array with a waveform array and write this to a file.

    I am trying to set my VI up so that I can enter test information (notes to myself) and combine that with the time and date then write this as well as the waveform data from the daq to a spreadsheet file.  I am sure this is a simple task but I am new to LabView so any help would be very appreciated.

    An XML file is not a spreadsheet-formatted file, so that's not likely to help...
    Simply call the Write To Spreadsheet File twice. The first time you wire in a 1D array of strings
    which is your test information. Then, you call it when you're writing out
    your data. Make sure you wire a True constant to the "append" input for
    that function.

  • Can Java be used to communicate with hardware?

    I work with electronics as a hobby, but wish to interface with my electronics so I'm trying to find a programming language that has good API's for hardware communication(most likely through a serial or parallel port).
    Can this be done with Java? I really like java and the fact that it's platform independant.

    I work with electronics as a hobby, but wish to
    interface with my electronics so I'm trying to find a
    programming language that has good API's for hardware
    communication(most likely through a serial or parallel
    port).
    Can this be done with Java? I really like java and the
    fact that it's platform independant.I used the serial communications API, and it's not hard to use. The thing is you loose the platform independence when you use (it has some platform specific things)

  • Anybody can suggest quick sample 'Hello World' with ADF/JSF to deploy on WC

    We are using JDeveloper 11g, and Web Center 10.1.3.2.
    We have Oracle Portals 10.1.2.0.2
    We want to develop a portlet and deploy it to WC 10.1.3.2 to use it in Portals 10.1.2.0.2.
    Could anybody suggest any working "Hello World' sample with ADF/JSF to deploy on WC 10.1.3.2 WSRP.
    TIA

    Just to clarify. Oracle Portal 10.12.0.2 did not support WSRP based portlets (this was introduced in 10.1.4 or Portal) as such you would need to develop a JPDK based portlet in order to use it in both Portal 10.1.2.0.2 and WebCenter. If you upgrade the portal to 10.1.4 you will be able to use a WSRP 1.0 based portlet in both products (WebCenter also supports the draft WSRP2.0 extensions so make sure that you register the correct WSDL file)
    If you are trying to use JSF components within the Portlet itself you will need to use the JSF Portlet Bridge which accounts for the differences in lifecycle between JSF and WSRP.

  • Strange issue with POF: byte array with the value 94

    This is a somewhat strange issue we’ve managed to reduce to this test case. We’ve also seen similar issues with chars and shorts as well. It’s only a problem if the byte value inside the byte array is equal to 94! A value of 93, 95, etc, seems to be ok.
    Given the below class, the byte values both in the array and the single byte value are wrong when deserializing. The value inside the byte array isn’t what we put in (get [75] instead of [94]) and the single byte value is null (not 114).
    Pof object code:
    package com.test;
    import java.io.IOException;
    import java.util.Arrays;
    import com.tangosol.io.pof.PofReader;
    import com.tangosol.io.pof.PofWriter;
    import com.tangosol.io.pof.PortableObject;
    public class PofObject1 implements PortableObject {
         private byte[] byteArray;
         private byte byteValue;
         public void setValues() {
              byteArray = new byte[] {94};
              byteValue = 114;
         @Override
         public void readExternal(PofReader reader) throws IOException {
              Object byteArray = reader.readObjectArray(0, null);
              Object byteValue = reader.readObject(1);
              System.out.println(Arrays.toString((Object[])byteArray));
              System.out.println(byteValue);
              if (byteValue == null) throw new IOException("byteValue is null!");
         @Override
         public void writeExternal(PofWriter writer) throws IOException {
              writer.writeObject(0, byteArray);
              writer.writeObject(1, byteValue);
    Using writer.writeObjectArray(0, byteArray); instead of writer.writeObject(0, byteArray); doesn't help. In this case byteArray would be of type Object[] (as accessed through reflection).
    This is simply put in to a distributed cache and then fetched back. No EPs, listeners or stuff like that involved:
         public static void main(String... args) throws Exception {
              NamedCache cache = CacheFactory.getCache("my-cache");
              PofObject1 o = new PofObject1();
              o.setValues();
              cache.put("key1", o);
              cache.get("key1");
    Only tried it with Coherecne 3.7.1.3.
    Cache config file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>my-cache</cache-name>
                   <scheme-name>my-cache</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>
              <distributed-scheme>
                   <scheme-name>my-cache</scheme-name>
                   <service-name>my-cache</service-name>
                   <serializer>
                        <class-name>
                             com.tangosol.io.pof.ConfigurablePofContext
                        </class-name>
                        <init-params>
                             <init-param>
                                  <param-type>string</param-type>
                                  <param-value>pof-config.xml</param-value>
                             </init-param>
                        </init-params>
                   </serializer>
                   <lease-granularity>thread</lease-granularity>
                   <thread-count>10</thread-count>
                   <backing-map-scheme>
                        <local-scheme>
                        </local-scheme>
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
         </caching-schemes>
    </cache-config>
    POF config file:
    <?xml version="1.0"?>
    <pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
         xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config coherence-pof-config.xsd">
         <user-type-list>
              <!-- coherence POF user types -->
              <include>coherence-pof-config.xml</include>
              <user-type>
                   <type-id>1460</type-id>
                   <class-name>com.test.PofObject1</class-name>
              </user-type>
         </user-type-list>
    </pof-config>

    Hi,
    POF uses certain byte values as an optimization to represent well known values of certain Object types - e.g. boolean True and False, some very small numbers, null etc... When you do read/write Object instead of using the correct method I suspect POF gets confused over the type and value that the field should be.
    There are a number of cases where POF does not know what the type is - Numbers would be one of these, for example if I stored a long of value 10 on deserialization POF would not know if that was an int, long double etc... so you have to use the correct method to get it back. Collections are another - If you serialize a Set all POF knows is that you have serialized some sort of Collection so unless you are specific when deserializing you will get back a List.
    JK

  • Can't write to strict typedef with Control Value:Set [Variant]

    Hey everyone,
    I inherited a project that uses stacked strict typedefs for the front panel, and I need to programmatically change one control, and it is within an event.  However, the control is a strict typedef in a strict typedef, and Control Valueet [Variant] has no effect on the specific control.  I have gotten the method to work in small test vi's without typedefs, so I'm pretty sure that is the problem.
    The only thing I can think of is that there is a unique way of referencing the control name through typedefs, and I don't know it.
    Any ideas?
    Thanks in advance,
    Jeff
    =============
    XP SP2, LV 8.2
    CLAD

    Lynn,
    Thanks for the reply.  It turns out that to programmatically Control Valueet [Variant] bundled controls, you can only pass in the top level bundle control name.  It took some tricky placement around my structures, but I eventually unbundled and bundled by name from the top level down to the bottom and back up to make it work.
    Thanks again
     - Jeff
    =============
    XP SP2, LV 8.2
    CLAD

  • Using an array with a function

    Hi all,
    I'm working on an order form where users choose a course they want to order from a drop-down list, then enter the number of licences they require. I'm trying to build in a 'volume-based' discount model the form, and would like to ask for some help in using arrays and how to use them in functions. I'm very new to this, and would appreciate any help you can provide!
    Basically, we have 3 products that can be ordered on the same form, and all have different discount models (i.e you get a different % discount for different numbers of licences ordered, depending on the course chosen). I'm storing the discount models in 3 separate two-dimensional arrays, then want to create a function that takes two parameters - the name of the array and the volume that the customer orders - to calculate the appropriate discount. I would then call the function on the change events of either the drop down list or the licence qty field.
    Below is my attempt so far (only one array here, but the others are the same syntax). This is held in a script object called DiscountCalculator in the form. The idea of the function is to loop through the array until it finds the correct course, then loop through the value field until it finds the correct discount:
    //code holds the discount model for each course in a 2 dimensional array. A new array is needed for each course.
    //Course 1
    var
    Course1Array = new Array(3);
    Course1Array[0]
    = new Array(2);Course1Array[0][0]
    = "49";  //'breakpoint' at which discount is appliedCourse1Array[0][1]
    = "0";   //discount % given for this no of licences
    Course1Array[1]
    = new Array(2);Course1Array[1][0]
    = "99";Course1Array[1][1]
    = "20";
    Course1Array[2]
    = new Array(2);Course1Array[2][0]
    = "199";Course1Array[2][1]
    = "25";
    function
    CalculateDiscount(CourseArray, value){
    for
    (var i = 0; i <= CourseArray.length; i++){
    if
    (value <= CourseArray[i][0]){
    return CourseArray[i][1]}
    I can use a MessageBox to return a specified value from the array on the click event, so that seems to be set up correctly. But when I try to tcall the function in the change event of the drop-down list on the form:
    DiscountCalculator.CalculateDiscount(fldCourse.rawvalue, fldqty.rawvalue)
    It doesn't work, usually complaining that "Course1Array is not defined". I think it must be some kind of syntax error, but I have trawled the internet looking for some examples and can't find any.
    I'd be grateful for any assistance.
    Thanks
    Matt

    It might be easy to solve these issues if you post your form.
    Post your form if it doesn't contain any confidential information.
    Nith

Maybe you are looking for