Populating Array

Hi,
I'm having trouble populating a 1D array using a Replace Array Subset function. The two arrays coming from the top are two separate ones. 
This program is supposed to compare two adjacent elements in one array and flows through a case structure. If true then it outputs an index integer if not then right now it outputs the default (don't know how to make it output nothing or skip). But using the output index, it indexes from another array to receive another corresponding element. I want to populate a new array with these elements which pass the decision process on the left. I think I'm supposed to use Replace Array Subset function but I don't know how to set the index for that function so it increments after each new element is put in. 
I initialized an array with 1000 spots but since I did that I couldn't really use append array.  
If there is another function I'm supposed to use or perhaps a totally easier approach to do this then ideas are welcome. I'm also trying to populate a text file with these elements but I don't know if that's going to work out either. 
Thanks!
Attachments:
06-27-12-block-half-array.PNG ‏31 KB

Ghoster wrote:
I don't really know why checking for inequality is unnecessary for dbl.
There are many discussions about hwo equality checks are invalid for floating point numbers due to rounding somewhere in the binary code.  Every computer language has this issue.
Ghoster wrote:
But no, that's not what I want. I want it to step each index of the new array and populate it with values based on the logic in the case structure. (not just the 0th element).  
How large is your initial array?  If it is less than 1000 elements, then your results make perfect sense.
Anyways, here's an example of what I was saying with the shift registers.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Update with Replace Array Subset.png ‏25 KB

Similar Messages

  • New to Java: Populating Arrays and searching

    I am really stuck. I need to know how to search for an array that is already populated. The user will type in a string, and the string must match with one of the populated array. What is the best way to go?

    You mean you want to know if a String matches an element in an array? If so, turn the array into a List and use contains();
    import java.util.*;
    String [] stringArray = // already populated
    List stringList = Arrays.asList(stringArray);
    now test:
    String s = // input from user
    if (stringList.contains(s)) {
    // found a match

  • Populating array of values in GlobalContainer.

    Dear Friends,
    I have a doubt in excecuting the GlobalContainer in UDF. It will be great if you guys help me out in solving it.
    I'm passing some array of values into UDF.After doing some validations I need to set these values in array of Global Container.Later in other UDF I've to retrieve the array of values from the Global Container.
    Can you  guys shed some light on what logic needs to be done ?
    Best regards,
    raj.

    Use Java Sections instead of GlobalContainer.
    Check this link: http://help.sap.com/saphelp_nw2004s/helpdata/en/49/1ebc6111ea2f45a9946c702b685299/frameset.htm
    on the java sections part.
    Basically you define the global variable in the Global Variables section. For example:
    List list = null;
    Then in initalization section, you initialize the global variable:
    list = new Vector();
    Then you could have your UDFs filling and later reading the variable (just read/write the <i>list</i> variable).
    In the Cleanup section, you can do for example:
    list.clear();
    Regards,
    Henrique.

  • How to create an element in component controler

    Hi Experts,
    I need to validate the data of a model node in component controler and add those validated records in other value node.  For that I need to write a loop where in i can repeat the records for validation.
    How can i create the element in the loop ?  I tried with below code as we do in View controler , but ! this is not allowing in compoent controler. Is there any way to do this ?
    IPrivateFinalTRAView.IFirstOutputElement FFM = wdContext.createFirstOutputElement();
    Regards,
    Suresh

    Hi,
    i am trying to copy all the resords from a model node to the value node which is available in the component controller,.
    after executing the model i am doing this copy operation, for the requirement i ahve converted some of the data into STRING type.
    int SalHistSize = wdContext.nodePt_Salhistory().size();
    // Populate Salary_History Table
    ArrayList arlQuotaTable = new ArrayList();
    // Creating the element for our Salary History Node
    IPublicFcCompHistory.ISalary_HistoryElement objsalhistnode = null;
    if(SalHistSize > 0){
    for (int k=0;k<SalHistSize;k++) {
    IWDNodeElement elementSalHist = wdContext.nodePt_Salhistory().getElementAt(k);
    objsalhistnode = wdContext.createSalary_HistoryElement();
    objsalhistnode.setAction_Date(elementSalHist.getAttributeValue("Action_Date").toString());
    objsalhistnode.setAction_Reason(elementSalHist.getAttributeValue("Action_Reason").toString());
    objsalhistnode.setAction_Type(elementSalHist.getAttributeValue("Action_Type").toString());
    objsalhistnode.setAnnual_Salary(elementSalHist.getAttributeValue("Annual_Salary").toString()+"  (CAD)");
    objsalhistnode.setCompensation_Sal(elementSalHist.getAttributeValue("Compensation_Sal").toString()+"  (CAD)");
    objsalhistnode.setPay_Area(elementSalHist.getAttributeValue("Pay_Area").toString());
    //          Adding the record to array List          
    arlQuotaTable.add(objsalhistnode);
    //          Bind the populated Array List to the View Table for Data population
    wdContext.nodeSalary_History().bind(arlQuotaTable);
    Try this dear,
    Cheers,
    APPARAO

  • Pass Class Object To FMS Using NetConnection.call Method

    Hello All,
    I have a custom class that defines several methods on itself
    to retrieve its data. This class object is then sent to FMS via the
    NetConnection.call method. Once received by FMS, FMS calls the
    remote method to dispaly the class object on connected clients
    (minus the originator).
    Now, standard properties are displayed correctly, but when I
    call the class method to retrieve the class data, no data is
    retrieved.
    My question is, can FMS handle class objects as parameters in
    a NetConnection call. If not, is there a better practice of
    applying methods to retrieve the class data? Example below...
    class com.QuizItem
    var numOfAnswers;
    var getAnswer;
    function QuizItem(question)
    this.numOfAnswers = 0;//<-- Returns correct number of
    answers
    this.getAnswer = function(answerNumberToGet)//<-- Does
    not return any data when called by client side script
    return this.answers[answerNumberToGet];//Already populated
    array
    Regards,
    Shack

    First, I know JAVA does not working "pass by
    reference". It's only working pass by value. (or call
    by value)But obviously you don't fully understand what it means.
    Isn't main_a and method_a alias?
    if there is not alias, why? please explain to me.No. They're two independent references coincidentally pointing to the same object. In your swap method, you move method_a to point to something else. This does not affect main_a.
    and why main_a.hashcode() is main_a's value?why not? What else should it be?
    I think It's mean copy object. but main_a and
    method_a, they have same object id! @_@;;;It means "copy reference", same object.

  • RE: (forte-users) Hi All....very urgent...Forte doesn'thandle La rge ar

    Okay, here's my three cents worth,
    Are you using Forte "Keep Alive" settings? If yes, you may simply have a
    time-out.
    While a partition is waiting for a reply from a database, it blocks and
    won't respond
    to anything, including pings to check if it's still alive. So, if the query
    takes longer to
    complete than the time-out period of the communication manager, then you
    will
    loose the connection to the partition.
    -----Original Message-----
    From: Aberdour George [SMTP:george.aberdourdet.nsw.edu.au]
    Sent: Sunday, February 13, 2000 11:39 AM
    To: 'Babu Raj'; kamranaminyahoo.com
    Subject: RE: (forte-users) Hi All....very urgent...Forte doesn't
    handle La rge array properly
    Hi,
    This sounds almost identical to a problem we have experienced.
    If it is the same problem it is because you have compiled a back-end
    load-balanced partition, but NOT the router that manages it.
    With such a configuration, attempts to send greater than a few thousand
    rows
    will fail - and it doesn't seem to matter what you set -fm to.
    You don't see the problem running distributed from your workspace because
    everything is interpreted.
    So just compile the router and try again.
    Hope this helps.
    George Aberdour
    (George.Aberdourdet.nsw.edu.au)
    -----Original Message-----
    From: Babu Raj [mailto:ibcsmartboyyahoo.com]
    Sent: Saturday, 12 February 2000 7:24
    To: kamranaminyahoo.com
    Subject: (forte-users) Hi All....very urgent...Forte doesn't handle
    Large array properly
    Hi All,
    Have anyone experienced problem of retrieving
    more than 1500 records from the database table, into
    the object.
    I use dynamic SQL statement, and populating Array
    object from the DBDataSet. When it runs from my
    workspace distributed, it works fine. But, when I make
    deployment, and install on the test bed, I face
    Network connection failure from the client machine. It
    looks like, server read the data from the Database,
    and while packaging it, to send it across to the
    client, server seems to run out ouf memory or couldn't
    maintain the connection with the client. I tried to
    set -fm flag on that partition, and separately setting
    FORTE_GC_SPECIAL too, but still no luck.
    we have increased, the rollback segment size on
    Oracle too, but still no luck.
    Appreciate, your suggestions, if you can,
    Thank you,
    Babu
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    Okay, here's my three cents worth,
    Are you using Forte "Keep Alive" settings? If yes, you may simply have a
    time-out.
    While a partition is waiting for a reply from a database, it blocks and
    won't respond
    to anything, including pings to check if it's still alive. So, if the query
    takes longer to
    complete than the time-out period of the communication manager, then you
    will
    loose the connection to the partition.
    -----Original Message-----
    From: Aberdour George [SMTP:george.aberdourdet.nsw.edu.au]
    Sent: Sunday, February 13, 2000 11:39 AM
    To: 'Babu Raj'; kamranaminyahoo.com
    Subject: RE: (forte-users) Hi All....very urgent...Forte doesn't
    handle La rge array properly
    Hi,
    This sounds almost identical to a problem we have experienced.
    If it is the same problem it is because you have compiled a back-end
    load-balanced partition, but NOT the router that manages it.
    With such a configuration, attempts to send greater than a few thousand
    rows
    will fail - and it doesn't seem to matter what you set -fm to.
    You don't see the problem running distributed from your workspace because
    everything is interpreted.
    So just compile the router and try again.
    Hope this helps.
    George Aberdour
    (George.Aberdourdet.nsw.edu.au)
    -----Original Message-----
    From: Babu Raj [mailto:ibcsmartboyyahoo.com]
    Sent: Saturday, 12 February 2000 7:24
    To: kamranaminyahoo.com
    Subject: (forte-users) Hi All....very urgent...Forte doesn't handle
    Large array properly
    Hi All,
    Have anyone experienced problem of retrieving
    more than 1500 records from the database table, into
    the object.
    I use dynamic SQL statement, and populating Array
    object from the DBDataSet. When it runs from my
    workspace distributed, it works fine. But, when I make
    deployment, and install on the test bed, I face
    Network connection failure from the client machine. It
    looks like, server read the data from the Database,
    and while packaging it, to send it across to the
    client, server seems to run out ouf memory or couldn't
    maintain the connection with the client. I tried to
    set -fm flag on that partition, and separately setting
    FORTE_GC_SPECIAL too, but still no luck.
    we have increased, the rollback segment size on
    Oracle too, but still no luck.
    Appreciate, your suggestions, if you can,
    Thank you,
    Babu
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Please help!! Semester Project due in 3 days...........

    I have a connectivity problem where I have to select a number of vertices(N) and
    connect them with random non repeating edges(M). I have to test with cases
    M=.1xNxN, M=.2xNxN,.............M= .9xNxN. Well, it works up to M=.2xNxN when using 10 edges but I get a Stackoverflow error with more than M=.2xNxN.
    Please Please help. I have two classes
    import java.util.Random;import java.util.Scanner;
    * Write a description of class QuickUnion here.
    * @author (your name)
    * @version (a version number or a date)
    public class Union
        private Random generator;
        int E1,E2; int count = 0; int n = 50000;
         int a[] = new int [n];
        int b[] = new int [n];
         //Actual random number generator
         public int Generator(int gen){
             generator = new Random();      
            return generator.nextInt(gen);}
        //Method uses Random Generator to get E1,E2(or p,q) values
        public void Generator(int e1, int e2, int N){
            E1=Generator(N-1);
            E2=Generator(N-1);
            while(E1==E2){E2=Generator(N);}
            check(E1,E2,N);}
        //Method checks both array a and b at the same time for p,q or q,p values already generated
        public void check(int e1, int e2, int N){
            for(int i=0; i<a.length; i++){
                if(((a==e1) && (b[i]==e2)) || ((b[i]==e1) && (a[i]==e2))){
    Generator(0,0,N); }}
    a[count]=e1; b[count]=e2; count++;
    //Methods to view a and b arrays
    public void arrayShow(){
    for(int k=0; k<a.length; k++){System.out.print(a[k] + " ");
    public void arrayShow2(){
    for(int k=0; k<a.length; k++){System.out.print(b[k] + " ");
    import java.util.*; import java.util.Scanner;
    * QUICKFIND QUICKFIND QUICKFIND
    * @author Degrion Hill
    * @version 3160 Project Program
    public class Client2
    {public static void main(String[] args)
    int answer =0;
    int N,E1,E2,counter= 0;
    Scanner in = new Scanner(System.in);
    // User Input for amount of Vertices
    System.out.println("Enter the number of Vertices");
    N=in.nextInt();
    //Populating Array
    int id[] = new int [N];
    for(int i = 0; i < N; i++){id[i]=i;}
    //User input for amount of edges
    System.out.println("Enter the number of edges");
    int edges = in.nextInt();
    Union test = new Union();
    //Random Edge Generator
    while(counter<edges){
    test.Generator(0,0,N);
    //Assignment of Random number to p,q values to make edge
    int p = test.E1, q = test.E2;
    int t = id[p];
    //Quick Find Algorithm
    System.out.println("p=" + p + " " + "q=" + q); counter++;
    for(int k =0; k < N; k++){
    System.out.print(" " + id[k]);}
    System.out.print("\n");
    if (t==id[q])continue;
    for(int i = 0; i<N; i++)
    if(id[i]==t) id[i]=id[q];
    System.out.println("SORTED");
    //Sort the array before Counting groups(Using Bubble Sort)
    Sort test2 = new Sort();
    test2.bubble(id,0,id.length-1);
    for(int m =0; m < N; m++){
    System.out.print(" " + id[m]);}
    //Count changes in the array(groups)
    int y=0; int group=0;
    for(int x=0; x<N; x++){
    if(x==0){id[y]=id[x];}
    if(id[x] != id[y]){id[y]=id[x];group++;}}
    System.out.println();
    System.out.println(group+1 + " Group/s");
    System.out.print("");
    System.out.println("Run Again? [1 for YES, 2 for NO]");
    answer=in.nextInt();
    //(Testing) Shows a and b arrays to see if ALL cases for p,q are there
    if(answer==1){main(args);} test.arrayShow(); System.out.println(""); test.arrayShow2();

    Whithout diving into your code: StackOverFlowError occurs usually if you do a recursion and don't stop it before memory blows.

  • Image Coming from URLRequest Not Displaying?

    Hi,
      I have a main app here with a subclass that is supposed to "send images" based on the "parameters" that sends to a HTTPService.
      However, even though the url seems to be generating correctly, I could not see the image. Since my PHP is working fine with the url as shown in the trace statements from my app, I am assuming that there has to be something else that I am missing here.
      Below is the code that generates the image, is there something here I am missing?
    package map
         import colorize.*;    
         import com.zavoo.svg.*;    
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.net.URLLoader;
         import flash.net.URLRequest;
         import flash.net.URLVariables;    
         import mx.containers.Canvas;
         import mx.core.UIComponent;
        public class SvgMap extends UIComponent {
            public var canvas:Sprite;
            [Embed(source="USA_Counties_with_FIPS_and_names.svg")]
            public var usaMap:Class;
            public var paths:SvgPaths;                 
            private var patient_from:Array;   
            private var drive_time:Array;
            private var drive_distance:Array;
            private var college:Array;
            private var high_school:Array;
            private var income:Array;
            private var population:Array; 
            private var countyName:XMLList;
            private var stateColors:Array;
            private var horizontal_bar:Canvas;
        public function SvgMap():void {
                    canvas = new usaMap();
                    canvas.width = 650;
                    canvas.height = 500;
                    addChild(canvas);
                    trace("Canvas Parent: " + canvas.parent);                            
        public function passBox(passedBox:Canvas):void{
            horizontal_bar = passedBox;       
         public function setParameters(passedArray:Array,passedArray7:Array):void {
                from = passedArray;          
                stateColors= passedArray7;   
                changeMap(from,stateColors);           
            public function changeMap(passedArray:Array,passedArray7:Array):void{   
            removeChild(this.canvas);              
            canvas = new Sprite();
            canvas.width = 600;
            canvas.height = 500;
            addChild(canvas);     
            var from_string:String = from.join("-");
            var state_colors_string:String = stateColors.join("-");       
            var loader:URLLoader = new URLLoader();          
            var url:String = "http://tdc-queuing/test/generic.php?from=" + from_string + "&state_colors=" + state_colors_string;
            var variables:URLVariables = new URLVariables();
            variables.patient_from= patient_from_string;
            variables.state_colors = state_colors_string;
            var encode:String= encodeURI(url);   
            var pattern:RegExp = /#/g;
            var decode:String = encode.replace(pattern,"%23");   
            var request:URLRequest = new URLRequest(decode);       
            request.method = "GET";       
            loader.load(request);       
            loader.addEventListener(Event.COMPLETE, onLoadComplete);
            public function onLoadComplete(event:Event):void {
                    var loader:URLLoader = URLLoader(event.target);              
                    paths = new SvgPaths(loader.data);      //the canvas exists
                    paths.drawToGraphics(this.canvas.graphics, 2, 10, 10);
    Thanks for your help. Anything is appreciated.
    Alice

    Hi,
    For testing purposes, here is the package:
    package map
         import colorize.*;   
         import com.zavoo.svg.*;   
         import flash.display.Sprite;
         import flash.events.Event;
         import flash.net.URLLoader;
         import flash.net.URLRequest;
         import flash.net.URLVariables;   
         import mx.containers.Canvas;
         import mx.core.UIComponent;
        public class SvgMap extends UIComponent {
            public var canvas:Sprite;
            [Embed(source="USA_Counties_with_FIPS_and_names.svg")]
            public var usaMap:Class;
            public var paths:SvgPaths;                
            private var from:Array;  
            private var stateColors:Array;
            private var horizontal_bar:Canvas;
        public function SvgMap():void {
                    canvas = new usaMap();
                    canvas.width = 650;
                    canvas.height = 500;
                    addChild(canvas);
                    trace("Canvas Parent: " + canvas.parent);                           
        public function passBox(passedBox:Canvas):void{
            horizontal_bar = passedBox;      
         public function setParameters(passedArray:Array,passedArray7:Array):void {
                from = passedArray;         
                stateColors= passedArray7;  
                changeMap(from,stateColors);          
            public function changeMap(passedArray:Array,passedArray7:Array):void{  
            removeChild(this.canvas);             
            canvas = new Sprite();
            canvas.width = 600;
            canvas.height = 500;
            addChild(canvas);    
            var from_string:String = from.join("-");
            var state_colors_string:String = stateColors.join("-");      
            var loader:URLLoader = new URLLoader();         
            var url:String = "http://localhost/test/generic.php?from=" + from_string + "&state_colors=" + state_colors_string;
            var variables:URLVariables = new URLVariables();
            variables.from= from_string;
            variables.state_colors = state_colors_string;
            var encode:String= encodeURI(url);  
            var pattern:RegExp = /#/g;
            var decode:String = encode.replace(pattern,"%23");  
            var request:URLRequest = new URLRequest(decode);      
            request.method = "GET";      
            loader.load(request);      
            loader.addEventListener(Event.COMPLETE, onLoadComplete);
            public function onLoadComplete(event:Event):void {
                    var loader:URLLoader = URLLoader(event.target);             
                    paths = new SvgPaths(loader.data);      //the canvas exists
                    paths.drawToGraphics(this.canvas.graphics, 2, 10, 10);
    And, this is the PHP:
    <?php
    header("Content-type: image/svg+xml"); //Outputting an SVG
    $from = $_GET['from'];
    $state_colors= $_GET['state_colors'];
    $from = explode("-", $from);
    $state_colors= explode("-", $state_colors);
    #Load the Map
    $ourFileName= "USA_Counties_with_FIPS_and_names.svg";
    $fh = fopen($ourFileName, "r") or die("Can't open file");
    $contents = fread($fh,filesize($ourFileName));
    $lines2= file($ourFileName);
    foreach ($lines2 as $line_num => $line2) {
    $style_line_num = $line_num+3;
    $line2 = trim($line2);
          if(preg_match("/^style/",$line2)) {
           $rest = substr($line2,0,-1);        
           for ($j=$line_num;$j<=$style_line_num;$j++){
             if(preg_match("/inkscape:label/",$lines2[$j])) { 
                $location = explode("=",$lines2[$j]);
                $location2 = substr($location[1],1,-6); 
                if(in_array($location2, $from)) {
                 $key= array_search($location2,$from); //Find out the position of the index in the array
                 $colors_style = ";fill:" . $state_colors[$key];  //Use the index from array_search to apply to the color index
                 $rest2 = substr($line2,0,-1). $colors_style . "\"";           
                 echo $rest2 . "\n";
                else echo $line2 . "\n";           
             } //end preg_match inkscape       
         } //end for loop
       }  //If preg_match style
         else echo $line2 . "\n"; //else if preg_match style    
    } //end for each  
    fclose($fh);
    ?>
    Thanks for your help.

  • How do I achieve Full peace of mind on a tight Budget?

    I am looking to complete an Open Directory Project with managed Network Directories and Networked Home directories.
    3TB of available storage should be sufficient (for now).
    I will be moving users who are use to having their Macs set up as home computers on a network to a proper enterprise desktop system.
    But here is the problem I need to be able to guarantee that users will have access to their home directories even in the event of a serious hardware failure, because not being able to use their computer because some other computer isn’t working will not be popular. If the situation last more then a few hours then... well I don't like the idea of a recovery plan that starts by ordering more hardware and ends in applying for a new job!
    As I understand it if one half of a X server Raid Packs up the other half may still work, but can you take the disks out of the bad half and plug them in to the good half, (or even a spare half of a second X Server Raid) without having to rebuild the raid set, reformat it and restore the data from back up?
    P.S.
    I'm not looking for a clever dick answer about setting up desktops to function like laptops, but if there are any good ways that you know work to acheive total redundancy server side then I would love to know of them.
    server Mac OS X (10.4.8)
    server   Mac OS X (10.4.8)  

    Disaster recovery and business continuity is a balance between acceptable risk and cost. What's acceptable to you may not be acceptable to someone else (and vice versa), and you're the one that has to decide what level of risk you're prepared to carry.
    In this particular case you're focussing on the XServe RAID. The plan to run a half-populated array and switch drives and/or controllers is fine - provided you don't need more than half the capacity of an XServe RAID (currently 10TB), then the cost to implement this is nil - it's available 'out of the box'. However, it only mitigates a specific case, namely controller failure which William has stated is a rare event.
    It doesn't address any of the other possibiities such as disk failure, data corruption, accidental file deletion, server hardware crashes, Open Directory corruption, etc., etc.
    While none of these may be common events (hopefully), they are more likely to happen than a controller failure. so your no-cost plan isn't actually covering much of your risk.
    What you need to do is determine a list of risks that could impact you and devise action plans around each of those. Some of those might be mitigated by additional hardware (e.g. a spare parts kit, second server, etc.), others might be process (backup, replication).
    Each risk has a cost (e.g. time-to-recover, hardware replacement cost, etc.).
    Each mitigator also has a cost (additional hardware, admin time, etc.)
    Once you have those it's easy (or at least easier) to work out what you need to do. You just balance the risk cost combined with the chance of it occurring against the cost of implementing a solution.
    Then you (or your boss) can draw a line in the sand - anything above the line is an acceptable cost to manage a certain set of potential problems, and anything below the line is either too costly to implement, or too unlikely to bother about. This is the only time that the budget comes into question - it sets the bar for the line.
    At that point you know what you need to do, you know what level of risk you're prepared to carry and if one of the events below the line happens and you don't have a real-time solution for it you've at least covered your rear-end by knowing that in advance ("this is one of those events that we decided not to have an in-place solution for).
    If the line in the sand isn't where you'd like to be, that's where you go back and argue for a bigger budget ("for the $x you're giving me, we can deal with a, b and c. For an additional $y we can also mitigate d, e, f, g, h and i").
    Bear in mind that one solution might mitigate several risks - for example having a second server allows you to replicate your directory and covers all events that impact the primary server hardware (e.g. failed disk, failed power supply, directory corruption (provided you catch it before it's replicated). If the primary server crashes hard you simply swap out the server, reconnect the XServe RAID to the backup server and you're running again. Also consider that the backup server might not need to be the same configuration as the primary server - if it's running as a backup it might work well enough with less memory, might not need mirrored boot drives, etc.
    Sorry if that's a longer response than you expected/wanted, but disaster recovery/business continuance is a complex task. Budget is always an issue, and you'll never cover all possibilities, so the only way you can sleep well at night is to know that you've thought through as many issues as you can, and have an acceptable, agreed plan for dealing with issues.

  • Getting Started (Where to Start?)

    We have successfully installed the 10g Application Server, all the components (Infrastructure, and Middle Tier), and the latest patchset.
    Now my question is, where do I start? We want to use Singe Sign On, Discoverer, Portal, Forms, Reports, and the OID. Where do I begin? is there a "best" place to start?
    We just want to go through configuring all the pieces in the best possible manner, so we don't have to go back and repeat any steps. Any suggestions would be appreciated.

    Ok then, thanks for that. This is how I picture it so far, a possible way of doing this:
    You would have an Item array, of 500 items, each with their own number (1-500) and each with their own weight (4 * their item number).
    Then there would be a Chromosome array, which would be an array of Items (500 of them). Each of these would be put into a random bin (from 1 - 10), and calculations would be made so that the bins' weights would be cumulative.
    Then there is a Population array, which is an array of random Chromosomes, that would all have their own fitness function worked out (in this case, fitness function is equal to the heaviest bin - the lightest bin).
    What does everyone think? Please correct me if this is not on the right lines. As I said, i'm a java n00b.
    thanks

  • Dynamic Shared Object - Is This Possible?

    What I want in my app is to have 2 tilelists and an array collection of items which will populate the first tilelist and these objects can be dragged between both tilelists. Then the user can click a save button which will save the statuses of both tilelists so the items that are present/not present in each tilelist when the app is closed will still be there when the app is restarted.
    The problem is I want my array collection to be populated dynamically from mysql data on a server.
    I have no problem getting dynamic data from a mysql database into an array colllection via http request and I have no problem getting the shared object to work IF the array collection is defined within the app the usual way but I'm having trouble getting these 2 things to work together. 
    Can anybody tell me if it is indeed possible to have a dynamically populated array collection stored as a shared object on the user's system and would anyone be willing to help me out if I post my code so far? Cheers.

    Hi Greg. The way I usually post code is by clicking the small arrows above and then clicking syntax highlighting and then xml. The problem is this seems to remove all of the quotation marks ("") from my code which is what is causing the errors you mentioned. I've posted it below just by simply copying and pasting. I hope that works better. Cheers for your help:-
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="newsService.send(); initprofile1NewsAndSportSO()">
    <mx:Script><![CDATA[
     import mx.rpc.events.ResultEvent; 
    import mx.collections.*; 
    import flash.net.SharedObject; 
    public var profile1NewsAndSportSO:SharedObject; 
    Bindable] 
    private var profile1NewsAndSportaddLinksFullAC:ArrayCollection; 
    Bindable] 
    private var profile1NewsAndSportaddLinksAC:ArrayCollection; 
    private function newsResultHandler(event:ResultEvent):void{
    profile1NewsAndSportaddLinksFullAC=newsService.lastResult.newscategory.news
    as ArrayCollection;profile1NewsAndSportaddLinksAC=newsService.lastResult.newscategory.news
    as ArrayCollection;}
    // private var profile1NewsAndSportaddLinksFullAC:ArrayCollection = new ArrayCollection([
    // {label:"BBC News"},
    // {label:"ITV"},
    // {label:"Sky News"}
    // ]); // private var profile1NewsAndSportaddLinksAC:ArrayCollection = new ArrayCollection([
    // {label:"BBC News"},
    // {label:"ITV"},
    // {label:"Sky News"}
     private function profile1NewsAndSportReset():void{resetprofile1NewsAndSportAC();
    profile1NewsAndSportAddLinksTilelist.dataProvider = profile1NewsAndSportaddLinksAC;
    profile1NewsAndSportLinkChoice.dataProvider =
    new ArrayCollection([]);}
    private function resetprofile1NewsAndSportAC():void{profile1NewsAndSportaddLinksAC.removeAll();
    for each(var obj:Object in profile1NewsAndSportaddLinksFullAC){profile1NewsAndSportaddLinksAC.addItem(obj);
    private function initprofile1NewsAndSportSO():void{profile1NewsAndSportSO = SharedObject.getLocal(
    "profile1NewsAndSport"); 
    if(profile1NewsAndSportSO.size > 0){ 
    if(profile1NewsAndSportSO.data.profile1NewsAndSportaddList){ 
    if(profile1NewsAndSportSO.data.profile1NewsAndSportaddList != "empty"){ 
    var profile1NewsAndSportaddList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportaddList.split(","); 
    var profile1NewsAndSporttempAC1:ArrayCollection = new ArrayCollection(); 
    for each(var str:String in profile1NewsAndSportaddList){ 
    for each(var obj1:Object in profile1NewsAndSportaddLinksAC){ 
    if(str == obj1.label){profile1NewsAndSporttempAC1.addItem(obj1);
    continue;}
    if(profile1NewsAndSporttempAC1.length > 0){profile1NewsAndSportAddLinksTilelist.dataProvider = profile1NewsAndSporttempAC1;
    if(profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList){ 
    var profile1NewsAndSportchoiceList:Array = profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList.split(","); 
    var profile1NewsAndSporttempAC2:ArrayCollection = new ArrayCollection(); 
    for each(var str2:String in profile1NewsAndSportchoiceList){ 
    for each(var obj2:Object in profile1NewsAndSportaddLinksAC){ 
    if(str2 == obj2.label){profile1NewsAndSporttempAC2.addItem(obj2);
    continue;}
    if(profile1NewsAndSporttempAC2.length > 0){profile1NewsAndSportLinkChoice.dataProvider = profile1NewsAndSporttempAC2;
    else{profile1NewsAndSportReset();
    private function saveprofile1NewsAndSport(event:MouseEvent):void{ 
    var profile1NewsAndSportaddList:String = ""; 
    if(profile1NewsAndSportAddLinksTilelist.dataProvider){ 
    if(ArrayCollection(profile1NewsAndSportAddLinksTilelist.dataProvider).length > 0){ 
    for each(var obj1:Object inprofile1NewsAndSportAddLinksTilelist.dataProvider){
    profile1NewsAndSportaddList += obj1.label +
    else{profile1NewsAndSportaddList =
    "empty";}
    profile1NewsAndSportSO.data.profile1NewsAndSportaddList = profile1NewsAndSportaddList;
    var profile1NewsAndSportchoiceList:String = ""; 
    for each(var obj2:Object inprofile1NewsAndSportLinkChoice.dataProvider){
    profile1NewsAndSportchoiceList += obj2.label +
    profile1NewsAndSportSO.data.profile1NewsAndSportchoiceList = profile1NewsAndSportchoiceList;
    profile1NewsAndSportSO.flush();
    ]]>
    </mx:Script>
     <mx:HTTPService id="newsService" resultFormat="object" result="newsResultHandler(event)" url="http://www.coolvisiontest.com/getnews.php"/> 
    <mx:TileList id="profile1NewsAndSportLinkChoice" fontWeight="bold" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" height="166" width="650" top="5" left="521" columnCount="5" rowHeight="145" columnWidth="125" backgroundColor="#000000" color="#FFFFFF">
     <mx:itemRenderer>
     <mx:Component>
     <mx:Canvas width="125" height="129" backgroundColor="#000000">
     <mx:Image source="{'http://www.coolvisiontest.com/interfaceimages/images/'+ data.icon}" top="5" horizontalCenter="0"/>
     <mx:Label text="{data.label}" bottom="1" horizontalCenter="0"/>
     </mx:Canvas>  
    </mx:Component>
     </mx:itemRenderer>  
    </mx:TileList>
     <mx:TileList id="profile1NewsAndSportAddLinksTilelist" fontWeight="bold" dragEnabled="true" dragMoveEnabled="true" dropEnabled="true" height="166" width="385" top="5" left="128" columnCount="3" rowHeight="145" columnWidth="125" backgroundColor="#000000" color="#FFFFFF">
     <mx:itemRenderer>
     <mx:Component>
     <mx:Canvas width="125" height="129" backgroundColor="#000000">
     <mx:Image source="{'http://www.coolvisiontest.com/interfaceimages/images/'+ data.icon}" top="5" horizontalCenter="0"/>
     <mx:Label text="{data.label}" bottom="1" horizontalCenter="0"/>
     </mx:Canvas>  
    </mx:Component>
     </mx:itemRenderer>  
    </mx:TileList>
     <mx:Button click="profile1NewsAndSportReset()" id="reset" label="Reset" y="5" height="25" x="5"/>
     <mx:Button click="saveprofile1NewsAndSport(event)" id="save" label="Save Changes" x="5" y="38" width="113" height="25.5"/>
     </mx:WindowedApplication>

  • Java Bin-packing problem

    Hi all,
    I have a evolutionary algorithm that I want to try and solve, but it's hard getting started and knowing where to start exactly. Here is the description below, it would be great if anyone could give me a few tips on how to go about it:
    "The bin-packing problem involves 'n' items, each with its own weight (there are 500 items in fact, and the weight of each is 4 times its item number).
    Each item must be placed in one of 'b' bins (there are 10 bins). The task is to find a way of placing the items into the bins in such a way as to make the total weight in each bin as equal as possible.
    A chromosome (solution to the problem) is represented as a list of 'n' numbers (500 numbers), where each number can be anything in the range from 1 to b.
    Basically, if the 1st number in the chromosome is 4, then this means item number 1 is in bin 4. "
    I obviously don't expect anyone to give me code to this, but it would be a great help if someone could assist me in how to get going (i.e. what classes to have and what variables they would take).
    thanks

    Ok then, thanks for that. This is how I picture it so far, a possible way of doing this:
    You would have an Item array, of 500 items, each with their own number (1-500) and each with their own weight (4 * their item number).
    Then there would be a Chromosome array, which would be an array of Items (500 of them). Each of these would be put into a random bin (from 1 - 10), and calculations would be made so that the bins' weights would be cumulative.
    Then there is a Population array, which is an array of random Chromosomes, that would all have their own fitness function worked out (in this case, fitness function is equal to the heaviest bin - the lightest bin).
    What does everyone think? Please correct me if this is not on the right lines. As I said, i'm a java n00b.
    thanks

  • Assigning a value to an array cell populated [BULK]

    Hi all,
    I've got a problem in assigning a value to an array populated with BULK COLLECT INTO .
    I can reproduce the problem with this
    CREATE TABLE TEST_TABLE (
    value1 NUMBER,
    value2 NUMBER
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);
    INSERT INTO test_table VALUES(1,1);And this is the PL/SQL anonymous block that gives me problems:
    DECLARE
      SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
    TYPE records_table IS TABLE OF t_rec;
      elist RECORDS_TABLE;
      CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
    BEGIN
      OPEN table_cursor;
      FETCH table_cursor BULK COLLECT INTO elist;
        FOR j IN 1..elist.COUNT
        LOOP
          elist(j)(1) := elist(j)(1) +1;
        END LOOP;
      CLOSE table_cursor;
    END; The error is
    ORA-06550: line 13, column 7:
    PLS-00308: this construct is not allowed as the origin of an assignment
    ORA-06550: line 13, column 7:
    PL/SQL: Statement ignored
    06550. 00000 -  "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:So it doesn't compile because of this line of code:
    elist(j)(1) := elist(j)(1) +1;
    Why doesn't it work?
    If I try to do this, works perfectly:
    DECLARE
    TYPE v_num_table
    IS
      TABLE OF NUMBER;
    TYPE v_2_num_table
    IS
      TABLE OF v_num_table;
      v_nums V_2_NUM_TABLE := V_2_NUM_TABLE();
    BEGIN
      v_nums.EXTEND;
      v_nums(1) := v_num_table();
      v_nums(1).EXTEND;
      v_nums(1)(1) := 1;
      v_nums(1)(1) := v_nums(1)(1) +1;
      dbms_output.put_line(v_nums(1)(1) );
    END;Edited by: user10396517 on 2-mar-2012 2.35

    Variable "elist" is a collection of record, so you access an individual field of a given collection element by specifying the field name, not its position :
    DECLARE
      SUBTYPE t_rec IS TEST_TABLE%ROWTYPE;
      TYPE records_table IS TABLE OF t_rec;
      elist RECORDS_TABLE;
      CURSOR table_cursor IS SELECT * FROM TEST_TABLE WHERE rownum <= 20;
    BEGIN
      OPEN table_cursor;
      FETCH table_cursor BULK COLLECT INTO elist;
        FOR j IN 1..elist.COUNT
        LOOP
          elist(j).value1 := elist(j).value1 + 1;
        END LOOP;
      CLOSE table_cursor;
    END;Your second example is different as you're dealing with a collection of collections.

  • HTMLDB_APPLICATION.G_Fxx GLOBAL ARRAYS ARE NOT POPULATING CORRECTLY IN IRR

    Hi
    Scenario1:
    Unsorted data
    I have an interactive report with first column as checkbox and 4 editable fields. When I enter an editable field there is a javascript called on this field to make the checkbox in the first column checked. This is working fine.
    Scenario 2:
    Sorted on a column:
    I sort the data on part number and when I go and change one of the editable field the checkbox gets checked which is correct. But when I save HTMLDB_APPLICATION.gxx variable seems to be messed up when IRR is sorted and doesnt save any values.
    Any body faced a similar issue.
    Thanks
    sukarna

    Agreed.
    What I am doing here is that I am populating rownum into the checkbox column in the query and also created rownum in a,b,c,d as hidden items which stores rownum.
    My case will be
    1 checkbox value (1) a(1) b(1) c(1) d(1)
    2 checkbox value (2) a(2) b(2) c(2) d(2)
    When I edit a I go an check checkbox in row 2 as checked in the checkbox so my new data is
    1 checkbox value (1) a(1) b(1) c(1) d(1)
    2 checkbox value (2) checked a(2) b(2) c(2) d(2)
    3 ....
    4 ...
    Now the problem]
    When I loop thru checkbox array using g_f01 I get count 1 as expected and when I refer to the rownum value stored in the checkbox array it is storing wrong rownum value in other words the value in this case should be 2 but it has some wierded rownum 4 or 5 which is reffering to someother row.
    This happens only when I sort the INTERACTVE REPORT.

  • Adobe Acrobat 9: Javascript array populated combo box - Selected answer will not save

    I have a combo box on one of my forms that is populated using a Javascript array.  The combo box is populating just fine, but when an item is selected from that combo box, the selected item does not save when the user saves the document.  Any suggestions as to what the problem is and how it can be corrected?  I am a loss as to where to even begin looking.  Any help is greatly appreciated.
    Thank you.
    Lisa

    You might also want to check the Scripting forum
    http://forums.adobe.com/community/acrobat/acrobat_scripting

Maybe you are looking for

  • How to relase the purchase order

    Hi sap all,           i configur the purchase req point of *approval limit* changed(means increased) that amount reflect or not how i can i check.i m sd consultant i dont no process in mm so that i want detaieled explenation,that amount reflect or no

  • How to get previous values based on date filters

    Hi i have two fields gldate and startdate gldate values are like 1/31/2011,2/28/2011,3/31/2011,4/30/2011,5/31/2011 ... startdate values 1/1/2011,2/1/2011,3/1/2011,4/1/2011,5/1/2011 ... i need a condition like gldate<startdate if startdate is 11/1/201

  • Search & replace text programmatically in pdf file

    I need to search & replace text programmatically (preferably in .NET c#) in existing pdf file. Does anyone know how to do it (maybe with with Acrobat SDK) ? Thanks in advance! A. PS: Well done working example :-)

  • Use of Discovery System :question from a vendors perspective

    Hi all I have a question regarding Discovery System(DS) from a vendors perspective. what can client actually do with the DS as soon as they buy it, beside using the demo scenario? Going through the demo if the client decides to use Discovery system,

  • What table is the Release Date of MIRO Invoice Block stored on?

    I'm attempting to track the timeframe between the date when a block is placed on an invoice vs the date that the block is released.  I realize in the application you can see the release date through document changes...but can anyone tell me what tabl