2
Answers

Write a Javascript function that transposes (m,n) matrix.

AMENI Miskini

AMENI Miskini

8y
311
1

Write a Javascript function that transposes (m,n) matrix.

  • Example : var matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ];
  • Function must only call basic methods (push, length) and handle square and non-square matrices. (without Jquery) 
    Answers (2)
    2
    Nilesh Shah
    NA 22.3k 215k 7y
    here is an example
     
    you may have to change according to your table:
    1. CREATE TRIGGER trg_Update_Qty  
    2.    ON  Stock   
    3.    AFTER UPDATE  
    4. AS   
    5.     UPDATE Stock SET Keterangag = 0 FROM inserted WHERE inserted.qty = 0 and inserted.kode_barang = Stock.kode_barang  
    6. GO 
     please mark the answer as accepted if it satisfies your question
    Accepted
    1
    Nilesh Shah
    NA 22.3k 215k 7y
    I assume you want to delete the data in the last column from table when qty = 0.
     
    write a trigger on that table in check if qty=0, then delete data in last column i.e. set it to 0
    0
    Amrul Hakim
    NA 19 1.2k 7y
    you can show me example code?