Help with sparse matrix

I need to create a sparse matrix implementation. Only allocate space for non-zero matrix elements. Implement methods for addition, subtraction, multiplication and determinant. Here is how I want to implement it:
Matrix is an array of linked lists.
Each linked list represents a row.
Each entry in the linked list has a value and a column associated with it.
I need help with the setEntry method and creating the array of linked lists.
Here is what I have so far:
import java.io.*;
import java.util.*;
public class Matrix
  private int numberOfRows;
  int numberOfColumns;
  private IntegerNode[][] entries;
  private IntegerNode head = null;
  private static BufferedReader stdin = new BufferedReader(
             new InputStreamReader( System.in ) );
  // Constructor
  public Matrix(int numberOfRows, int numberOfColumns)
    if (numberOfRows <= 0)
      throw new IllegalArgumentException("Cannot construct Matrix with " +
        numberOfRows + " rows.  Number of rows must be positive.");
    if (numberOfColumns <= 0)
      throw new IllegalArgumentException("Cannot construct Matrix with " +
        numberOfColumns + " columns.  Number of columns must be positive.");
    entries = new IntegerNode[numberOfRows][numberOfColumns];
    this.numberOfRows = numberOfRows;
    this.numberOfColumns = numberOfColumns;
  public static void main (String [] args) throws IOException {
       File myFile1 = getFileName();
       Matrix myMatrix1 = Matrix.readMatrixFromFile(myFile1, "Matrix 1");
       File myFile2 = getFileName();
       Matrix myMatrix2 = Matrix.readMatrixFromFile(myFile2, "Matrix 2");
       System.out.println();
       System.out.println("Printing out Matrix 1");
       System.out.println("---------------------");
       myMatrix1.print();
       System.out.println("Printing out Matrix 2");
       System.out.println("---------------------");      
       myMatrix2.print();
       String myOperation = getAction();
       Matrix.performActionOnMatrices(myMatrix1, myMatrix2, myOperation);        
   public static Matrix readMatrixFromFile(File file, String fname)
    throws IOException
    BufferedReader reader =
      new BufferedReader(new FileReader(file));
    // first line should be number of rows followed by number of columns
    String line = reader.readLine();
    if (line == null)
      throw new IOException("File \"" + file + "\" is empty.");
    int[] dimensions = readInts(line, 2);
    System.out.println("The dimensions of " + fname + " are " + dimensions[0] + " by " +
      dimensions[1] + ".");
    Matrix matrix = new Matrix(dimensions[0], dimensions[1]);
       for (int row = 0; row < dimensions[0]; ++row) {           
            line = reader.readLine();
            if (line == null)
                 throw new IOException("Matrix in file should have " + dimensions[0] + " rows.");
            int[] rowValues = readInts(line, dimensions[1]);
            for (int column = 0; column < dimensions[1]; ++column)
                 matrix.setEntry(row, column, rowValues[column]);
    return matrix;
  public static String getAction() throws IOException {
       System.out.println("What operation would you like to perform on these matrices? (add, subtract, multiply, or determinant) ... ");
       String actionToTake = stdin.readLine();
       return actionToTake;
  public static File getFileName() throws IOException {
       System.out.println( "Please enter the full path and name of a file that contains a valid matrix ... " );
       String fname = stdin.readLine();
       File someFile = new File(fname);
       return someFile;      
  public static void performActionOnMatrices(Matrix matrix1, Matrix matrix2, String action) {
       if ((!action.equals("add")) && (!action.equals("subtract")) && (!action.equals("multiply")) && (!action.equals("determinant"))) {
           throw new IllegalArgumentException("The only valid actions are add, subtract, multiply or determinant.");           
       if (action.equals("add")) {
            if ((matrix1.numberOfRows != matrix2.numberOfRows) || (matrix1.numberOfColumns != matrix2.numberOfColumns)) {
                throw new IllegalArgumentException("The matrices must contain the same number of rows and columns in order to perform addition on them.");           
            System.out.println("Performing addition on the two matrices...");
            Matrix addMatrix = Matrix.add(matrix1, matrix2);
            System.out.println("Here is the sum of the two matrices:");
            System.out.println("------------------------------------------");
            addMatrix.print();
       } else if (action.equals("subtract")) {
            if ((matrix1.numberOfRows != matrix2.numberOfRows) || (matrix1.numberOfColumns != matrix2.numberOfColumns)) {
                throw new IllegalArgumentException("The matrices must contain the same number of rows and columns in order to perform subtraction on them.");           
            System.out.println("Performing subtraction on the two matrices...");
            Matrix subtractMatrix = Matrix.subtract(matrix1, matrix2);
            System.out.println("Here is the result of the subtraction:");
            System.out.println("---------------------------------------------");
            subtractMatrix.print();           
       } else if (action.equals("multiply")) {
            if ((matrix1.numberOfRows != matrix2.numberOfRows) || (matrix1.numberOfColumns != matrix2.numberOfColumns)) {
                throw new IllegalArgumentException("The matrices must contain the same number of rows and columns in order to perform multiplication on them.");           
            if (matrix1.numberOfRows != matrix2.numberOfColumns) {
                throw new IllegalArgumentException("The number of rows in the first Matrix must equal the number of columns in the second for multiplying.");                       
            System.out.println("Performing multiplication on the two matrices...");
            Matrix multMatrix = Matrix.multiply(matrix1, matrix2);
            System.out.println("Here is the product of the two matrices:");
            System.out.println("------------------------------------------");
            multMatrix.print();
       }     else if (action.equals("determinant")) {
            int det1 = matrix1.determinant();
            System.out.println("Determinant of Matrix 1");
            System.out.println("-----------------------");     
            System.out.println(det1);
            System.out.println();
            int det2 = matrix2.determinant();
            System.out.println("Determinant of Matrix 2");
            System.out.println("-----------------------");     
            System.out.println(det2);
            System.out.println();           
  //  Sets the entry in the matrix at the given row & column to
  //    the given value.
  public void setEntry(int row, int column, int value)
    if ((row < 0) || (row >= numberOfRows))
      throw new IllegalArgumentException("Illegal row index " + row +
        ".  Index should be between 0 and " + (numberOfRows-1));
    if ((column < 0) || (column >= numberOfColumns))
      throw new IllegalArgumentException("Illegal column index " + column +
        ".  Index should be between 0 and " + (numberOfColumns-1));
    //if (value != 0) {
         IntegerNode newNode = new IntegerNode();
         newNode.setItem(value);
         entries[row][column] = newNode;
  //  Returns the matrix entry at the given row & column
  public IntegerNode getEntry(int row, int column)
    if ((row < 0) || (row >= numberOfRows))
      throw new IllegalArgumentException("Illegal row index " + row +
        ".  Index should be between 0 and " + (numberOfRows-1));
    if ((column < 0) || (column >= numberOfColumns))
      throw new IllegalArgumentException("Illegal column index " + column +
        ".  Index should be between 0 and " + (numberOfColumns-1));
    return entries[row][column];
  //  A primitive routine to print the matrix.  It doesn't do
  //    anything smart or nice about spacing.
  public void print()
    for (int row = 0; row < numberOfRows; ++row)
      for (int column = 0; column < numberOfColumns; ++column)
           if (getEntry(row,column) != null) {
                System.out.print(getEntry(row, column).getItem() + " ");
      System.out.println();
    System.out.println();
  public void linkNodesInEachRow()
       int counter;
       for (int row = 0; row < numberOfRows; ++row)
         counter = 0;
         for (int column = 0; column < numberOfColumns; ++column)
              if (getEntry(row,column) != null) {
                   counter++;
                   if (counter == 1) {
                        head = new IntegerNode();
                        head.setItem(getEntry(row, column).getItem());
                   } else {
                   //System.out.print("ITEM NUMBER " + counter + " = ");
                   //System.out.println(getEntry(row, column).getItem() + " ");
         System.out.println();
    System.out.println();
       /*for (IntegerNode curr = head; curr != null; curr = curr.getNext()) {
            System.out.println(curr.getItem());
  //  Returns the determinant of the matrix.
  //  This method checks that the matrix is square and throws
  //    an exception if not.
  public int determinant()
     int determinantValue = 0;
     int counter;
     int plusminus = 1; // start with positive value
     // Make sure the matrix is square before proceeding with
    //   determinant calculation
    if (numberOfRows != numberOfColumns)
      // should really create a MatrixException type
      throw new IllegalArgumentException(
        "Cannot compute determinant of non-square (" + numberOfRows +
        " by " + numberOfColumns + ") matrix.");
    } else {
         // the matrix has the same number of rows and columns 
         if (numberOfColumns == 1)
              // the matrix is 1x1 - the determinant is just it's value
              return entries[0][0].getItem();
         else if (numberOfColumns == 2)
              // the matrix is 2x2 - return ad - bc
              return entries[0][0].getItem() * entries[1][1].getItem() - entries[0][1].getItem() * entries[1][0].getItem();
         else
              // the matrix is larger than 2x2
              // loop through the columns in the matrix
              for (counter = 0; counter < numberOfColumns; counter++)
                   determinantValue += plusminus * entries[0][counter].getItem() * minor(0, counter).determinant(); // The determinant is the sum of all the n possible signed products formed from the matrix using each row and each column only once for each product.  Notice the recursive call using the submatrix.
                   plusminus *= -1;  // switch the plus/minus sign of the multiplier on each iteration through the loop
         return determinantValue;
// returns a matrix representing the minor of the matrix
// for the specified row and column
public Matrix minor(int row, int column)
    int rowsA;
    int rowsB;
    int colsA;
    int colsB;
    // decrease the size of the resultant matrix by 1 row and 1 column
    Matrix smallerMatrix = new Matrix (numberOfRows - 1, numberOfColumns - 1);
    // scroll through the rows and columns in the original Matrix
    // copy all of the values from the original Matrix except the one row and column that were passed in
    for (rowsA=0, rowsB=0; rowsA < numberOfRows; rowsA++)
       if (rowsA != row)
          for (colsA=0, colsB=0; colsA < numberOfColumns; colsA++)
             if (colsA != column)
                 // the current row and column do not match the row and column we wish to remove
                 // set the values in the appropriate positions of the sub matrix
                smallerMatrix.setEntry(rowsB, colsB, entries[rowsA][colsA].getItem());
                colsB++;
          rowsB++;
    return smallerMatrix;     
  //  Used to parse the row of ints provided in the file input to
  //    this program.  Given a string containing at least numberToRead
  //    ints, it creates and returns an int array contaning those
  //    ints.
  private static int[] readInts(String someInts, int numberToRead)
    StringTokenizer tokenizer = new StringTokenizer(someInts);
    if (numberToRead < 0)
      throw new IllegalArgumentException("Cannot read " + numberToRead
        + " ints.  numberToRead must be nonnegative.");
    int[] toReturn = new int[numberToRead];
    for (int i = 0; i < numberToRead; ++i)
      if (!tokenizer.hasMoreTokens())
        throw new IllegalArgumentException("Cannot read " + numberToRead +
          " ints from string \"" + someInts + "\".");
      String token = tokenizer.nextToken();
      toReturn[i] = Integer.parseInt(token);
    return toReturn;
  public static Matrix add (Matrix a, Matrix b)
       Matrix result = new Matrix(a.numberOfRows, a.numberOfColumns);
      for(int i = 0; i < a.numberOfRows; i++)
         for(int j = 0; j < a.numberOfColumns; j++)
             int value = a.getEntry(i, j).getItem() + b.getEntry(i, j).getItem();
             result.setEntry(i, j, value);
      System.out.println("Addition complete.");
      return result;
  public static Matrix subtract (Matrix a, Matrix b)
       Matrix result = new Matrix(a.numberOfRows, a.numberOfColumns);
       for(int i = 0; i < a.numberOfRows; i++)
         for(int j = 0; j < a.numberOfColumns; j++)
             int value = a.getEntry(i, j).getItem() - b.getEntry(i, j).getItem();
             result.setEntry(i, j, value);
      System.out.println("Subtraction complete.");
      return result;
  public static Matrix multiply (Matrix a, Matrix b)
      Matrix result = new Matrix(a.numberOfRows, b.numberOfColumns);
      int colSum = 0;
      for(int i = 0; i < a.numberOfRows; i++)
          for(int j = 0; j < b.numberOfColumns; j++)
              colSum = 0;
              for(int k = 0; k < a.numberOfColumns; k++)
                 colSum += a.getEntry(i,k).getItem() * b.getEntry(k,j).getItem();
              result.setEntry(i, j, colSum);
      System.out.println("Multiplication complete.");
      return result;
  public class IntegerNode {
          private int item;
          private IntegerNode next;
          public void setItem(int newItem) {
               item = newItem;
          public int getItem() {
               return item;
          public void setNext(IntegerNode nextNode) {
               next = nextNode;
          public IntegerNode getNext() {
               return next;
}

Please help. The code runs just fine. The only thing is I need to link the nodes together (for each row) into a linked list and then put each linked list into an array. I need help with setEntry. The details of creating a node, attaching it to the list representing a row, etc. need to be in setEntry. Please help.
For the following matrix:
1 4 5
4 2 5
2 1 2
There is an array of three linked lists.
LinkedListsArray[0] = Entry(value=1, column=0)->Entry(value=4, column=1)->Entry(value=5, column=2)
LinkedListsArray[1] = Entry(value=4, column=0)->Entry(value=2, column=1)->Entry(value=5, column=2)
LinkedListsArray[2] = .....
Each entry is a node in the linked list.
The last twist is that if any values are zero, they shouldn't have nodes associated with them. Don't allocate nodes for zero valued entries.

Similar Messages

  • Help with Data Matrix (2D) barcode

    Hey everybody,
    I need a little help with creating a dynamic Data Matrix barcode. The DM Studio help files explain the barcode, regions, data code words, etc, but don't really help with implementation of one. I can create a static one using the actual Barcode widget in DM Studio, but I'm unsure how to create a dynamic one. Minimally I'd need to change the barcode's content from document to document, but if you use the barcode object in your section, it doesn't appear as though it allows variables or variable information (i.e. DAL script results). We have 3 of 9 barcodes, but we create those by simply using the 3of9 font when outputting the barcode's content. With the Data Matrix barcode, that doesn't seem like the appropriate course of action because of additional attributes like Scale or Symbol Size.
    Thanks,
    Gregg

    Hi Gregg,
    I would request you to try like this.
    1. First insert a normal field (not a bar code).
    2. Change 'Type' to Barcode.
    3. Change 'Format' to Data Matrix.
    4. Change 'Length' to 11.
    5. Change Symbol size, Scale appropriately.
    6. Use Rule as usual you would do for a normal field.
    7. Use Data Matrix bar code fonts (13504, 13505, or 13506) which are included with Documaker. If you have any other specific font for Data Matrix bar code, you may try that as well.
    These steps should allow you get a dynamic bar code.
    Thank you.

  • Need help with Color Matrix Filter.

    need help. still can't find the answer. thanks in advance!

    Darin.K wrote:
    Yes there are two bugs, I found the other one first but figured if you fixed the result the other would be obvious.  This is homework so only a hint:
    look at what happens (and does not happen) to pixel. 
    the first bug was that i had to use the 'result[][]' array instead of the 'image[][]' array in my last loop, right?
    the 2nd bug I really can't find :s been lookin at it for almost an hour now and trying new stuff but nothing works, 
    first i thought i had to put this line " result[x][y] = min(max(int((factor2 * pixel) + bias2), 0), 255);"  inside the for loop above but that didn't fix my problem,
    maybe the problem is in my 'imageX' and 'imageY' variable, i don't know? any more tips?
    I'm sorry for being such a newb but programming isn't my strongest quality.
    cedhoc wrote:
    Just one more advice:
    Look at the format of the "image" array. The way how to use the values from this array depends on the "image depth" parameter. 
    In your case, because the image is 8bit, you need to use the "colors" array containing the real RGB value.
    Look at the Help for the "Read BMP File VI", you should be able to properly handle your pixels from there.
     thanks for pointing that out for me, so I connect the 'totalpix' array with the 'colors' array from the image data instead of the 'image' array, that's correct right?

  • Help with a matrix-like report

    i want to produce a report with the following format:-
    7/JUL 8/JUL 9/JUL 10/JUL 11/JUL
    Employee Mon Tue Wed Thu Fri
    Alan x x
    Corby x
    i have a table with leave records that looks like this:-
    NAME FROM_DATE TO_DATE
    Alan 07-JUL-2003 08-JUL-2003
    Corby 10-JUL-2003 10-JUL-2003
    any suggestion is appreciated, thank you

    give it a try
    rem create table T_TEST
    rem (NAME varchar2(10)
    rem ,DATE_FROM date
    rem ,DATE_TO date
    rem )
    rem ;
    rem insert into T_TEST values ('Alpha', trunc(sysdate-2), trunc(sysdate) ) ;
    rem insert into T_TEST values ('Bravo', trunc(sysdate-1), trunc(sysdate+2) ) ;
    rem commit ;
    rem
    rem create table T_CAL
    rem (WEEK_ISO varchar2(10)
    rem ,DAY date
    rem );
    rem
    rem declare
    rem l_day date ;
    rem begin
    rem l_day := to_date('01012003','ddmmyyyy') ;
    rem
    rem LOOP
    rem insert into T_CAL values ( to_char(l_day,'IYYYIW'), l_day ) ;
    rem
    rem l_day := l_day + 1 ;
    rem
    rem exit when trunc(l_day) > to_date('31122003','ddmmyyyy') ;
    rem
    rem END LOOP ;
    rem
    rem commit ;
    rem end ;
    rem /
    rem create or replace
    rem function fff_status (p_name varchar2, p_day date) return varchar2 is
    rem l_result varchar2(10) ;
    rem begin
    rem
    rem select decode(count(*) ,0,null,'x')
    rem into l_result
    rem from t_test
    rem where name=p_name
    rem and date_from <= p_day and date_to >= p_day
    rem ;
    rem return l_result ;
    rem
    rem end fff_status ;
    rem /
    rem show error
    rem
    rem clear col
    rem column x format A5
    rem
    rem alter session set nls_date_format = 'DD/MM' ;
    rem
    rem select distinct
    rem A.week_iso
    rem ,decode(C.name, '-1', '----------', C.name) name
    rem ,decode(C.name,'-1',to_char(B.day1,'dd.mm'),fff_status(C.name,B.day1))x
    rem ,decode(C.name,'-1',to_char(B.day2,'dd.mm'),fff_status(C.name,B.day2))x
    rem ,decode(C.name,'-1',to_char(B.day3,'dd.mm'),fff_status(C.name,B.day3))x
    rem ,decode(C.name,'-1',to_char(B.day4,'dd.mm'),fff_status(C.name,B.day4))x
    rem ,decode(C.name,'-1',to_char(B.day5,'dd.mm'),fff_status(C.name,B.day5))x
    rem ,decode(C.name,'-1',to_char(B.day6,'dd.mm'),fff_status(C.name,B.day6))x
    rem ,decode(C.name,'-1',to_char(B.day7,'dd.mm'),fff_status(C.name,B.day7))x
    rem from
    rem (select '-1' name , 'A' sort_aux
    rem from t_cal
    rem UNION
    rem select distinct name , 'B' sort_aux
    rem from t_test
    rem order by 2, 1
    rem ) C
    rem ,(select
    rem max(decode(to_char(day,'D'), '2',day,null)) DAY1
    rem ,max(decode(to_char(day,'D'), '3',day,null)) DAY2
    rem ,max(decode(to_char(day,'D'), '4',day,null)) DAY3
    rem ,max(decode(to_char(day,'D'), '5',day,null)) DAY4
    rem ,max(decode(to_char(day,'D'), '6',day,null)) DAY5
    rem ,max(decode(to_char(day,'D'), '7',day,null)) DAY6
    rem ,max(decode(to_char(day,'D'), '1',day,null)) DAY7
    rem ,week_iso
    rem from
    rem T_CAL
    rem group by
    rem week_iso
    rem ) B
    rem ,T_CAL A
    rem where
    rem A.week_iso = B.week_iso
    rem and A.week_iso between '200327' and '200330'
    rem order by
    rem A.week_iso
    rem ;
    rem
    WEEK_ISO NAME X X X X X X X
    200327 ---------- 30.06 01.07 02.07 03.07 04.07 05.07 06.07
    200327 Alpha
    200327 Bravo
    200328 ---------- 07.07 08.07 09.07 10.07 11.07 12.07 13.07
    200328 Alpha x x x
    200328 Bravo x x x x
    200329 ---------- 14.07 15.07 16.07 17.07 18.07 19.07 20.07
    200329 Alpha
    200329 Bravo
    200330 ---------- 21.07 22.07 23.07 24.07 25.07 26.07 27.07
    200330 Alpha
    200330 Bravo
    12 rows selected.

  • Help with algorithm about distrbuting numbers in a matrix

    Hi,
    I have to do the following:
    I need to distribute N numbers in a (Y,N) matrix. The only problem is that each number should be unique on its row and its column (sth like sudoku). Number N is always the same as the columns.
    For example in a simple situation where there are 3 rows and 3 columns I should distribute 1, 2 and 3 like this (in rows): 1,2,3 - 2,3,1 - 3,1,2
    Rows should always be less than or equal number of columns.
    Any help would be appreciated.

    Here's my go: no claim how good it is.
    Start off with the matrix filled with a basic
    rotation:
    12345
    23451
    34512
    45123
    51234Then shuffle. Repeatedly:
    1. Randomly choose to swap rows or cols.
    2. Randomly pick a pair of rows/cols. Swap them.
    For example, swapping the first and last row on
    the original matrix yields:
    51234
    23451
    34512
    45123
    12345
    this sounds nice and easy. At the moment I am trying to do the following (which I am sure is bad) : a while (true) loop that picks a random number and random place and checks horizontally and vertically if it is ok to put the number in the randomly chosen place if not then another place is chosen. This is really time consuming though.

  • Help with J2EE Project Management

    Hi,
    We are about to begin a large J2EE project and are wondering if anyone could help with the following questions:
    1. Given the division of labor on J2EE projects (JSP developers, EJB developers, application deployers, etc...), what are "best practices" for building a team and ensuring that they communicate well after the design phase? How will the left arm know what the right arm is doing?
    2. What documentation should be produced during the design phase to give to the developers? Will this allow them to go off and develop independently of each other?
    3. Is there a "best practices" document anywhere on J2EE project management?
    Thanks in advance!!

    Hi,
    I feel any project to start with should have a prior planning,that too particularly for Object oriented programming projects,I feel UML is the best tool for entire process.I think rational software has got lot of Project Management Tools(PMT) and products at all stages.Please go through the rational.com site and hope you could find some info.I feel the answer to your second question is partly 'yes' and partly 'no'.The modules that you can split it up which have got some independent attributes,but it should not be too much in your project,then it affects the work matrix/There should be a optimal process to decide and that you can yourself formulate depending on the time frame,either way the last step of build or integration is not flexible enough that you should mind,modular flexibility can be there but the integration stage you are tied with a fixed process.So plan accordingly using a PMT tool for any project that matters and all the best.Bye
    Hari

  • Java Sparse Matrix tools

    Hi, I am now having a major problem with a Matrix storage in Java and hope someone here can shed some light:
    I need to store a Huge sparse matrix in memory, over 10k *10k double entries. I know that over 90% of the entries
    will be 0s (sparse) so apparently I need to use a sparse matrix storage algorithm.
    I have tried the famous MTJ package. however it gaves me the classic
    "Exception in thread "main" java.lang.OutOfMemoryError: Java heap space" error even when I try to do this:
         public static void main(String[] args){
              int row = 100000;
              int col = 100000;
              FlexCompRowMatrix matrix = new FlexCompRowMatrix(row,col);
              for(int i=0;i<row;i++){
                   for(int j=0;j<col;j++){
                        matrix.set(i, j, 0);
    evening defining a completely sparse matrix will result in out of memory, this is strange!!
    (using -Xmx 512m argument)
    I was wondering if anyone know why, or another actually usable sparse matrix class/package that can:
    1. handle at least 10k * 10k entries without pre-allocation (many other Sparse Matrix class I know, using the compressed column/row algorithm, need you to specify the two dimensional array to convert to the sparse matrix. this is stupid, if I can fit into a 2D array then I don't need to store it cleverly.
    2. can store an element at arbitrary position (basically supports set(i,j, value) ).
    I hope I made myself clear...

    ok sloved, It is my interpretation wrong about what "sparse" meant:
    at least in the mtj package, you only want to set values that are not "sparse", so if 0 is your sparse data
    then you don't want to set(i,j,0)
    I thought that sparse element is having value 0 , so setting 0s to all the rows and columns will not consume memory.
    I was so wrong!

  • Please help with RAID driver update.

    I need a little help with updating my RAID drivers. I have P55-GD65 motherboard and some SATA2 hard drives connected in RAID arrays. I am running Win7 64bit.
    I already downloaded and installed:
    “Intel P55 AHCI / RAID Drivers Ver: 8.9.0.1023”
    from the MSI support web page. The setup file installed the “Matrix Storage Manager” and  the “Matrix Storage Console”
    On the same web page I see another download link:
    “Intel Matrix Storage Manager Driver Ver: 9.5.0.1037”
    It looks like I already installed the manager with the previous driver. Do I need to install this one too? What is the difference between both?
    Also when I open the “Intel Matrix Storage Manager Driver Ver: 9.5.0.1037” I see 2 executable files:
    “iata_cd.exe” and “iata_enu.exe”
    I read the “Readme.txt” provided, but I couldn't find information on what is the difference between the EXE files and which one I should use.

    Quote
    I read the “Readme.txt” provided, but I couldn't find information on what is the difference between the EXE files and which one I should use.
    Use either one.  It doesn't matter in a functional way.

  • Help!! matrix problems

    Hi, i've got a problem. i need to read in a matrix from a file which consists of a series numbers.
    THe program i am trying to write is to do with renting apartments.
    an example file looks like this:
    0 400 450 510
    1 500 560 630
    2 625 676 740
    3 1000 1250 1600
    the first column is the floor number and the following columns represent the cost of an appartment on that floor with certain numbers of bedrooms, always beginning with zero so the four colums in this example are
    Floor Zero One Two
    e.g an appartment on the ground floor (0) with one bedroom is 450
    I need to writ a program which prompts a user for the floor number and the number of rooms. It then needs to return the correct price.
    I know how to promt the user so thats not a problem, i just need help with the part with finding the correct price in the matrix.
    I think it requires storing the number of colums and rows but i dont know how to do it
    Please help
    Thank you
    Sarah x

    She's rich.
    Rich ?
    How rich?
    More than you can imagine.
    I can imagine quite a bit.
    You'll get it.
    I better.
    This is one version of many.
    import java.io.*;
    import java.util.Vector;
    public class Napoleon
        public static void main(String[] args) throws IOException
            FileInputStream stream = new FileInputStream("prices.dat");
            InputStreamReader reader = new InputStreamReader(stream);
            StreamTokenizer tokens = new StreamTokenizer(reader);
            Vector v = new Vector();
            while(tokens.nextToken() != tokens.TT_EOF)
                v.add(new Integer((int) tokens.nval));
                System.out.println(new Integer((int) tokens.nval));
            System.out.println("Enter floor number: ");
            BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            String line1 = in.readLine();
            System.out.println("Enter no. rooms: ");
            String line2 = in.readLine();
            int x = Integer.parseInt(line1);
            int y = Integer.parseInt(line2);
            int numFloors = v.size()/4;
            if(x > 4) System.out.println("Max Floors: 4");
            if(y > 3) System.out.println("Max no. rooms: 3");
            int dest = (((x-1)*4)+y);
            System.out.println("PRICE: " + v.get(dest));
    }Now then, send me some duke bling bling.

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

  • I need help with Sunbird Calendar, how can I transfer it from one computer to the other and to my iphone?

    I installed Sunbird in one computer and my calendar has all my infos, events, and task that i would like to see on another computer that i just downloaded Sunbird into. Also, is it possible I can access Sunbird on my iphone?
    Thank you in advance,

    Try the forum here - http://forums.mozillazine.org/viewforum.php?f=46 - for help with Sunbird, this forum is for Firefox support.

  • Hoping for some help with a very frustrating issue!   I have been syncing my iPhone 5s and Outlook 2007 calendar and contacts with iCloud on my PC running Vista. All was well until the events I entered on the phone were showing up in Outlook, but not

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

    Hoping for some help with a very frustrating issue!
    I have been syncing calendar and contacts on my iPhone 5 and Outlook 2007 using iCloud  2.1.3 (my PC is running Vista). All was well until the events I entered on the phone were showing up in Outlook, but not the other way around. I’ve tried the usual recommended steps: deselecting calendar and contacts in the iCloud control panel and then re-selecting, signing out of the panel and back in, and repairing the Outlook installation in control panel.  I even uninstalled iCloud on the PC and downloaded it again (same version). 
    The furthest I’ve gotten is step 2 (and once, step 3) of 7 while performing “Outlook Setup For iCloud.” At that point I get, “Your setup couldn’t be started because of an unexpected error.”  After the first attempt at all this, all my calendar events disappeared from Outlook, although they are still in iCloud calendar and on my phone.
    Sound familiar?  Any ideas on how to solve this iCloud/Outlook issue?  Thanks much in advance!

  • Help with HP Laser Printer 1200se

    HP Support Line,
    Really need your assistance.  I have tried both contacting HP by phone (told they no longer support our printer via phone help), the tech told me that I needed to contact HP by e-mail for assistance.   I then sent an e-mail for assistance and got that reply today, the reply is as follows  "Randall, unfortunately, HP does not offer support via e-mail for your product.  However many resources are available on the HP web site that may provide the answer to your inquiry.  Support is also available via telephone.  A list of technical support numbers can be round at the following URL........."  The phone numbers listed are the ones I called and the ones that told me I needed to contact the e-mail support for help.
    So here I am looking for your help with my issue.
    We just bought a new HP Pavillion Slimline Desk Top PC (as our 6 year old HP Pavillion PC died on us).  We have 2 HP printers, one (an all-in-one type printer, used maily for copying and printing color, when needed) is connected and it is working fine with the exception of the scanning option (not supported by Windows 7).  However we use our Laser Printer for all of our regular prining needs.  This is the HP LaserPrinter 1200se, which is about 6 years old but works really well.  For this printer we currently only have a parallel connection type cord and there is not a parallel port on the Slimline HP PC.  The printer also has the option to connedt a USB cable (we do not currently have this type of cable).
    We posed the following two questions:
    1.  Is the Laser Jet 1200se compatible with Windows 7?
    and if this is the case
    2.  Can we purchase either a) a USC connection cord (generic or do we need a printer specific cord)? or b) is there there a printer cable converter adapater to attach to our parallel cable to convert to a USB connection?
    We do not want to purchase the USB cable if Windows 7 will not accept the connection, or if doing this will harm the PC.
    We really would appreciate any assitance that you might give us.
    Thank you,
    Randy and Leslie Gibson

    Sorry, both cannot be enabled by design.  That said, devices on a network do not care how others are connected.  You can print from a wireless connection to a wired (Ethernet) printer and v/v.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Going to Australia and need help with Power converters

    Facts:
    US uses 110v on 60hz
    Australia 220v on 50hz
    Making sure I understood that correctly.  Devices I plan on bringing that will use power are PS3 Slim, MacBook Pro 2008 model, and WD 1TB External HDD.  My DS, and Cell are charging via USB to save trouble of other cables.
    Ideas I've had or thought of:
    1.  Get a power converter for a US Powerstrip, and then plug in my US items into the strip and then the strip into an AUS Converter into Australian outlet.  Not sure if this fixes the voltage/frequency change.
    2.  Get power converters for all my devices.  But, not sure if my devices needs ways of lowering the voltage/increasing frequency or something to help with the adjustment.
    3.  Buy a universal powerstrip, which is extremely costly and I wouldn't be able to have here in time (I leave Thursday).  Unless Best Buy carrys one.  

    godzillafan868 wrote:
    Facts:
    US uses 110v on 60hz
    Australia 220v on 50hz
    Making sure I understood that correctly.  Devices I plan on bringing that will use power are PS3 Slim, MacBook Pro 2008 model, and WD 1TB External HDD.  My DS, and Cell are charging via USB to save trouble of other cables.
    Ideas I've had or thought of:
    1.  Get a power converter for a US Powerstrip, and then plug in my US items into the strip and then the strip into an AUS Converter into Australian outlet.  Not sure if this fixes the voltage/frequency change.
    2.  Get power converters for all my devices.  But, not sure if my devices needs ways of lowering the voltage/increasing frequency or something to help with the adjustment.
    3.  Buy a universal powerstrip, which is extremely costly and I wouldn't be able to have here in time (I leave Thursday).  Unless Best Buy carrys one.  
    Check the specs on input voltage/frequency of your power supplies.
    Many laptop power supplies are "universal/global" and are specced something like 80-265 volts AC 50/60 Hz, but not all.  These will just need a connector adapter.
    Unsure about the PS3 Slim - if it isn't universal it could be difficult as you'll need a 110/220 transformer, one big enough (power-handling wise) for the PS3 will be very bulky.
    For the external WD HDD, if it doesn't have a universal supply, you're probably best off just finding a new wallwart for it that is capable of running on 220/50.
    *disclaimer* I am not now, nor have I ever been, an employee of Best Buy, Geek Squad, nor of any of their affiliate, parent, or subsidiary companies.

  • Creation of context sensitive help with pure FM 12 usage doesn't work

    Hi,
    I hope somebody is able to help me with a good hint or tip.
    I am trying to create a context-sensitive Microsoft Help with FM12 only using the abilities of FM (no RoboHelp). For some reasons, my assigned ID's are not used in the generated chm file and therefore the help does not work context-sensitively.
    What did I do?
    - I created my FM files and assigned topic aliases to the headers. I did this two ways: a) using the "Special" menue and assigning a CSH marker and/or b) setting a new marker of type "Topic Alias" and typing the ID. I used only numeric IDs like "2000" or "4200",
    - I created a .h file (projectname.h) - based on the format of the file projectname_!Generated!.h (I read this in some instructions). So the .h file (text file) looks like this:
    #define 2000 2000 /* 4 Anwendungsoberfläche */
    #define 2022 2022 /* 4.1.1 Menü Datei */
    #define 2030 2030 /* 4.1.3 Menü Parametersatz */
    #define 2180 2180 /* 6.6.7 Objektdialog Q-Regler */
    #define 2354 2354 /* 6.9.2 Objektdialog Extran Parameter */
    #define 2560 2560 /* 6.9.5 Objektdialog Extran2D Parametersatz */
    - I published the Microsoft HTML Help. A projectname_!Generated!.h has been created. My IDs were not used in this file:
    #define 2000    1
    #define 2022    2
    #define 2030    3
    #define 2180    4
    #define 2354    5
    #define 2560    6
    - When I open the .chm file and look in the source code, the ID even is totally different. It is not the one, I assigned in FM, it is not the one which I assigned in the projectname.h file and it even is not the one, which was put in the projectname_!Generated!.h file. It is a generated name starting with CSH_1 ...n in a consecutive way numbered.
    Example:
    <p class="FM_Heading1"><a name="XREF_72066_13_Glossar"></a>Gloss<a name="CSH_1"></a>ar</p>
    What goes wrong? Why does FM not take my assigned IDs? I need to use these IDs since our programmers are using those already - I had to re-create the whole online help but the programs stay untouched.
    Please help!
    Many thanks
    Mohi

    Hi Jeff,
    thanks for your note!
    The text in my marker is just a number like "2000" or "4200". As said, I created manually a my.h file and used this marker there. E.g.
    #define 2000 2000.
    Whereby the first 2000 (in my opinion) is the marker text and the second 2000 is the context ID which the programmers are using for the context sensitive call of the help. My definitions in the my.h file were translated to #define 2000 1 (in the my_!Generated!.h file). The source code "translates" the context ID into CSH_8.
    I am still confused :-/
    Thanks
    Mohi

Maybe you are looking for