Search Results

Search found 4 results on 1 pages for 'richs'.

Page 1/1 | 1 

  • WPF DataGrid Printing Scrolled Visuals

    - by RichS
    I've been using the DataGrid (from WPF Toolkit), and have successfully created all of my data. The next step is that I want to print the entire DataGrid (scaled to a single printed page), even though the visible DataGrid in my Window is currently scrolled. When I prepare the DataGrid for printing, I've tried setting the DesiredSize to PositiveInfinity, and then calling Measure(.), to get the needed size of the DataGrid. But, when I call Arrange(.), it only prints the part of the DataGrid control that is currently visible on-screen. I know how to scale it to the correct size, but can't get the non-visible part of the DataGrid to be output to the printer. I've tried rendering to a Bitmap (RenderTargetBitmap), but that has the same problem. I also tried setting the MinHeight and MinWidth to be the same as the DesiredSize to try to /force/ things. But that doesn't work either. All I ever see in my printed page, is what was visible on-screen. Does anyone know how to solve this?

    Read the article

  • Improve mysql JDBC insert call

    - by richs
    i have a legacy Java system that every time it gets an order it makes a JDBC call to a stored procedure for each field in the order. Generally the stored procedure will get called 20 to 30 times for each order. The store procedure is just doing an insert into a table for each field. i need to improve the performance of this operation. one thought i had was to create an insert query string that does multiple inserts in one JDBC call. MySql supports a multiple insert string. INSERT INTO PersonAge (name, age) VALUES ('Helen', 24), ('Katrina', 21), ('Samia', 22), ('Hui Ling', 25), ('Yumie', 29) This has the advantage of only requiring one JDBC call per order. Any other ideas on how to improve performance?

    Read the article

  • ScheduledThreadPoolExecutor executing a wrong time because of CPU time discrepancy

    - by richs
    I'm scheduling a task using a ScheduledThreadPoolExecutor object. I use the following method: public ScheduledFuture<?> schedule(Runnable command, long delay,TimeUnit unit) and set the delay to 30 seconds (delay = 30,000 and unit=TimeUnit.MILLISECONDS). Sometimes my task occurs immediately and other times it takes 70 seconds. I believe the ScheduledThreadPoolExecutor uses CPU specific clocks. When i run tests comparing System.currentTimeMillis(), System.nanoTime() [which is CPU specific] i see the following schedule: 1272637682651ms, 7858346157228410ns execute: 1272637682667ms, 7858386270968425ns difference is 16ms but 4011374001ns (or 40,113ms) so it looks like there is discrepancy between two CPU clocks of 40 seconds How do i resolve this issue in java code? Unfortunately this is a clients machine and i can't modify their system.

    Read the article

1