Trouble with a matrix constructor

im trying to make a constructor that creates a matrix based on a matrix that the user inputs, so i have this so far
public Matrices(int matriz[][])
        int numElements1 = matriz.length;
        int numElements2 = matriz[0].length;
        matrix = new int[numElements1][numElements2];
        for (int i = 0; i < numElements1; i++){
            for (int j = 0; j < numElements2; j++){
            matrix[i][j] = matriz[i][j];
    }im sure the problem is in the for but dunno what
when i try creating one, it says ArrayIndexOutOfBoundsException
help please

public Matrices(int matriz[][])
        int numElements1 = matriz.length;
        int numElements2 = matriz[0].length;
        matrix = new int[numElements1][numElements2];
        if (numElements1>numElements2)
            for (int i = 0; i < numElements1; i++){
                for (int j = 0; j < numElements2; j++){
                    matrix[i][j] = matriz[i][j];
        }else{
            for (int i = 0; i < numElements2; i++){
                for (int j = 0; j < numElements1; j++){
                    matrix[i][j] = matriz[i][j];
    }would this work??'

Similar Messages

  • Trouble with matrix

    Hi All,
    I have some troubles with matrix transformations.
    To test it I use a identity matrix as shown below:
    <?xml version="1.0" encoding="utf-8"?> 
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s="library://ns.adobe.com/flex/spark" 
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" 
                   creationComplete="init_app()"> 
        <fx:Script> 
                <![CDATA[ 
                    import flash.display.Bitmap; 
                    import flash.display.BitmapData; 
                    internal function init_app():void { 
                        larg_start.text = image.width.toString(); 
                        alt_start.text = image.height.toString(); 
                        var bd:Bitmap = Bitmap(image.content);                            
                        var m:Matrix = new Matrix(); 
                        m.identity(); 
                        //m.rotate(0); 
                        //m.scale(1,1); 
                        //m.tx = 0; 
                        //m.ty = 0; 
                        var bd2:BitmapData = new BitmapData(image.content.height, image.content.width);                    
                        bd2.draw(bd, m);                                    
                        var bitmap:Bitmap = new Bitmap(bd2); 
                        image2.source = bitmap; 
                        larg_stop.text = image2.width.toString(); 
                        alt_stop.text = image2.height.toString();                
                ]]> 
        </fx:Script> 
        <mx:Image id="image" x="56" y="105" source="file:/D:/Malletto/Sistema/Desktop/eolico1.jpg" width="217" height="290"/>    
        <s:Label x="60" y="492" text="Start W:"/> 
        <s:Label id="larg_start" x="173" y="492"/> 
        <s:Label x="60" y="526" text="Start H:"/> 
        <s:Label id="alt_start" x="173" y="526"/> 
        <s:Label x="411" y="492" text="Stop W:"/> 
        <s:Label id="larg_stop" x="540" y="492"/> 
        <s:Label x="411" y="526" text="Stop H:"/> 
        <s:Label id="alt_stop" x="540" y="526"/> 
        <mx:Image id="image2" x="411" y="96" width="217" height="310"/> 
    </s:Application> 
    Why doesn't work? :-( 
    Please help ... any help will be appreciated!

    var bd2:BitmapData = new BitmapData(image.content.width,
    image.content.height);                    

  • Having trouble with persist

    I have created a simple application where a user can order items and then i'm saving the order and all the items (details of order) to the dataBase.
    i'm using jdk1.5 with jboss and mySql (also hibernate).
    i'm having troubles with saving the details of the order, the relevant code is-
    order entity -
    @Entity
    public class Orders implements Serializable
        @Id @GeneratedValue
        private long orderId;                    //generated in db
        private String name;
       public Orders(String userName)
            this.userName=userName;
        public long getOrderId() { return orderId; }
        //getters and setters...
    detailsOfOrder entity -
    @Entity
    public class DetailsOfOrders implements Serializable
    @Id
    private long orderId;
    @Id
    private int productId;
    private int quantity;
    public DetailsOfOrders(long orderId,int productId)
         this.productId=productId;
         this.orderId=orderId;
    public long getOrderId() { return orderId; }
    public int getProductId() { return productId; }
    //getters and setters...
    }session bean (order method) -
            List<SCItem> listOfItems;                         //SCItem is a regular class
            Orders order=new Orders(userName);
            manager.persist(order);
            long orderId=order.getOrderId();   //get order id after persisting
            for(SCItem item : listOfItems)    //save details of order
             DetailsOfOrders detail=new DetailsOfOrders(orderId,"1");
             manager.persist(detail);                                                   //exception occures here
           }when i'm trying to make an order i'm getting the exception-
    javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
    what is the problem?
    thanks in advanced.

    yes, the entity classes have no-arg constructors (i just tried to write it shortly here...)
    about the other thing , well i'm sorry , the right code is-
    session bean (order method) -
       List<SCItem> listOfItems;                         //SCItem is a regular class
       Orders order=new Orders(userName);
       manager.persist(order);
       long orderId=order.getOrderId();   //get order id after persisting
       for(SCItem item : listOfItems)    //save details of order
         DetailsOfOrders detail=new DetailsOfOrders(orderId,item.getProductId());
         manager.persist(detail);                                                   //exception occures here
         }what else could it be?

  • Trouble with class

    I am unable to figure out what I am having trouble with this, here is the code
    public class Tools3
        protected long item_number;
        protected String product_name;
        protected long units_in_stock;
        protected double price_of_each_unit;
        protected static double total_price_of_inventory;
    public Tools3( long pitem_number, String pproduct_name, long punits_in_stock, double pprice_of_each_unit)
       item_number = pitem_number;
       product_name = pproduct_name;
       units_in_stock = punits_in_stock;
       price_of_each_unit = pprice_of_each_unit;
       total_price_of_inventory = punits_in_stock * pprice_of_each_unit;
    // Overloaded constructor for empty balance
    public Tools3()
       item_number = 0;
    public void set_item_number( long pitem_number )
       item_number = pitem_number;
    public void set_product_name( String pproduct_name )
       product_name = pproduct_name.toString();
    public void set_units_in_stock( long punits_in_stock )
       units_in_stock = punits_in_stock;
    public void set_price_of_each_unit( double pprice_of_each_unit )
       price_of_each_unit = pprice_of_each_unit;
    public long get_item_number()
       return item_number;
    public String get_product_name()
       return product_name;
    public long get_units_in_stock()
       return units_in_stock;
    public double get_price_of_each_unit()
       return price_of_each_unit;
    public double calculate_total_price()
       return units_in_stock * price_of_each_unit;
    public double calculate_total_price_of_inventory(Tools3[] mytools)
       double rettotal = 0;
       for (int i = 0; i < mytools.length; i++)
        rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_each_unit());
       return rettotal;
      public void sort_by_names(Tools3[] mytools)
      int a,b;
      int sortTheStrings = mytools.length - 1;
      String tempproduct_name;
      long tempitem_number;
      long tempunits_in_stock;
      double tempprice_of_each_unit;
        //need to implement a bubble sort here
        for (a = 0; a < sortTheStrings; ++a)
      for (b = 0; b < sortTheStrings; ++b)
      if(mytools.product_name.compareTo(mytools[b + 1].product_name) >0)
        //move name
        tempproduct_name = mytools.product_name;
        mytools.product_name = mytools[b+1].product_name;
        mytools[b+1].product_name = tempproduct_name;
        //move item_number
        tempitem_number = mytools.item_number;
        mytools.item_number = mytools[b+1].item_number;
        mytools[b+1].item_number = tempitem_number;
        //move units_in_stock
        tempunits_in_stock = mytools.units_in_stock;
        mytools.units_in_stock = mytools[b+1].units_in_stock;
        mytools[b+1].units_in_stock = tempunits_in_stock;
        //move price_of_each_unit
        tempprice_of_each_unit = mytools.price_of_each_unit;
        mytools.price_of_each_unit = mytools[b+1].price_of_each_unit;
        mytools[b+1].price_of_each_unit = tempprice_of_each_unit;
    //end of tools3.java class

    Results from javac
    C:\Java>javac Tools3.java
    Tools3.java:77: cannot find symbol
    symbol  : method get_units_in_stock()
    location: class Tools3[]
        rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_e
    ach_unit());
                                      ^
    Tools3.java:77: cannot find symbol
    symbol  : method get_price_of_each_unit()
    location: class Tools3[]
        rettotal = rettotal + (mytools.get_units_in_stock() * mytools.get_price_of_e
    ach_unit());
                                                                     ^
    Tools3.java:94: cannot find symbol
    symbol  : variable product_name
    location: class Tools3[]
      if(mytools.product_name.compareTo(mytools[b + 1].product_name) >0)
                ^
    Tools3.java:97: cannot find symbol
    symbol  : variable product_name
    location: class Tools3[]
        tempproduct_name = mytools.product_name;
                                  ^
    Tools3.java:98: cannot find symbol
    symbol  : variable product_name
    location: class Tools3[]
        mytools.product_name = mytools[b+1].product_name;
               ^
    Tools3.java:101: cannot find symbol
    symbol  : variable item_number
    location: class Tools3[]
        tempitem_number = mytools.item_number;
                                 ^
    Tools3.java:102: cannot find symbol
    symbol  : variable item_number
    location: class Tools3[]
        mytools.item_number = mytools[b+1].item_number;
               ^
    Tools3.java:105: cannot find symbol
    symbol  : variable units_in_stock
    location: class Tools3[]
        tempunits_in_stock = mytools.units_in_stock;
                                    ^
    Tools3.java:106: cannot find symbol
    symbol  : variable units_in_stock
    location: class Tools3[]
        mytools.units_in_stock = mytools[b+1].units_in_stock;
               ^
    Tools3.java:109: cannot find symbol
    symbol  : variable price_of_each_unit
    location: class Tools3[]
        tempprice_of_each_unit = mytools.price_of_each_unit;
                                        ^
    Tools3.java:110: cannot find symbol
    symbol  : variable price_of_each_unit
    location: class Tools3[]
        mytools.price_of_each_unit = mytools[b+1].price_of_each_unit;
               ^
    11 errors

  • Trouble with flash 8

    Hi all
    I'm using Flash 8 and I was saving the swf file in version
    Flash 7 because
    I was having trouble with line spacing with version 8. Now
    I'm getting this
    erre message.
    **Error** C:\Users\LD\AppData\Local\Macromedia\Flash
    8\en\Configuration\Classes\FP8\MovieClip.as: Line 36: The
    class or interface
    'flash.geom.Rectangle' could not be loaded.
    var scale9Grid:Rectangle;
    **Error** C:\Users\LD\AppData\Local\Macromedia\Flash
    8\en\Configuration\Classes\FP8\MovieClip.as: Line 51: The
    class or interface
    'flash.geom.Transform' could not be loaded.
    var transform:Transform;
    **Error** C:\Users\LD\AppData\Local\Macromedia\Flash
    8\en\Configuration\Classes\FP8\MovieClip.as: Line 55: The
    class or interface
    'flash.display.BitmapData' could not be loaded.
    function attachBitmap(bmp:BitmapData, depth:Number,
    pixelSnapping:String, smoothing:Boolean):Void;
    **Error** C:\Users\LD\AppData\Local\Macromedia\Flash
    8\en\Configuration\Classes\FP8\MovieClip.as: Line 59: The
    class or interface
    'flash.display.BitmapData' could not be loaded.
    function beginBitmapFill(bmp:BitmapData, matrix:Matrix,
    repeat:Boolean, smoothing:Boolean):Void;
    Total ActionScript Errors: 4 Reported Errors: 4
    thank you for the help

    Oh, OK, you likely have a file with a .dmg extension on it? You need to double-click that - it will mount on your Desktop looking like an external drive. Then you need to double-click the Install Flash Player app.
    This should actually install Flash Player and, after you restart Safari, your'll be able to watch video.
    Good luck,
    Clinton

  • Troubles with launching Java GUI from C++

    Hi,
    I'm launching a Java program from my C++ program (in linux). For C++ I'm using the Xm library for the GUI. When I want to instantiate a new Java object, I get the following error:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 11 occurred at PC=0x4015C475
    Function=XmRenderTableFree+0x15
    Library=/usr/X11R6/lib/libXm.so.2
    This is a backtrace (see #17):
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 1024 (LWP 19643)]
    0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
    (gdb) backtrace
    #0 0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
    #1 0x40153cd9 in XmFontListFree () from /usr/X11R6/lib/libXm.so.2
    #2 0x4c6ed4c4 in Java_sun_awt_motif_MComponentPeer_pSetFont () from
    /localhost/packages/java/j2sdk1.4.0/jre/lib/i386/libawt.so
    #3 0x423b6129 in ?? ()
    #4 0x423aef93 in ?? ()
    #5 0x423aef93 in ?? ()
    #6 0x423aef93 in ?? ()
    #7 0x423aef93 in ?? ()
    #8 0x423aeebc in ?? ()
    #9 0x423aef93 in ?? ()
    #10 0x423aef93 in ?? ()
    #11 0x423ac195 in ?? ()
    #12 0x404d6156 in JavaCalls::call_helper () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #13 0x40570ccd in os::os_exception_wrapper () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #14 0x404d62a4 in JavaCalls::call () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #15 0x404de12d in jni_invoke () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #16 0x404de94e in jni_NewObjectV () from
    /localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
    #17 0x0804d27b in JNIEnv_::NewObject (this=0x819af2c, clazz=0x819b938,
    methodID=0x8293af8) at /localhost/packages/java/j2sdk1.4/include/jni.h:840
    #18 0x0804cb0a in AppletViewer::AppletViewer (this=0x81a5628,
    appletA=0x8193438) at AppletViewer.cc:227
    #19 0x0804e17b in Applet::move (this=0x8193438, drawX=18, drawY=25,
    drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at Applet.cc:329
    #20 0x0808b852 in PageAttrs::moveApplets (this=0x8192dd8, drawX=18,
    drawY=25, drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at
    Page.cc:321
    #21 0x080ae6ab in XPDFCore::moveApplets (this=0x81698d0) at Page.h:190
    #22 0x080ac87f in XPDFCore::displayPage (this=0x81698d0, pageA=2, zoomA=1,
    rotateA=0, scrollToTop=1, addToHist=1) at XPDFCore.cc:585
    #23 0x080acac3 in XPDFCore::gotoNextPage (this=0x81698d0, inc=1, top=1) at
    XPDFCore.cc:670
    #24 0x080b3901 in XPDFViewer::nextPageCbk (widget=0x8149ff0, ptr=0x81408e8,
    callData=0xbffff6d0) at XPDFViewer.cc:1229
    #25 0x401df59e in XtCallCallbackList () from /usr/X11R6/lib/libXt.so.6
    #26 0x400b5803 in ActivateCommon () from /usr/X11R6/lib/libXm.so.2
    #27 0x400b5689 in Activate () from /usr/X11R6/lib/libXm.so.2
    #28 0x4020c453 in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
    #29 0x4020cd3e in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
    #30 0x4020cdf4 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
    #31 0x401ea462 in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
    #32 0x401ead7e in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
    #33 0x401eafc8 in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
    #34 0x401eb3d9 in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
    #35 0x080ab04c in XPDFApp::run (this=0x81175b0) at XPDFApp.cc:299
    #36 0x080b8eef in main (argc=2, argv=0xbffffa84) at xpdf.cc:283
    Now here's the interesting thing: in the constructor of my Java class there's a call to pack() to initiate my Java GUI. When I remove that call everything works fine (but then I haven't got a GUI though). setVisible(true) in the Java code also gives that problem.
    Has C++ or the Xm library some troubles with the Java GUI? Or what the hell is going wrong?
    PS: On Solaris, the very same code works perfectly...

    I really need a solution.
    Is it possible it has something to do with threads?
    Do I have to do AttachCurrentThread or something like that? Is that necessary?
    Btw, I assigned 10 duke dollars to this topic.

  • Trouble with rotating..

    Everyone out there that is good at math.. I have a problem. I'm working on making a basic 3d engine, and I cant seem to get it to rotate about the Y axis. I need a formula like
    Xprime=X*(sin alpha) - Y*(cos alpha)
    something like that. It can obviously use Z as well as X and Y. I'm haveing extreme trouble with this.. Thanks in advance.

    I made a quick search for "rotation matrix" and found this,
    http://www.euclideanspace.com/maths/algebra/matrix/orthogonal/rotation/index.htm
    The formula you're looking for is called: Rotation about z axis is: Rz

  • I have been having a lot of trouble with the latest itunes update and my ipod classic 80Gb i.e. being unable to sync songs, but now i have no files at all on my ipod, it is completely blank when i view it from my computer. I need help, please, anybody.

    As it says above, i have been having a lot f trouble with my ipod classic and the latest itunes update, i was unable to sync songs or anything to it and have tried every conceivable 'fix' i could find. i have run an itunes diagnostic and the results are posted below. a major problem is that when i try and view my ipod through my computer it displays nothing at all on the ipod, no files or anything, this may be the problem but i have no idea how it has happened or how i could resolve it.
    This ipod holds huge sentimental value and i am loathe to buy a new one! If anybody can help it is greatly appreciated, than kyou in advanced.
    Microsoft Windows 7 x64 Home Premium Edition Service Pack 1 (Build 7601)
    ASUSTeK Computer Inc. K50IJ
    iTunes 11.1.5.5
    QuickTime not available
    FairPlay 2.5.16
    Apple Application Support 3.0.1
    iPod Updater Library 11.1f5
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 7.1.1.3
    Apple Mobile Device Driver 1.64.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 0038B8600B98D1E0
    Current user is not an administrator.
    The current local date and time is 2014-03-21 16:52:39.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is not supported.
    Core Media is supported.
    Video Display Information
    Intel Corporation, Mobile Intel(R) 4 Series Express Chipset Family
    Intel Corporation, Mobile Intel(R) 4 Series Express Chipset Family
    **** External Plug-ins Information ****
    No external plug-ins installed.
    Genius ID: 2fd81a1f13cf3ff25a8b4f0e8e725116
    **** Device Connectivity Tests ****
    iPodService 11.1.5.5 (x64) is currently running.
    iTunesHelper 11.1.5.5 is currently running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    Universal Serial Bus Controllers:
    Intel(R) ICH9 Family USB Universal Host Controller - 2934.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2935.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2936.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2937.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2938.  Device is working properly.
    Intel(R) ICH9 Family USB Universal Host Controller - 2939.  Device is working properly.
    Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293A.  Device is working properly.
    Intel(R) ICH9 Family USB2 Enhanced Host Controller - 293C.  Device is working properly.
    No FireWire (IEEE 1394) Host Controller found.

    Here is what worked for me:
      My usb hub, being usb2, was too fast. I moved the wire to a usb port directory on my pc. That is a usb1 port which is slow enough to run your snyc.

  • Trouble with Toshiba built-in webcam: "unable to enumerate USB device"

    I am running archlinux on a Toshiba Satellite L70-B-12H laptop, and having troubles with the Webcam. *Once in a while*, everything goes well and I get
    # lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 004: ID 04f2:b448 Chicony Electronics Co., Ltd
    Bus 003 Device 003: ID 8087:07dc Intel Corp.
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    # dmesg
    [ 3433.456115] usb 3-1.3: new high-speed USB device number 4 using ehci-pci
    [ 3433.781119] media: Linux media interface: v0.10
    [ 3433.809842] Linux video capture interface: v2.00
    [ 3433.826889] uvcvideo: Found UVC 1.00 device TOSHIBA Web Camera - HD (04f2:b448)
    [ 3433.835893] input: TOSHIBA Web Camera - HD as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/input/input15
    [ 3433.835976] usbcore: registered new interface driver uvcvideo
    [ 3433.835977] USB Video Class driver (1.1.1)
    Unfortunately, *most of the time* the camera seems invisible to my system, and I get
    # lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 003: ID 8087:07dc Intel Corp.
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    (note the missing "04f2:b448 Chicony Electronics Co., Ltd" device), and
    # dmesg
    [ 480.104252] usb 3-1.3: new full-speed USB device number 4 using ehci-pci
    [ 480.171097] usb 3-1.3: device descriptor read/64, error -32
    [ 480.341235] usb 3-1.3: device descriptor read/64, error -32
    [ 480.511375] usb 3-1.3: new full-speed USB device number 5 using ehci-pci
    [ 480.578007] usb 3-1.3: device descriptor read/64, error -32
    [ 480.748151] usb 3-1.3: device descriptor read/64, error -32
    [ 480.918282] usb 3-1.3: new full-speed USB device number 6 using ehci-pci
    [ 481.325196] usb 3-1.3: device not accepting address 6, error -32
    [ 481.392091] usb 3-1.3: new full-speed USB device number 7 using ehci-pci
    [ 481.798926] usb 3-1.3: device not accepting address 7, error -32
    [ 481.799166] hub 3-1:1.0: unable to enumerate USB device on port 3
    Searching on the web, most results I found lead to this page, where it is said that the problem is due to badly tuned overcurrent protection, and advocated that unplugging and switching off the computer for a little while gets things back into normal. This does not really work for me; the problem seems to occur more randomly, unfortunately with high probability (my camera is available after less than one boot out of ten).
    I tried to ensure that the ehci-hcd module is loaded at boot with the ignore-oc option (with a file in /etc/module-load.d/), to no avail.
    I also wrote a script which alternatively removes and reloads the ehci-pci driver until my device is found in lsusb. It is sometimes helpful, but usually not. And even when my device is found that way, it can only be used for a while before disappearing again.
    Anyway, such a hack is unacceptable... So, my questions are:
    is it indeed related to overcurrent protection ?
    is there anything else I can try ?
    should I file somewhere an other of the numerous bug reports about "unable to enumerate USB device" already existing ?
    If of any importance, I am running linux 3.15.7, because at the time I installed my system, I couldn't get the hybrid graphic card Intel/AMD working under 3.16.
    Last edited by $nake (2014-10-18 16:29:06)

    uname -a
    Linux libra 3.9.4-1-ARCH #1 SMP PREEMPT Sat May 25 16:14:55 CEST 2013 x86_64 GNU/Linux
    pacman -Qi linux
    Name : linux
    Version : 3.9.4-1
    Description : The linux kernel and modules
    Architecture : x86_64
    URL : http://www.kernel.org/
    Licences : GPL2
    Groups : base
    Provides : kernel26=3.9.4
    Depends On : coreutils linux-firmware kmod mkinitcpio>=0.7
    Optional Deps : crda: to set the correct wireless channels of your country
    Required By : nvidia
    Optional For : None
    Conflicts With : kernel26
    Replaces : kernel26
    Installed Size : 65562.00 KiB
    Packager : Tobias Powalowski <[email protected]>
    Build Date : Sat 25 May 2013 16:28:17 CEST
    Install Date : Sun 02 Jun 2013 15:30:35 CEST
    Install Reason : Explicitly installed
    Install Script : Yes
    Validated By : Signature

  • Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hi, i am having trouble with my mac mail account, i cannot send or receive any emails because of the server connection problems. Message says it could not be connected to SMTP server. Thanks in advance for your help.

    Hello Sue,
    I have an iPad 3, iPad Mini and iPhone 5S and they are all sluggish on capitalisation using shift keys. I hope that Apple will solve the problem because it is driving me crazy.
    I find using a Microsoft Surface and Windows 8 phone, which I also have, work as well as all the ios devices before the ios 7 upgrade.
    It has something to do with the length of time that you need to hold the shift key down. The shift key needs to be held longer than the letter key for the capitalisation to work. For some reason, this is a major change in the way we have learnt to touch type on computers. I am having to relearn how to type!
    Michael

  • Trouble with OR in where clause

    Hello,
    I'm having trouble with execution speed. The problem seems to be with using OR in my where clause.
    Here's the meat of the function where i_pledge_number is an input parm:
    BEGIN
    SELECT /*+ INDEX (pp) */ SUM(pp.prim_pledge_amount)
    INTO return_amount
    FROM
    primary_pledge pp
    WHERE
    -- Get total if multiple allocations
    pp.prim_pledge_number IN
    (SELECT pc.pledge_number
    FROM pledge_codes pc
    WHERE pc.pledge_code_type = 'M'
    AND pc.pledge_code = 'AC'
    AND lpad(pc.pledge_comment,10,'0') = i_pledge_number)
    -- Get total if single allocation
    OR pp.prim_pledge_number = i_pledge_number;
    RETURN return_amount;
    END;
    If I comment out either half of the OR statement (either the subquery or the pp.prim_pledge_number = i_pledge_number half) the function returns a value in .02 seconds. If I leave the OR in, it takes 2.764 seconds to execute?? Can someone please show me a better way (faster) to do this? I tried using nvl() around the subquery but couldn't get it to compile.
    Thanks

    These things are difficult to diagnose remotely, but here is something you can try....
    SELECT */ SUM(pp.prim_pledge_amount)
    INTO return_amount
    FROM   primary_pledge pp
    WHERE  pp.prim_pledge_number IN (SELECT pc.pledge_number
                                     FROM pledge_codes pc
                                     WHERE pc.pledge_code_type = 'M'
                                     AND pc.pledge_code = 'AC'
                                     AND lpad(pc.pledge_comment,10,'0') = i_pledge_number
    UNION ALL
    SELECT i_pledge_number FROM dual)
       RETURN return_amount;
    END;If that doesn't do anything (and it might well not) there are a large number of different ways we can recast this query. To save us further guessing please give us more details: execution plans, database version number, volumetrics.
    Cheers, APC

  • A trouble with "LIKE" in a select statement

    Hi!
    I'm having trouble with "LIKE" in a select statement...
    With Access I can make the following and everything works well:
    SELECT name, birthday
    FROM client
    WHERE birthday LIKE '*/02/*';
    but if try to do it in my application (it uses Access), it doesn't work - I just can't understand that!!!
    In my application the "month" is always the currently month taken from the "System". Look what I'm doing...
    String query1 = "SELECT name, birthday " +
              "FROM client " +
              "WHERE birthday " +
              "LIKE '*/" +
              pMonth +
              "/*' " +
              "ORDER BY birthday ASC ";
    ResultSet rs = statement1.executeQuery(consulta1);
    boolean moreRecords = rs.next();
    The variable "moreRecords" is always "false", the query returns nothing although the table "client" has records that attend the query.
    Please, anyone can help me?! It's a little bit urgent.
    Thanks,
    Katia.

    Hi Katia,
    I'll bet the problem lies with the characters you're using to escape the LIKE clause. You're using the ones that Access likes to see, but that's not necessarily what's built into the JDBC-ODBC driver class.
    You can find out what the correct escape wildcard characters are from the java.sql.DatabaseMetaData.getSearchStringEscape() method. It'll tell you what to use in the LIKE clause.
    I'm not 100% sure about your code. It doesn't use query1 anywhere. I'd do this:
    String query = "SELECT name, birthday FROM client WHERE birthday LIKE ? ORDER BY birthday ASC";
    PreparedStatement statement = connection.createStatement(query);
    String escape = connection.getMetaData().getSearchStringEscape();
    String test = escape + '/' + pMonth + '/' + escape;
    statement.setString(1, test);
    ResultSet rs = statement.executeQuery();
    while (rs.hasNext())
    // load your data into a data structure to pass back.
    rs.close();
    statement.close();Let me know if that works. - MOD

  • (Trouble printing) Trouble with connection between Macbook Pro and Hp Deskjet 1510.

    Trouble with connection between Macbook Pro and Hp Deskjet 1510. (Nothing Prints).
    I have a Macbook Pro and am having difficulty printing documents from ‘Pages' from my Hp Deskjet 1510. I have installed the necessary software for the printer and it is connected via USB. Every time I try to print the printer icon comes up as it should, 'printing' and then 'job completed' and then the icon disappears. (Nothing is printed.) I thought it might be something to do with Pages compatibility with the printer but exporting the document to Word or making it a PDF doesn’t change anything. I don’t have Microsoft Word on my computer. The scanner does work and when I printed a ‘Test Page’ that worked too.
    Let me know if you know why this is happening.

    With these settings the network now works flawlessly, however, when i have my ethernet cable plugged in, my internet access via my airport card(on the macbook pro) is no longer available. Hoping you can tell me why this would be with this info i've provided.
    Educated guess. The networking devices have priorities as to which are used. The standard order is that Ethernet has a higher priority than Airport.
    While your Ethernet is unplugged it is inactive and the Mac ignores it. Once you plug it in, the Mac sees that it is active and switches traffic to that interface.
    I actually take advantage of this feature at home, but configuring my Airport and Ethernet with identical fixed IP addresses. Normally I'll use Airport, but if I'm copying a huge file and I want faster performance, I'll just walk my MacBook (previously iBook, previously Powerbook) over to my Ethernet switch and plug in my MacBook. Magically, the Mac detects that the Ethernet is active and continues the file transfer uninterrupted over the faster 100baseT Ethernet connection. When the transfer is finished, or if I really need to move back to the Comfy Chair, I unplug the Ethernet cable, and all activity reverts back to the Airport, all without disrupting any existing networking connections.
    You on the other hand have totally different settings for your Ethernet and your Airport, so when you switch to Ethernet, you basically loose your Airport connections.
    Something you can try:
    System Preferences -> Network
    Gear icon on the bottom left, next to the [+] [-] icons.
    Select *Set Service Order...*
    Now Drag the network interfaces into the perfer priority order you want. In this case put Airport above Ethernet.
    NOTE: You may want to create a new Network Location for this, instead of messing with your normal home Location (which is most likely the default Automatic. That way you have your original you can always fall back to.

  • Edge Animation having troubles with iOS devices within Muse Site

    Hi All! I've been creating a mobile version of my website www.rinkdesigns.com and have it all complete. I created an animation/navigation bar within Adobe Edge Animate and imported it into Muse. It functions AMAZINGLY on my Nexus 4 (Android) in Chrome but on a buddies iPhone 5 Chrome only loads about 3/4 of the animation/nav bar, in Safari the animation does not load at all and half of the page background does not load either. Please check out the preview site here http://rinkdesignsmobile.businesscatalyst.com/phone
    Has anyone else been having animation/mobile troubles with iOS devices? Any hints as to how you fixed your errors would be extremely helpful! I also posted this question in the Muse forum and haven't gotten a response...
    Thanks,
    John

    Or, how about this:
    Does anyone know how to have Edge Animate objects that utilize "_top" in an open url trigger make the Muse site that they are a part of open a new window/tab with that action (as opposed to having it open the url in the current page, or using "_blank" in the trigger)?

  • Trouble with 3rd party VST installs for Garageband, can't find instruments

    Hi,
    I am having trouble with Audio Units for Garageband when installing 3rd party software, VSTs, loops, instruments. I have more issues with Logic Pro. I am hoping that it is the same underlying issue and that I am just missing something. I have the manuals (not great for troubleshooting). I am confused with some installs use User Library and others use the Computer Library. I do go to the mfgs sites for updates. The installs sometimes work as standalones but I don't see ALL of the components of the software in say Garageband or Logic. Mostly, I am missing the "instruments" and "loops" that I want to access within the DAW. Some examples:
    • Here is some of the software I am talking about:  East West sample libraries (Play and Native Instruments); Vienna Symphonic librarires; Sylenth1 (just last night); Sample Tank 2 and Total Workstation 2 from IK Multimedia and others.
    • In GB I see the Audio Units for Vienna, Play, Sylenth, some of the IK Multimedia but NOT any instruments when I go to the "Sound Generator" -- I seem to be missing the instruments and loops. I see less AUs in Logic Pro. Some of these are VST instruments.
    • Can I just drag-drop samples to the library folders to fix this?
    • The plug-ins do not seem to work (though Sylenth1 worked for a single sound). When there is a standalone app (as in Sample Tank), I finally got the "sounds" to be reinstalled and loaded, those sounds/samples don't show up in any DAW.
    • When and if the sounds/loops/samples show up in GB's "Instruments" section will I be able to tell that they belong to that particular software or library?
    Thanks in advance.
    John

    Found the answer myself, it was simple:
    • Select the Track
    • Show the Instrument (info area)
    • Click on Edit
    • Click on the "Sound Generator" pop up field.
    • At the bottom of the pop-up list, select from the Audio Units that you have installed. This is where you see "Sample Tank 2, Vienna Instruments..."
    • NEXT -- IMPORTANT:   CLICK ON THE PICTURE next to the Sound Generator pop-up field.The AU unit loads up, the interface pops up, you load up the instruments in this AU Unit. You do NOT see the sounds from the AU unit in the normal Apple instrument list.
    This was not intuitive but once you know it, fairly simple.
    Still, the devil is in the details -- more questions on the way.

Maybe you are looking for

  • Can I put only the top image of a stack in a Mobile Album?

    I have an album that contains stacks and I would like to put only the top images of these stacks in a Mobile Album.  Is this possible?  I have tried to make a new album and only put the top images in this new album without sucess.  Is it possible to

  • After 1+ days at a time of working fine, MBP refuses to connect to wireless

    A cursory search didn't turn up any identical problems, so I am starting a new post about this one. I've had this brand new MBP for 4 months or so. In the past 2 weeks, this problem has surfaced. After being connected to a wireless network without in

  • MEGA ZOOM IN Z SPACE IS GETTING SLOW...

    Hey Everybody, I need to make a 30 second long zoom in Z space and I'm using a 3D camera for that. I've separated the dimension on the positioning of the camera so I could use only the 'Z position' to make the zoom. I'm starting the Z positioning fro

  • How to produce NameAlreadyBoundException using a client program?

    Hi, I am trying to produce javax.naming.NameAlreadyBoundException using client program. I tried to add differnt objects for the same name repeatedly to produce it. But in vain. here is my code. what is the way to produce it in general. My actual aim

  • Sound Blaster OMNI Surround 5.1 - input issue

    Hi there all, Purchased one of the above units today after sales person confirmed I could input three channels. I have three radios and wanted to take there mono output and put 2 into 1 for Line-In (Stereo) and 1 into Mic-in (Mono). Have tried everyt