Using two arrays to hold x,y coordinates

Hi, all
Does any1 know how to use 2 arrays to hold x,y coordinates of five rectangles all of which are 30 by 40 pixels in size?

Your homework assignment probably meant to use a 2-dimensional array, not to create two separate arrays.
Like this:
int rectangles[][] = new int[100][100];

Similar Messages

  • How can I use two single-dimensional arrays-one for the titles and array

    I want to Use two single-dimensional arrays-one for the titles and one for the ID
    Could everyone help me how can i write the code for it?
    Flower
    public class Video
    public static void main(String[] args) throws Exception
    int[][] ID =
    { {145,147,148},
    {146,149, 150} };
    String[][] Titles=
    { {"Barney","True Grit","The night before Christmas"},
    {"Lalla", "Jacke Chan", "Metal"} };
    int x, y;
    int r, c;
    System.out.println("List before Sort");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);
    System.out.println("\nAfter Sort:");
    for(c =0; c< 3; ++c)
    for(r=0; r< 3; ++ r)
    System.out.println("ID:" + ID[c][r]+ "\tTitle: " + Titles[c][r]);

    This is one of the most bizarre questions I have seen here:
    public class Video
    public static void main(String[] args) throws Exception
    int[] ID = {145,147,148, 146,149, 150};
    String[] Titles= {"Barney","True Grit","The night before Christmas", "Lalla", "Jacke Chan", "Metal"};
    System.out.println("List before Sort");
    for(int i = 0; i < Titles.length; i++)
       System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles);
    System.out.println("\nAfter Sort:");
    for(int i = 0; c < Titles.length; i++)
    System.out.println("ID:" + ID[i]+ "\tTitle: " + Titles[i]);
    Generally you don't use prefix (++c) operators in you for loop. Use postfix (c++).
    Prefix means that it will increment the variable before the loop body is executed. Postfix will cause it to increment after.

  • How to use two dimensional array in custom.pll

    HI
    How to use two dimensional arrays in custom.pll
    I tried by the following way .
    type ship_array is table of number index by binary_integer;
    type vc_array is table of ship_array index by binary_integer;
    But I am getting the error as that
    A plsql table may not contain a table or a record with composite fields.
    Please tell me the way how to use them

    which forms version are you using? two dimensional arrays are available in >= 9i if memory serves.
    regards

  • How can I use two dimensional array ?

    Could some one show me how to use two dimentional array ?
    I am know how to right a single ...but not two dimentional....please help,
    Thanks,
    Flower
    public class Exam5
    public static void main(String[] args)
    int[][] numbers =
         {     {1,2,3,4,5,6,7,8,9,10},
    {1,2,3,4,5,6,7,8,9,10} };
    for(int i = 1; i < 11; ++i)
    System.out.println(i + "\t" + i * 2 + "\t" + i * 3 + "\t" + i * 4 + "\t" + i * 5 +
    "\t" + i * 6 + "\t" + i * 7 + "\t" + i * 8 + "\t" + i * 9 + "\t" + i * 10);
    Display #
    1     2     3     4     5     6     7     8     9     10
    2     4     6     8     10     12     14     16     18     20
    3     6     9     12     15     18     21     24     27     30
    4     8     12     16     20     24     28     32     36     40
    5     10     15     20     25     30     35     40     45     50
    6     12     18     24     30     36     42     48     54     60
    7     14     21     28     35     42     49     56     63     70
    8     16     24     32     40     48     56     64     72     80
    9     18     27     36     45     54     63     72     81     90
    10     20     30     40     50     60     70     80     90     100

    First, try not to ask someone to do your homework for you and then tell them they are wrong. The code posted may not have been exactly what you were looking for, but it was not wrong because it did exactly what the poster said it would do - print out the multiplication table.
    Second, in the future if you ask specific questions rather than posting code and hoping someone will fix it for you, you may one day be able to complete the assignments on your own.
    Here is code that prints what you want and uses a two dimensional array. Please ask questions if you do not understand the code. You will never learn if you just use someone else's code without taking the time to examine or understand it.
    public class MultiTable{  
        public static void main(String[] args)   { 
            int rows = 10;
            int columns = 10;
            int [][] numbers = new int [rows] [columns];
            for(int j = 0; j < rows; j++)   // for each of 10 rows
                for(int k = 0; k < columns; k++)    // for each of 10 columns
                    numbers[j][k] = (j+1) * (k+1);  // calculate row+1 * col+1
            for (int j = 0; j < rows; j++)  // for each of 10 rows
                for (int k = 0; k < columns; k++)   // for each of 10 columns
                    System.out.print(numbers[j][k]+" ");    // print out result
                    if (numbers[j][k] < 10)     // for single digit numbers
                        System.out.print(" ");  // print extra space for better formatting
                System.out.println();       // skip to next line
    }

  • Matrix in  java using  two dimension array

    hi!
    Everybody here's a problem I have cpould any body out there give nice piece of sourcr code for "matrix in java using two dimension array"I have to give a presentation how it works.Yes I'd appreciate as many example as possible
    If anybody can??
    Please help
    regards
    ardent

    nice piece of sourcr
    code for "matrix in java using two dimension
    n arraySure,
    int[][] matrix = new int[5][5];
    That declares a two-dimensional 5 by 5 array with integer elements. All elements are initially 0.
    For further information check you favourite Java textbook.

  • How to get 3D coordinates of reflective markers using two cameras?

    Hi,
    I am very new to LabVIEW (in fact to any coding at all) and helping my adviser to get the 3D coordinates of a few reflective markers using two cameras. I am able to read the marker coordinates (x, y) from two cameras simultaneously by processing the data in real-time using codes generated from vision assistant. However, we want to get the depth position by triangulating the markers. I have seen stereo vision doing something similar to this, but I think the stereo vision may not work with our calibration frame (markers) and we don’t need the whole depth image, but only the maker’s z coordinates. I also want to use Region of Interest to mask out other regions that are creating reflections. However, I am not sure if triangulation would work if we select region of interest (as the origin of the camera coordinates would change after selecting ROI). I saw this link http://kwon3d.com/theory/dlt/dlt.html#3d where they used DLT (direct linear transformation) method, but it is too much to code from the beginning. Is there a subVI in LabVIEW or some sort of prewritten code that can be customized? Can anyone please give me some advice on how to solve this problem?

    Well in theory, if you know exactly where the cameras are pointed, how far apart they are, and how far the reflector images are above or below the horizon and to the right or left of center line, a little simple math should give you the answer. Concerning the ROI I would think all you needed to know was where the ROI was relative to horizon and centerline. You could then calculate an absolute position from there, which would also give you the angles you would need.
    Unfortunately, I don't know of any readily availble code. But I'm sure there is some! With the emphasis on FIRST robotics, I got to believe that judging distances in 3D space is something for which there is a lot of code.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • To make one larger array using other two arrays

    Hi,
    I have two one dimensional arrays, using these two arrays as index need to create another larger one dimensional array.
    like : if two one dimensional arrays namely X and Y, then X and Y should go as index for the final array.
    Please help.
    Thank you

    kathyayini wrote:
    I have two one dimensional arrays, using these two arrays as index need to create another larger one dimensional array.
    like : if two one dimensional arrays namely X and Y, then X and Y should go as index for the final array.
    Please help.I second jverd, but you might want to look at Arrays.copy() and System.arrayCopy().
    Winston

  • Very Basic..  Array list Concept.. using two arraylist..

    Hello all,
    Please clear my Arraylist concept.. the problem is that I am using two arraylist one.. in Spriteframe, and other in SpriteFramecollection.. and adding objects to them..
    the problem comes when am adding new frame to framecollection.. instead of adding new.. it changes all previous frames too.. I want to reflect change only in latest one..
    Lets explain me in detail..
    I have used like
    class Project..
         ---> Calculate Button
         ---> MultipleMove Button
         ---> Save Button
    In Calculate class..
         Sprite st = new Sprite();
         SpriteFrame sframe = new SpriteFrame();
         ..// I do some calculation
         st.newSprite(croppedimage, file, 0, 0, number, 0, 0);         //here am creating sprite
         sframe.addSprite(st);                            //here am adding sprite to Spriteframe
    In MultipleMove class..
         SpriteFrame sframe = new SpriteFrame();
         // do some adding and deleting of sprites in frame
    In save class..     //Problem comes here.. Am going crazy!!
         SpriteFrameCollection sframecoll = new SpriteFrameCollection();
         SpriteFrame frame = new SpriteFrame();
    --->     sframecoll.addSpriteFrame(frame);     <------- // am just adding frame to framecollection
         }Now when I am printing elements of Sprite.. frame1, and frame2 gets changed simultaneously.. I mean why frame1 also gets changed..
    am just adding new SpriteFrame.. to spriteframecollection..
    please someone tell me what is wrong in my concept of understanding arraylist..
    as making class objects again and again wrong..
    what should I do to add only newly Frame to framecollection??.. why all previous frame gets changed too.. ??
    gervini
    I have class Sprite, SpriteFrame, SpriteFrameCollection as shown below..
    import java.io.*;
    import java.awt.Image;
    public class Sprite               // Each single sprite
         Image img;
         File file;                 // is filepath where this sprite is located
         int xcord,ycord;           // xcoord,ycoord are real position in frame
         int numberinfile;           // this is the position of the sprite in the raw file
         int mirrorh, mirrorv;      // for normal=00,horizontal=10,vertical=01,both=11
         void newSprite(Image img, File file, int xcord, int ycord, int numberinfile, int mirrorh, int mirrorv)
              this.img = img;
              this.file = file;
              this.xcord = xcord;
              this.ycord = ycord;
              this.numberinfile = numberinfile;
              this.mirrorh = mirrorh;
              this.mirrorv = mirrorv;
    import java.io.*;
    import java.util.*;
    public class SpriteFrame                          // Full One Frame consisting of many sprites..
         static ArrayList spritelist = new ArrayList();               // arraylist containing many sprites
         void addSprite(Sprite sprite)
             spritelist.add(sprite);                              
        void removeSprite(Sprite s)
             spritelist.remove(s);
    import java.io.*;
    import java.util.*;
    public class SpriteFrameCollection                    // Consisting of many frames..
         static ArrayList spriteframelist = new ArrayList();          // Arraylist of many frames
         void addSpriteFrame(SpriteFrame spriteframe)
              spriteframelist.add(spriteframe);
        void removeFrame(SpriteFrame sf)
             spriteframelist.remove(sf);
    }

    It is hard to see what it coursing your problems becouse you only posted axtracts from your code. However I think that it is becouse every time you want to access the methods in SpriteFrame you ar creating a new object. Every time you create a new Strite fram a new, empty ArrayList is being created. What you want to do is create this only once, and pass this instance to the parts of your code that need it.
    Let me try to explain this using a matphor. 2 people are trying to make some tea. One person has access to water and another has access to teabags. Both of them know that there is such a thing as a kettle. What you are doing is; person 1 is creating a kettle and filling it with water. Then person 2 is creating a new kettle and trying to pour the water from it. obviously this doesn't work. You want person 1 to creat a kettle, fill it with water and then pass that kettle to person 2. person 2 takes this kettle and then pours the water from it.

  • Find Intersection of two array elements in Oracle 9i

    How to find intersection of two arrays in pl/sql for Oracle 9i.
    it is feasible in 11g using given code but this code is not working in 9i please help....
    DECLARE
    abc LIST := list(1,2,3,4);
    def LIST := list(4,5,6,7);
    BEGIN
    dbms_output.put_line(format_list(abc MULTISET EXCEPT def));
    END;
    Thanks in advance.... :)

    Argh. Never mind. My coordinates were reversed.
    People that made my data set specified the coordinates as lat/long and I didn't question it. I can now see that Oracle expects long/lat instead, so my example works now.

  • About combing two array into one

    Hi all,
      I post a questiona bout converting an array of integer into char (byte) array and I got a solution already http://forums.ni.com/t5/LabVIEW/how-to-display-char-code-properly/m-p/2596087#M780368
    However, I enouther another problem while dealing with an array of  U16 type. I would like to extract the high and low byte from numbers (U16) stored in array. I extract the high and low byte for each U16 number and convert them as char, concatenate them to a string. Repeat this process for each element in the array so to get a big string with each element is a char for high and low byte. My code is enclosed as follows
    It works fine but I am concerning the speed. Is that any other way to do it fast and don't use loop (in real case, I will deal with pretty big array many times, efficiency is a problem). Note that the high and low bytes array extracted from the original array with the module Split number.vi, but how can I combine these two array in one code with data arranged as high-low-high-low ... ? Thanks.
    Solved!
    Go to Solution.

    PKIM wrote:
    However, I enouther another problem while dealing with an array of  U16 type. I would like to extract the high and low byte from numbers (U16) stored in array. I extract the high and low byte for each U16 number and convert them as char, concatenate them to a string. Repeat this process for each element in the array so to get a big string with each element is a char for high and low byte. My code is enclosed as follows
    It works fine but I am concerning the speed. Is that any other way to do it fast and don't use loop (in real case, I will deal with pretty big array many times, efficiency is a problem). Note that the high and low bytes array extracted from the original array with the module Split number.vi, but how can I combine these two array in one code with data arranged as high-low-high-low ... ? Thanks.
    You need to be more clear.
    Looking at the code, you are dealing with I16, not U16. Also your index array primitives could be replaced by autoindexing. Your use of the feedback node only makes sense if you want to append strings forever with stale data, thus growing data structures without limits. If you only want to convert the current data, remove the feedback mode and use a "concatenate strings" with a single input. A for loop is one of the most efficient data structures and using it is not a problem. One way or another the code needs top oerate on all data.
    All that said, I agree with Tim that most likely all you need to do is insert a typecast after the "to I16" and eliminate all other code.
    LabVIEW Champion . Do more with less code and in less time .

  • Can you use two iPod's on the same computer?

    I currently have an iPod Video, and my mother wants to get a shuffle or nano. The problem is, we only have one computer that will let iTunes run. Is it possible to use two iPods on the same computer, or even with the same iTunes?

    See these articles about using more than one iPod on one computer, and with either one or more iTunes libraries.
    Multiple iPod installations.
    How to use multiple iPods with one computer.
    If you have the latest iTunes, an easy way to create a new library is to hold down the 'alt' key whilst opening iTunes (for Macs), or hold down the 'shift' key (for Windows).
    This will give you the option of either using the current iTunes library or creating a new one.
    There are various methods of transferring different songs to different iPods with a single iTunes library.
    One is to manage the songs manually.
    With this setting, you can drag and drop songs/playlists etc onto the iPod from iTunes, and also delete and/or edit songs which are currently on the iPod without affecting the iTunes library.
    If you wish to keep the convenience of automatic sync, then you could set the iPods to sync with "selected playlists". This setting can be found in the iPod summary screen under the 'music' tab. With this setting, different playlists can be transferred and later deleted from each iPod without affecting any playlists stored in iTunes or the playlists on the other iPods.
    Also, on the 'summary' main page you will see the option to "only sync checked items". With this setting selected, if you remove the check marks from any songs in iTunes, they will not be transferred to the iPod. You can restore the check mark if you want to put the songs back on the iPod at a later date.
    Be aware that when playing songs in iTunes, any songs that do not have a check mark against them will be skipped over and will not be played.

  • How to change the frequency of pulse train on the fly using an array of values?

    Hi all!
    First I want to thank U for the great job you are doing for this forum.
    Iam still busy trying to control a stepper motor, by sending pulses from my E-series 6024 to a compumotor s6- stepper Driver. I've managed to get it working. I desperately need to control the motor using the values from an array. I believe we can use two approaches for that:
    1st - I can get an array of the "numbers of pulses". Each element must run for 10 milliseconds. Using that we can calculate the array of frequencies to send the number of pulses within 10 milliseconds for each specific element. Could we use the arrays of "number of pulses" and frequencies in a "finite pulse train " and up
    date with each element every 10 millisecond?
    2nd - Or Could we use of the frequency array in a "continuous pulse train vi" and update it every 10 milliseconds?
    Please note that I must use the values as they are.
    Can someone please built a good example for me? Your help will be appreciated.
    Regards
    Chris
    Attachments:
    number_of_steps.txt ‏17 KB
    frequency.txt ‏15 KB

    Tiano,
    I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
    "While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
    You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
    pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
    The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
    If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
    LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
    st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
    Regards,
    Justin Britten

  • Using Variables/Arrays from one class in another

    Hello all,
    First, to explain what I am attempting to create, is a program that will accept input of employee names and hours worked into an array. The first class will accept a command line argument when invoked. If the argument is correct, it will call another class that will gather information from the user via an input box. After all names and hours have been input for employees, this class will calculate the salary based upon the first letter of each employee name and print the total hours, salary, etc. for each employee.
    What I need to do now is to split the second class into two: one that will gather the data and another that will calculate and print the data. Yes, this is an assignment. However, I am trying to learn and I have gotten this far, but I am stuck on how to get a class to be able to use an array/variables from another class.
    I realize the below code isn't exactly cleaned up...yet.
    Code for AverageSalaryGather class:
    import javax.swing.JOptionPane; // uses class JOptionPane
    import java.lang.reflect.Array;     
    import java.math.*;
    public class AverageSalaryGather {
         public static void gatherData() {     
              char[] alphaArray = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','x','y','z'};
              String[][] empInfoArray = new String[100][4];
              String[] empNameArray = new String[100];
              String finalOutput = "Name - Rate - Hours - Total Pay\n";
              String averageHoursOutput = "Average Hours Worked:\n";
              String averageSalaryOutput = "Average Hourly Salary:\n";
              String averageGroupSalaryOutput = "Average Group Salary:\n";
                        String[] rateArray = new String[26];
                        char empNameChar = 'a';
              int empRate = 0;
              int payRate = 0;
                        for (int i = 0; i < 26; i++) {
                   payRate = i + 5;
                   rateArray[i] = Integer.toString(payRate);
                        int countJoo = 0;
              while (true) {
                   String namePrompt = "Please enter the employee name: ";
                   String empName = JOptionPane.showInputDialog(namePrompt);
                                  if (empName == null | empName.equals("")) {
                        break;
                   else {
                        empInfoArray[countJoo][0] = empName;
                        for (int i = 0; i < alphaArray.length; i++) {
                             empNameChar = empName.toLowerCase().charAt(0);
                                                      if (alphaArray[i] == empNameChar) {
                                  empInfoArray[countJoo][1] = rateArray;
                                  break;
                        countJoo++;
              // DecimalFormat dollarFormat = new DecimalFormat("$#0.00");
              for (int i = 0; i < empInfoArray.length; i++) {
                   if (!(empInfoArray[i][0] == null)) {
                        String hourPrompt = "Please enter hours for " + empInfoArray[i][0] + ": ";
                        String empHours = JOptionPane.showInputDialog(hourPrompt);
                        int test = 0;
                        empInfoArray[i][2] = empHours;
                        // convert type String to double
                        //double tmpPayRate = Double.parseDouble(empInfoArray[i][1]);
                        //double tmpHours = Double.parseDouble(empInfoArray[i][2]);
                        //double tmpTotalPay = tmpPayRate * tmpHours;
                        // create via a string in empInfoArray
                             BigDecimal bdRate = new BigDecimal(empInfoArray[i][1]);
                             BigDecimal bdHours = new BigDecimal(empInfoArray[i][2]);
                             BigDecimal bdTotal = bdRate.multiply(bdHours);
                             bdTotal = bdTotal.setScale(2, RoundingMode.HALF_UP);
                             String strTotal = bdTotal.toString();
                             empInfoArray[i][3] = strTotal;
                        //String strTotalPay = Double.toString(tmpTotalPay);
                        //empInfoArray[i][3] = dollarFormat.format(tmpTotalPay);
                        else {
                             break;
              AverageSalaryCalcAndPrint averageSalaryCalcAndPrint = new AverageSalaryCalcAndPrint();
              averageSalaryCalcAndprint.calcAndPrint();
    Code for AverageSalaryCalcAndPrint class (upon compiling, there are more than a few complie errors, and that is due to me cutting/pasting the code from the other class into the new class and the compiler does not know how to access the array/variables from the gatherData class):
    import javax.swing.JOptionPane; // uses class JOptionPane
    import java.lang.reflect.Array;
    import java.math.*;
    public class AverageSalaryCalcAndPrint
         public static void calcAndPrint() {     
              AverageSalaryGather averageSalaryGather = new AverageSalaryGather();
              double totalHours = 0;
              double averageHours = 0;
              double averageSalary = 0;
              double totalSalary = 0;
              double averageGroupSalary = 0;
              double totalGroupSalary = 0;
              int countOfArray = 0;
              for (int i = 0; i < empInfoArray.length; i++) {
                   if (!(empInfoArray[0] == null)) {
                        totalSalary = totalSalary + Double.parseDouble(empInfoArray[i][1]);
                        totalHours = totalHours + Double.parseDouble(empInfoArray[i][2]);
                        totalGroupSalary = totalGroupSalary + Double.parseDouble(empInfoArray[i][3]);
                        countOfArray = i;
              averageHours = totalHours / (countOfArray + 1);
              averageSalary = totalSalary / (countOfArray + 1);
              averageGroupSalary = totalGroupSalary / (countOfArray + 1);
              String strAverageHourlySalary = Double.toString(averageSalary);
              String strAverageHours = Double.toString(averageHours);
              String strAverageGroupSalary = Double.toString(averageGroupSalary);
              for (int i = 0; i < empInfoArray.length; i++) {
                   if (!(empInfoArray[i][0] == null)) {
                        finalOutput = finalOutput + empInfoArray[i][0] + " - " + "$" + empInfoArray[i][1] + "/hr" + " - " + empInfoArray[i][2] + " - " + "$" + empInfoArray[i][3] + "\n";
              averageHoursOutput = averageHoursOutput + strAverageHours + "\n";
              averageSalaryOutput = averageSalaryOutput + strAverageHourlySalary + "\n";
              averageGroupSalaryOutput = averageGroupSalaryOutput + strAverageGroupSalary + "\n";
              JOptionPane.showMessageDialog(null, finalOutput + averageHoursOutput + averageSalaryOutput + averageGroupSalaryOutput, "Totals", JOptionPane.PLAIN_MESSAGE );

    Call the other class's methods. (In general, you
    shouldn't even try to access fields from the other
    class.) Also you should be looking at an
    instance of the other class, and not the class
    itself, generally.Would I not call the other classes method's by someting similar as below?:
    AverageSalaryCalcAndPrint averageSalaryCalcAndPrint = new AverageSalaryCalcAndPrint();
              averageSalaryCalcAndprint.calcAndPrint(); Well... don't break down classes based on broad steps
    of the program. Break them down by the information
    being managed. I'm not expressing this well...Could you give an example of this? I'm not sure I'm following well.
    Anyway, you want one or more objects that represent
    the data, and operations on that data. Those
    operations include calculations on the data. Other
    classes might represent the user interface, and
    different output types (say, a file versus the
    console).Yes, the requirements is to have a separate class to gather the data, and then another class to calculate and print the data. Is this what you mean in the above?

  • Network security - using two wireless WRT54G Routers

    I have lots of  ports on my router open for numerous family software applications that are all on one computer and I would like to isolate these risky activities from the rest of my network.
    I recently read I could use two routers, plug one router into another,  assign each a different starting IP address (such as 192.168.1.1 and 192.168.2.1). Then attach my at-risk PCs--to the router that's directly connected to my broadband modem, and all  other computers to the second router.
    Internet traffic to and from the unsafe PC area would then not reach my secure subnetwork at all.
    I currently use a WRT54G V5...does buying a second one and using it as described make sense? It sounds like a rather inexpensive way to add security to my network.
    I assume the second router gets connected from it's internet jack to one of the port jacks on the first router? Is there anything else that would need to be changed or set in either router to make this work?
    Can I please ask if u respond to try and keep your response at a level that a non expert could understand.....I would really appreciate it!
    Thanks for everyones advice!

    Thanks for the quick response....it is disappointing to see that I would lose the ability to share files......I  assume this is also true for printers as well??? Do you have another solution that you think would do a better job?
    Anyway I did get a rather detailed response on how to make it work and it's in a fashion that even I could understand.
    I thought I would share it in case anyone else had a interest to isolate a computer.
    Thanks
    With regards to your concern, the setup that you suggested does address your concern. With this setup, we are somehow creating two networks on your location. In this manner, the computer that needs the set of ports will not be part of the network of the second router thus, it will not be able to affect the other computers.
    With this type of setup, we will just have to leave the current settings of the WRT54G v5 (as long as its working properly this time). All we have to configure is the second router wherein we will have to change its LAN IP Address and also, configure its wireless settings in order for the said router to provide wired and wireless connection to all computers connecting to it. Please allow me to give you the steps.
    Once we have the second router available, please connect one of the computers straight to the second router using one of the four ports (Ethernet port). With the configuration, only the second router and the computer will be connected with each other.
    Before setting up the second router, I suggest that we do a hard reset on the router to make sure that it is on default settings and that we have a stable connection during the setup.
    Here’s how to do a reset:
    1. Locate the reset button of the router at the back panel.
    2. Hold the reset button for 30 seconds using a pen or a paper clip.
    3. Release the reset button.
    Configuring the Second Router:
    1. Go to your desktop and double click on Internet Explorer (Located on the Start Menu in Windows XP).
    2. When "Internet Explorer" opens type 192.168.1.1 into the "Address" bar and click on Go.
    3. The "Enter Network Password" window will appear.
    4. Skip user name and type admin (admin is the default password) as the password, and click OK.
    5. Go to Wireless Tab.
    6. Change SSID (e.g. Vic or your name or last name).
    7. Change channel to 11.
    8. Hit save Settings.
    9. Click on the sub tab Wireless Security.
    10. Set the Security Mode to WEP.
    Using pass phrase Encryption Level 40/64bit (10 hex digits):
    1. Type a pass phrase.
    2. Click Generate.
    3. Copy key1 on a piece of paper (10hex character).
    4. Hit Save Settings.
    For using manual key entry Encryption Level 40/64bit (10 hex digits)
    1. Under Key 1 type a 10 digit character from A-F and 0-9 (e.g.: A0B3F58C9E, 0123456789, ABCDEFABCD).
    2. Hit Save Settings.
    3. Click on the Setup Tab.
    4. Change the Local IP Address to "192.168.2.1".
    5. Click “Save Settings”.
    Finishing the Connection:
    1. Shut down all computers.
    2. Unplug the power from the back of both routers.
    3. Unplug the power from the modem.
    4. Wait for 30 second.
    5. Connect the WRT54G v5 router (using its Internet Port) to the Cable Modem.
    6. Connect the WRT54G v5 (using one of the four Ethernet ports) to the second router (using its Internet/WAN port).
    7. Power up the modem.
    8. Wait for the lights to stop blinking.
    9. Power up the routers.
    10. Start up your computer.

  • A lot of time to multiply two arrays

    Hello!
    I want to multiply two arrays. The size of the two arrays is 1568x1568. I use to do it a AxB.vi block....but it spends a huge time, almost 17 seconds, when a operation like this have to be done it less than in a second.
    I 've attached an example of the multiplication of two arrays with this size, you have to wait 16 seconds to obatin the result.
    Someone know how i can do this multiplication as far as possible?I have to use another block.....for example....formula node and make iterations (or in this way you spend the same time?)
    Thank you very much
    Larson

    Nomis wrote:
    On my system (P4, 2.6GHz, 1GB Ram Win2K), the example runs in 19 seconds in LV7.0 but in 7.1 it runs in 300mS!
    No idea why - perhaps the AxB function was rewritten for 7.1
    Yes the matrix operations got a big makeover in LabVIEW 7.1 and are MUCH faster as demonstrated here.
    On my 1.6GHz PentiumM laptop, the difference is not that big, but still about 10x.
    LabVIEW 7.0: 3700ms
    LabVIEW 7.1: 360ms
    Time to upgrade!
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • Downloaded files won't open, and mouse sometimes disappears

    Hey there, I've just been having some rather minor problems with my iBook, and I thought maybe someone could help me out. First of all, my iBook won't open a lot of applications that I download. It says that it can't find the application to open the

  • Error by sending a Web Service request

    Hi, we generated a WSDL from an outbound-interface and build a web application with it. When we send a Web Service request to SAP-XI from our Web Dynpro client application, we get an error "CALL_CONSUMER_ERROR" (of category "XI_J2EE_MESSAGING_SYSTEM"

  • My iPod touch 5th gen. is stuck in recovery mode giving me error 3/error 37/etc.

    So yeah, it's stuck there. It started happening about a month and a half ago, and when I finally brought it to the Apple Store for the first time they plugged it in and bam it was fixed. It was good for 1-2 weeks, and then suddenly, bam, problem is b

  • Unable to download to Adobe Digital Editions

    How do I overcome this problem? If possible please answer in simple point form. Error getting license. License Server Communication Problem: E_AUTH_BAD_DEVICE_KEY_OR_PKCS12 Is it possible for you to correct it from your end without me ? Your help wil

  • Magic Mouse vs. Magic Trackpad

    I've never owned a laptop, and the few times I used one, I found the trackpad a royal PITA (more accurately, Pain In The Finger/Hand/Wrist). But that was prior to the Magic Trackpad, and I'm wondering if my experience is specific to the types of trac