Mail - The index of Mail is damaged.

Mail - The update failed. The index of Mail is damaged. Stop Mail to restore the index.
This happened after upgrading to OS X Yosemite. Who's able to have the right answer?

I have the same problem with upgrading to Yosemite. Mail index damaged. The Console gives these messages. Please help!
09-11-14 21:37:21,048 com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
09-11-14 21:37:22,740 bird[257]: Assertion failed: _pushConnection
09-11-14 21:37:24,305 Mail[2992]: Using V1 Layout
09-11-14 21:37:29,979 Mail[2992]: Error reading table of contents file from /Users/robenmarleengebbink/Library/Mail/Mailboxes/ToDos.mbox/table_of_contents: Error Domain=NSCocoaErrorDomain Code=260 "Het bestand 'table_of_contents' kan niet worden geopend, omdat het bestand niet bestaat." UserInfo=0x600000479ec0 {NSFilePath=/Users/robenmarleengebbink/Library/Mail/Mailboxes/ToDos.mbox/table_ of_contents, NSUnderlyingError=0x60000044a3b0 "De bewerking kan niet worden voltooid. Bestand of directory bestaat niet"}
09-11-14 21:37:29,993 Mail[2992]: Error reading table of contents file from /Users/robenmarleengebbink/Library/Mail/Mailboxes/ToDos.mbox/table_of_contents: Error Domain=NSCocoaErrorDomain Code=260 "Het bestand 'table_of_contents' kan niet worden geopend, omdat het bestand niet bestaat." UserInfo=0x600000671100 {NSFilePath=/Users/robenmarleengebbink/Library/Mail/Mailboxes/ToDos.mbox/table_ of_contents, NSUnderlyingError=0x600000450ad0 "De bewerking kan niet worden voltooid. Bestand of directory bestaat niet"}
09-11-14 21:37:31,779 CoreServicesUIAgent[2918]: unexpected message <OS_xpc_error: <error: 0x7fff7beb4c60> { count = 1, contents =
  "XPCErrorDescription" => <string: 0x7fff7beb4f70> { length = 18, contents = "Connection invalid" }
}>
09-11-14 21:37:35,000 kernel[0]: AppleKeyStore:Sending lock change 1 for handle -501
09-11-14 21:37:41,987 mds[33]: (DiskStore.Normal:2376) 707a 1.238324
09-11-14 21:37:43,906 com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
09-11-14 21:37:44,074 CoreServicesUIAgent[2918]: unexpected message <OS_xpc_error: <error: 0x7fff7beb4c60> { count = 1, contents =
  "XPCErrorDescription" => <string: 0x7fff7beb4f70> { length = 18, contents = "Connection invalid" }
}>
09-11-14 21:37:44,559 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:44,637 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:44,656 bird[257]: Assertion failed: _pushConnection
09-11-14 21:37:44,698 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:44,766 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:44,830 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:44,893 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:44,959 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:45,023 sandboxd[232]: ([596]) storeuid(596) deny mach-lookup com.apple.dock.server
09-11-14 21:37:45,158 Mail[2996]: Using V1 Layout
09-11-14 21:37:45,510 Mail[2996]: Upgrading Library from 4.188 to 4.188
09-11-14 21:37:46,189 Mail[2996]: unresolvedBaseMailDirectory /Users/robenmarleengebbink/Library/Containers/com.apple.mail/Data/Library/Mail
09-11-14 21:37:46,190 Mail[2996]: resolvedBaseMailDirectory /Users/robenmarleengebbink/Library/Mail
09-11-14 21:37:46,833 Mail[2996]: Capturing diagnostics to trace took 0.643291
09-11-14 21:37:48,115 Mail[2996]: Exception during migration: data parameter is nil
09-11-14 21:37:48,115 Mail[2996]: Migration (simple) failed and took 1.926999 seconds
09-11-14 21:37:48,132 Mail[2996]: emlxCountPreMigration 362
09-11-14 21:37:48,132 Mail[2996]: emlxCountPostMigration 362
09-11-14 21:37:48,132 Mail[2996]: lostAndFoundEmlxCount 0
09-11-14 21:37:48,132 Mail[2996]: messageCountPreMigration 359
09-11-14 21:37:48,132 Mail[2996]: messageCountPostMigration 359
09-11-14 21:37:48,133 Mail[2996]: MessageTracing took 0.016330
09-11-14 21:37:48,133 Mail[2996]: Upgrade failed because of exception: data parameter is nil
09-11-14 21:37:48,134 Mail[2996]: Library upgrader failed: Error Domain=MCMailErrorDomain Code=1029 "data parameter is nil" UserInfo=0x7fc19500e490 {NSLocalizedDescription=data parameter is nil}
09-11-14 21:37:50,164 Mail[2996]: CFUserNotificationDisplayAlert:  called from main application thread, will block waiting for a response.
09-11-14 21:37:52,000 kernel[0]: Sandbox: storeuid(596) deny mach-lookup com.apple.dock.server

Similar Messages

  • Mail app damaged after Yosemite upgrade

    I upgraded to Yosemite and among other problems, my mail app does not work. When I open the application it prompts me to begin the message import process. I click 'continue' and the message import begins. The process progresses until it reaches the migration of data, at which point it stops and an error message appears.
    >>"The upgrade failed. An error occurred during the upgrade. Click Continue to launch the Mail Import Assistant, which will help you build a new library and import your existing messages." >>
    However, when I click continue another error message appears. >>"Your Mail index has been damaged. To repair, quit Mail. Mail will repair the index the next time you open Mail. Your mailboxes and messages will be preserved.">>
    When I reopen Mail, this entire process is repeated and I get no where.
    I've tried chatting with apple support and it was not helpful. I created an admin account under safe mode and mail opened fine, prompting me to set up a mailbox.  I have cleared my Caches. I repaired HD in recovery mode, disk repair and repair permissions.  Nothing as worked and my mac is running insanely slow.
    Someone please help me!

    Reinstall Lion, Mountain Lion, Mavericks or Yosemite without erasing drive
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu.
    Reinstall Lion, Mountain Lion, Mavericks, or Yosemite
    OS X Yosemite- Reinstall OS X
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

  • Maverics-Mail-Thermal damage possible?

    I'm trying to get mail started (not responding) but it's eating up almost all my memory.  I have a QUESTION (my previous post was quicky removed because it didn't contain a question i guess ... more of a criticism I suppose ... so watch what you say here on here )
    I'm leaving the mail app run in hopes that it will eventually startup. For the first time in over a year of ownership of this iMac I heard the fan come on. Touched the top and it was very, very, very hot. Soooo, my QUESTION is: is it safe to leave my computer un-attended while I visit my neighbour? Is it possible the heat could cause thermal damage or worse a fire? Or is there built in shut-down process if it gets too hot?
    Are there any native/built-in utilities to display the temp?
    I only have Safari, Mail(Not Responding) and, Activity Monitor running.
    Thank you.
    27" iMac, Mid 2011

    I'm trying to get mail started (not responding) but it's eating up almost all my memory.  I have a QUESTION (my previous post was quicky removed because it didn't contain a question i guess ... more of a criticism I suppose ... so watch what you say here on here )
    I'm leaving the mail app run in hopes that it will eventually startup. For the first time in over a year of ownership of this iMac I heard the fan come on. Touched the top and it was very, very, very hot. Soooo, my QUESTION is: is it safe to leave my computer un-attended while I visit my neighbour? Is it possible the heat could cause thermal damage or worse a fire? Or is there built in shut-down process if it gets too hot?
    Are there any native/built-in utilities to display the temp?
    I only have Safari, Mail(Not Responding) and, Activity Monitor running.
    Thank you.
    27" iMac, Mid 2011

  • [Help!] How I connect (the index) the rectangle array to a interger array

    I'm new in javafx... but the javafx language syntax seam to be many thing new... : )
    And I got a problem... : |
    My source:
    * Main.fx
    * Created on Mar 21, 2009, 4:57:42 PM
    package canvas;
    import javafx.scene.*;
    import javafx.scene.paint.*;
    import javafx.scene.shape.*;
    import javafx.stage.*;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    * @author xllsllx
    Stage {
        title: "Application title"
        width: 500
        height: 500
        scene: Scene {
            var clickcount = 0;
            content:Group {
                content: for(i in [1..8], j in [1..8]){
                    var zoom = 1;
                    var recbig = 40;
                    Rectangle {
                        x: i*recbig*zoom,
                        y: j*recbig*zoom
                        width: recbig*zoom,
                        height: recbig*zoom
                        fill: Color.BLACK
                        stroke:Color.WHITE
                        strokeWidth:1
                        onMouseEntered: function( e ):Void {
                            var rect: Rectangle = e.node as Rectangle;
                            rect.fill = Color.BLUE;
                        onMouseExited: function( e ):Void {
                            var rect: Rectangle = e.node as Rectangle;
                            rect.fill = Color.BLACK;
                        onMousePressed: function( e ):Void {
                            var rect: Rectangle = e.node as Rectangle;
                            rect.fill = Color.GREEN;
                            clickcount++;
                            //How can I get the rectangle index ...?
    }*[Problem]*
    I have:
    1. int array [i..8,j..8]
    2. rectangle array [i..8,j..8]
    3. I have a rectangle array display in a window. Picture -> [http://www.onjava.com/onjava/2007/07/27/graphics/grill.gif]
    4. I add mouse click event for each rectangle
    *5*. Mine problem is "_How I get the index of the rectangle in the rectarray when I click on any display rectangle_"
    Ex: I click on Rect[col:2,row:3] and I have the return value is col:2 & row:3.
    So I can mark it on int array at col:2 & row:3
    Thank for reading my problem... and thank a lot if have any answer... : )
    And if you have any new best solution for this problem please share. : ) Thank much!!!
    Edited by: xllsllx on Mar 23, 2009 11:09 AM

    What do you mean "you can use those features of Java from JavaFX"?
    I thought that JavaFX don't have a "true multi-dimensional arrays". Because I had tried a multi-dimensional arrays but it seam to be impossible.Correct. JavaFX doesn't have multi-dimensional arrays, and it also doesn't have a lot of the capabilities found in the Java Collections API. However, because JavaFX compiles to JVM bytecode, you can use Java functionality in your JavaFX program. For example, if you need a true multi-dimensional array, you could create a Java class that contains a multi-dimensional array and exposes getters and setters. On a related note, you could use the Collections API directly, as in the example in the following post (that also demonstrates reflection in JavaFX).
    http://javafxpert.com/weblog/2009/03/answering-reader-mail-about-the-javafx-reflection-api.html
    Note that the source code in that post imports java.util.Iterator, etc. to iterate over a Java collection. It also uses java.util.Date
    A disadvantage of using these approaches is that JavaFX can't bind to POJOs (yet).
    Thanks,
    Jim Weaver
    http://JavaFXpert.com (Learn JavaFX blog)

  • Hello; I am using Numbers '09 version 2.1 (436). I tried unsuccessfully to upgrade at one point. Now can't open existing documents. Message "The index.xml file is missing".

    Hello; I am using Numbers '09 version 2.1 (436). I tried unsuccessfully to upgrade at one point. Now can't open existing documents. Message "The index.xml file is missing". How can I correct this ?
    Thank you
    Tom

    I't not iWeb that got damaged but the domain file. The index.xml file is inside the domain.sites file that's located in your Users/Home/Library/Application Support/iWeb folder. Do you have a backup of that file you can revert to?  If so then do it.  Otherwise a long shot but try the following:
    close iWeb.
    delete the iWeb preference file, com.apple.iWeb.plist, that resides in your Home/Library/Preferences folder.
    go to your Home/Library/Caches/com.apple.iWeb folder and delete its contents.
    launch iWeb and try again.
    If that doesn't help continue with:
    move the domain file from your Home/Library/Application Support/iWeb folder to the Desktop.
    launch iWeb, create a new test site, save the new domain file and close iWeb.
    go to the your Home/Library/Application Support/iWeb folder and delete the new domain file.
    move your original domain file from the Desktop to the iWeb folder.
    launch iWeb and try again.
    OT

  • Rikaichan (add-on) doesn't work at my office. It gives this error "Javascript application: the index for one or more dictionaries needs to be created. This may take a while on slower computers". And then the PC freezes. What should I do?

    I'm using Firefox 3.6.17, and have installed Rikaichan 2.02. Once I've installed the Japanese-English dictionary, I then click on Rikaichan to get it started, and it always gives a "Javascript Application" error:
    '''"The index for one or more dictionaries needs to be created. This may take a while on slower computers"'''
    Rikaichan always works fine on my laptop, but I just can't seem to install it properly at work. Is there some sort of office security screwing it up?

    venicespent,
    Boot into your Mavericks Recovery partition by hold down the command and R keys whilst booting. You'll see a screen that looks like this:
    Click on the Disk Utility item to open Disk Utility. You should see your boot drive (usually named "Macintosh HD" unless you've changed it) in the column on the left of the screen. Select your boot partition and click on the "Verify" button. Let your Mac do it's thing - if you get green text telling you that everything seems to be OK, then your disk should not be damaged. If, however, you get red text telling you that the disk needs to be repaired, click on the "Repair" button. If the disk can be repaired, you should be good to go. If the disk cannot be repaired then the drive is damaged.
    But before you do anything, make certain that you have backups!!!
    Clinton
    MacBook Pro (15-inch Late 2011), OS Mavericks 10.9.4, 16GB RAM, 960GB SSD, 27” Apple Thunderbolt Display

  • Unable to load the project. latter is probably damaged or contain outdated elements

    any one can help me with this probleme

    Hi,
    I am the one with the problem wich kaderdz exposed. Sorry for my English writing, my first language is French!
    I still have the same problem and some of my projects won't open (months of work...).
    The few projects that opens are kind of weird : only one chanel work in the audio, and the "title" window has also change. Here are some screen shots of what happens :
    message 1:
    message 2 - translation : impossible to charge the project. It is damage or contain obsolet elements :
    message 3 :
    title window :
    I would be so grateful if you can solve the problem. It's a lot of work!!

  • Hi. I am building a website with the White template. Does anyone know which typeface was used by Apple on the heading index? (I would like to repeat the index at the bottom of my pages).

    Hi I am building a website using iWeb's white template. I can't write HTML, so can't change the index, but would like to repeat it at the bottom of my pages. Does anyone know which typeface Apple used? Presumably it would be 'web friendly' for use as described above?

    Arial
    PS. You can see it in the source of the published page where it says new NavBar etc...
    ".navbar {\n\tfont-family: Arial, sans-serif;\n\tfont-size: 1em;\n\tcolor: #666;\

  • Can I select the data of the indexes?

    Hi everybody,
    Oracle storages indexes in index type segments as I know.
    Is it possible to see the data of these index segments like a table or view?
    So I would like to see not only the structue of it with:
    select * from dba_segments SG where SG.segment_name = ’index_name’
    I think something like this:
    For example if I have a table named Table1.
    (please don’t see the format of the rowid):
    Rowid....field1
    1_1.......AA
    1_2.......AB
    1_3.......BB
    and I have an index on field1 named ndx_t1_f1.
    Create index ndx_t1_f1 on Table1(field1);
    I would like to see something like this
    (if it is a simple Btree index like the ndx_t1_f1):
    Select * from some_schema.???ndx_t1_f1???
    Rowid..........ParentRowid..........ValuePrefix..........SolutionRowid
    2_1
    2_11............2_1.......................A
    2_12............2_1.......................B
    2_111..........2_11.....................AA......................1_1
    2_112..........2_11.....................AB......................1_2
    2_121..........2_12.....................BB......................1_3
    And if i run:
    select field1 from table1 where filed1 like 'B%'
    oracle can use ndx_t1_f1 index like this:
    2_1 -> 2_12 -> 2_121 -> BB
    Yes, I know, there are some promlems with this imagine, but is it possible, or is it a silly question?
    Thanx: lados.

    Hi,
    You asked: „Why do you want to do that?”
    Well, I have a table T with fields F1, F2, F3 ...
    If I run:
    select F2, T.* from T where F1=12345;
    the result is one record and the value of F2 is ‘A’.
    But if I run:
    select F2, F1 from T where F1=12345;
    the result is one record and the value of F2 is ‘B’.
    And this is the same record. Oppps!!!!!
    I think the cause of the problem is the next:
    I have an index on F1, F2 named ndx_T_F1_F2
    In the second case: oracle uses only the index blocks and no table blocks, because all asked data exists in the index blocks.
    In the first case: oracle uses the table blocks too, because I asked all field.
    And I think there is a corrupted data on the index.
    I created a new index on (F1,F2,F3), and I suggest to use this.
    select /*+index(T, ndx_T_F1_F2_F3)*/ T.F2 from T where F1=12345;
    the result is one record and the value of F2 is ‘A’.
    But what is strange, oracle didn’t realise this inconsistent situation.
    (It could be an earlier crash, I don’t know, I’m new at this workplace)
    I think, the problem can solve with recreating the index ndx_T_F1_F2.
    But it’s a very special situation for me, and I would like to see the corrupted data concretly with my eyes.
    I think, that
    Select * from some_schema.???ndx_t1_f1???
    would I see like a view, but it would based on procedures and not tables.
    It would be enough to me, because I only could see the data in the index.
    But it is impossible as you wrote, isn’t it?
    Thanx: lados.

  • The plan doesn't use the index but the cost of INDEX FULL SCAN looks better

    Hi,
    Well, I'm sure I miss the boat... and if the question is pretty tricky, the answer is probably :"You're stupid Greg!". Well anyway, you'll probably be interested in trying to answer it as I've spent some times on it without any result ! I use Oracle XE on Windows...
    1) Below is my query and its plan. You'll find the full schema generation script at the end of this email. Look at the cost (468) of the plan and the cost of the same query when you force the use of the index (116). Why is this ?
    select count(distinct col5)
      2    from demo
      3      where col1 between 1 and 50000
      4        and col2=col1
      5        and col3=col1
      6        and col4=col1;
    Plan d'execution
    Plan hash value: 2072716547
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   116 |   468   (2)| 00:00:06 |
    |   1 |  SORT GROUP BY     |      |     1 |   116 |            |          |
    |*  2 |   TABLE ACCESS FULL| DEMO |     1 |   116 |   468   (2)| 00:00:06 |
    Predicate Information (identified by operation id):
       2 - filter("COL2"="COL1" AND "COL3"="COL1" AND "COL4"="COL1" AND
                  "COL1"<=50000 AND "COL2"<=50000 AND "COL3"<=50000 AND "COL4"<=50000 AND
                  "COL1">=1 AND "COL2">=1 AND "COL3">=1 AND "COL4">=1)2) When I force the use of an index (with a Hint), You'll see the cost of the plan is 116 which is definitly better than the TABLE ACCESS FULL (468) :
    SQL> l
      1  select /*+ index(demo demo_idx)*/ count(distinct col5)
      2    from demo
      3      where col1 between 1 and 50000
      4        and col2=col1
      5        and col3=col1
      6*       and col4=col1
    SQL> /
    Plan d'execution
    Plan hash value: 189561699
    | Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |          |     1 |   116 |   437   (2)| 00:00:06 |
    |   1 |  SORT GROUP BY               |          |     1 |   116 |            |          |
    |   2 |   TABLE ACCESS BY INDEX ROWID| DEMO     |     1 |   116 |   437   (2)| 00:00:06 |
    |*  3 |    INDEX FULL SCAN           | DEMO_IDX |     1 |       |   436   (2)| 00:00:06 |
    Predicate Information (identified by operation id):
       3 - filter("COL2"="COL1" AND "COL3"="COL1" AND "COL4"="COL1" AND
                  "COL1"<=50000 AND "COL2"<=50000 AND "COL3"<=50000 AND "COL4"<=50000 AND
                  "COL1">=1 AND "COL2">=1 AND "COL3">=1 AND "COL4">=1)3) My question is why is plan1 used while plan2 should be considered better by the optimizer regarding the cost (to make the case even more complex, plan1 is actually more efficient but this is out of the scope of my question. I know that and I know why !).
    You'll find a script to generate the structures and data below. I can send you the 10053 traces if you what to go furthermore. Take care the index is a REVERSE index (Don't know if query rewrite should be enabled in order to take advantage of this type of index but it is set to "true" (and "trusted") :
    drop table demo;
    create table demo (col1 number not null,
        col2 number,
        col3 number,
        col4 number,
        col5 varchar2(500));
    begin
      for i in 1..100000 loop
        insert into demo values (i,i,i,i,'This column is used to raise the High Water Mark and '||
                                 ' the cost of an TABLE ACCESS FULL operation');
      end loop;
    end;
    commit;
    create index demo_idx on demo(col1,col2,col3,col4) reverse;
    exec dbms_stats.gather_table_stats(USER, 'DEMO', cascade=>true, -
      method_opt=>'FOR ALL COLUMNS SIZE 254', no_invalidate=>false) Any comments are welcome ! Best Regards,
    Gregory
    Message was edited by:
    arkzoyd... I've added the "pre" tags

    I suspect this has something to do with db_file_multiblock_read_count
    After running provided creation statements by you I got following results:
    SQL> show parameter multiblock
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     16
    SQL> set autotrace on
    SQL> select count(distinct col5)
      2   from demo
      3   where col1 between 1 and 50000
      4   and col2=col1
      5   and col3=col1
      6   and col4=col1
      7  /
    COUNT(DISTINCTCOL5)
                      1
    Execution Plan
    Plan hash value: 2072716547
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   116 |   375   (1)| 00:00:05 |
    |   1 |  SORT GROUP BY     |      |     1 |   116 |            |          |
    |*  2 |   TABLE ACCESS FULL| DEMO |     1 |   116 |   375   (1)| 00:00:05 |
    Predicate Information (identified by operation id):
       2 - filter("COL2"="COL1" AND "COL3"="COL1" AND "COL4"="COL1" AND
                  "COL1"<=50000 AND "COL2"<=50000 AND "COL3"<=50000 AND "COL4"<=5000
    0 AND
                  "COL1">=1 AND "COL2">=1 AND "COL3">=1 AND "COL4">=1)
    Statistics
            196  recursive calls
              0  db block gets
           1734  consistent gets
            850  physical reads
              0  redo size
            422  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              7  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> select /*+ index(demo demo_idx)*/ count(distinct col5)
      2   from demo
      3   where col1 between 1 and 50000
      4   and col2=col1
      5   and col3=col1
      6   and col4=col1
      7  /
    COUNT(DISTINCTCOL5)
                      1
    Execution Plan
    Plan hash value: 189561699
    | Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| T
    ime     |
    |   0 | SELECT STATEMENT             |          |     1 |   116 |   431   (1)| 0
    0:00:06 |
    |   1 |  SORT GROUP BY               |          |     1 |   116 |            |
            |
    |   2 |   TABLE ACCESS BY INDEX ROWID| DEMO     |     1 |   116 |   431   (1)| 0
    0:00:06 |
    |*  3 |    INDEX FULL SCAN           | DEMO_IDX |     1 |       |   430   (1)| 0
    0:00:06 |
    Predicate Information (identified by operation id):
       3 - filter("COL2"="COL1" AND "COL3"="COL1" AND "COL4"="COL1" AND
                  "COL1"<=50000 AND "COL2"<=50000 AND "COL3"<=50000 AND "COL4"<=5000
    0 AND
                  "COL1">=1 AND "COL2">=1 AND "COL3">=1 AND "COL4">=1)
    Statistics
              1  recursive calls
              0  db block gets
          50426  consistent gets
            428  physical reads
              0  redo size
            422  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              1  rows processedNow I modify multiblock_read_count and full scan cost is going up although anyway Oracle by default chooses full scan instead of index access.
    SQL> alter session set db_file_multiblock_read_count = 8;
    Session altered.
    SQL> select count(distinct col5)
      2   from demo
      3   where col1 between 1 and 50000
      4   and col2=col1
      5   and col3=col1
      6   and col4=col1
      7  /
    COUNT(DISTINCTCOL5)
                      1
    Execution Plan
    Plan hash value: 2072716547
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |      |     1 |   116 |   463   (1)| 00:00:06 |
    |   1 |  SORT GROUP BY     |      |     1 |   116 |            |          |
    |*  2 |   TABLE ACCESS FULL| DEMO |     1 |   116 |   463   (1)| 00:00:06 |
    Predicate Information (identified by operation id):
       2 - filter("COL2"="COL1" AND "COL3"="COL1" AND "COL4"="COL1" AND
                  "COL1"<=50000 AND "COL2"<=50000 AND "COL3"<=50000 AND "COL4"<=5000
    0 AND
                  "COL1">=1 AND "COL2">=1 AND "COL3">=1 AND "COL4">=1)
    Statistics
              1  recursive calls
              0  db block gets
           1697  consistent gets
            850  physical reads
              0  redo size
            422  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> select /*+ index(demo demo_idx)*/ count(distinct col5)
      2   from demo
      3   where col1 between 1 and 50000
      4   and col2=col1
      5   and col3=col1
      6   and col4=col1
      7  /
    COUNT(DISTINCTCOL5)
                      1
    Execution Plan
    Plan hash value: 189561699
    | Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| T
    ime     |
    |   0 | SELECT STATEMENT             |          |     1 |   116 |   431   (1)| 0
    0:00:06 |
    |   1 |  SORT GROUP BY               |          |     1 |   116 |            |
            |
    |   2 |   TABLE ACCESS BY INDEX ROWID| DEMO     |     1 |   116 |   431   (1)| 0
    0:00:06 |
    |*  3 |    INDEX FULL SCAN           | DEMO_IDX |     1 |       |   430   (1)| 0
    0:00:06 |
    Predicate Information (identified by operation id):
       3 - filter("COL2"="COL1" AND "COL3"="COL1" AND "COL4"="COL1" AND
                  "COL1"<=50000 AND "COL2"<=50000 AND "COL3"<=50000 AND "COL4"<=5000
    0 AND
                  "COL1">=1 AND "COL2">=1 AND "COL3">=1 AND "COL4">=1)
    Statistics
              1  recursive calls
              0  db block gets
          50426  consistent gets
              0  physical reads
              0  redo size
            422  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              1  rows processedSo I don't know what is the default value of dbfmbrc in XE and not gone too deep to understand how for example system statistics may change your situation.
    Gints Plivna
    http://www.gplivna.eu
    P.S. BTW I used Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
    Message was edited by:
    gintsp
    listened to Williams suggestion :)

  • Is there a routine one can use to shift the column of data by one each time the loop index increments? In other words, increment the columns that the data is being saved by using the index?

    The device, an Ocean Optics spectrometer in columns of about 9000 cells.I'm saving this as a lvm file using the "write to measurement file.vi". But it doesn't give me the flexibility as far as I can tell.
    I need to move the column by the index of the for loop, so that when i = n, the data will take up the n+1 column. (the 1st column is used for wavelength). How do I use the "write to spreadsheet file.vi" to do this? Also, if I use the "write to spreadsheet file.vi", is there a way one can increment the file name, so that the data isn't written over. I like what "write to measurement file.vi" does.
    I'd really appreciate any help someone can give me. I'm a novice at this, so the greater the detail, the better. Thanks!!!

    You cannot write one column at a time to a spreadsheet file, because a file is arranged linearly and adding a column would need to move (=read and rewwrite elsewhere) almost all existing elements to interlace the new data. You can only append new rows without having to touch the already written data.
    Fields typically don't have fixed width. An exception would be binary files that are pre-allocated at the final size. In this case you can write columns by setting the file positions for each element. It still will be very inefficient.
    What you could do is append rows until all data is written, the read, transpose, and write back the final file.
    What you also could to is build the final array in a shift register and write the entire things to file at once after all data is present.
    LabVIEW Champion . Do more with less code and in less time .

  • Difference between open loop and closed loop mode when finding the index on a stepper motor axis.

    I have a test system which uses a PXI-7352 motion controller with a MID-7602 stepper motor drive to position a 200 step/revolution stepper motor with an attached 1000 line encoder.  The MID-7602 is configured for 64 microsteps per step, giving 12,800 microsteps and 4000 encoder counts per revolution.  The system is controlled using LabView 7.1 and NI-Motion 6.13.  To home the motor, I've defined a sequence in MAX which first finds the reverse limit switch and then moves forward to the encoder index pulse.
    When finding its reference in open loop mode, the system its reference at the same microstep each time.  When findings its reference in closed loop mode, the system finds its reference somewhere within about a 20 microstep wide range.
    I hope somebody out there with more experience with this controller can describe the difference between finding the encoder index in open loop mode and finding the encoder index in closed loop mode. 
    Thanks,
    Mark Moss

    Hello Mark,
    I suspect that the behavior you are experiencing has today
    with the resolution difference between your encoder and your
    microstepping.  Let me illustrate with an
    example:
    Example Setup
    Stepper
    Motor
    NI
    Motion Controller
    10
    steps per encoder pulse (Every 10 steps the controller gets an encoder
    pulse, therefore positions 0-9 all appear to be 0 to the controller)
    The
    system has a maximum of 3 pull in moves set
    Open Loop Scenario
    The
    system is commanded to go to position 9.
    The
    controller sends out 9 pulses.
    The
    motor moves to position 9.
    Closed Loop Scenario
    The
    system is commanded to go to position 9.
    The
    controller sends out 9 pulses.
    The
    motor moves to position 9.
    The
    controller checks its position and sees that it is still at position 0
    because it has not received an encoder pulse.
    Because
    the controller thinks it is still at position 0, it sends another 9 pulses
    as its first pull in move.
    The
    motor moves to position 18.
    The
    controller checks its position and sees that it is at position 10 because
    it has only received one encoder pulse.
    Because
    the controller thinks it is still at position 10, it sends1 reverse pulse
    as its second pull in move.
    The
    motor moves to position 17.
    The
    controller checks its position and sees that it is at position 10 because
    it has only received one encoder pulse.
    Because
    the controller thinks it is still at position 10, it sends and additional
    single reverse pulse as its third pull in move.
    The
    motor moves to its final position of 16.
    I believe something similar is happening with your
    application as it looks for the index pulse. 
    Because the controller does not compensate for what it perceives as
    position error in open loop mode, the motor always goes to the same commanded
    position.  In closed loop mode, the motor
    is bouncing around inside the single index encoder pulse trying to find a
    certain position.
    There are several recommendations I can make towards
    correcting this behavior.  These
    recommendations are in order of effectiveness:
    Setup
    your system so that there are more encoder counts per revolution than
    steps per revolution.
    Turn
    off pull-in moves by setting them to 0 in MAX.
    Use an
    open loop configuration.
    Play
    around with the pull in window in MAX.
    Regards,
    Luke H

  • What is the difference between the drop and create the index and rebuild index ?

    Hi All,
    what is the difference between drop and create index & rebuild index ? i think both are same...Please clarify if both are same or any difference...
    Thanks in Advance,
    rup

    Both are same. Rebuilding an index drops and re-creates the index. 
    Ref:
    SSMS - https://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx
    TSQL - https://msdn.microsoft.com/en-us/library/ms188388.aspx
    I would suggest you to also refer one of the best index maintenance script as below:
    https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html

  • On the browser's last page of website, cannot engage the index ...

    I have 3 other websites using the same format of the INDEX displayed on top of each webpage. The current one I have constructed was all right until I added 2 more pages [total of 27 pages; another site has 38 pages with no problems engaging the Index when on the last page].
    Upon checking the 'publish site' on the server [Safari] before uploading, when I was on the last page, I could not engage other pages on the Index. I noted this occurring on a friend's computer [MacBook using Safari] — after the website had been uploaded — thinking it their problem. However, when the same inaccessiblity to engage the Index occurred on my browser, I am concerned. It means I have to use the 'Back' command to re-engage the Index.
    Is this specific to this new published website as 'server' related, or is it an iWeb glitch?
    Rather strange when I have not encountered the problem on my other published websites until I was at my friend's computer's Safari browser [Snow Leopard] and today on my own Safari browser [Lion] for this new website.
    HELP!    

    there are a couple of items overlapping the navigation and, I am not sure what they are. But, all the links are there:
    WELCOME! MINISTERIAL CALL LOCATION-MAPS-PASTORAL CHARGE MINISTER'S PAGE CELEBRATING OUR CHRISTIAN HERITAGE OUR SACRAMENTS BALDERSON'S MAIN PAGE GROUPS AT BALDERSON FRIENDSHIP CLUB-BALDERSON FUND-RAISING EVENTS-BALDERSON SUNDAY SCHOOL-BALDERSON ST. ANDREW'S MAIN PAGE GROUPS AT ST. ANDREW'S CARES GROUP-ST. ANDREW'S SUNDAY SCHOOL-ST.ANDREW'S PASTORAL CHARGE YOUTH GROUP UPCOMING PASTORAL/COMMUNITY EVENTS COMMUNITY OUTREACH-PASTORAL CHARGE FOOD PANTRY & THRIFT SHOP MEN OF THE CLYDE GOOD SAMARITAN FOODGRAINS PROJECT INSPIRATIONAL THOUGHTS SCRIPTURES-HYMNS OF PRAISE DALAI LAMA INSPIRATIONAL THOUGHTS PRAYERFUL CONSIDERATIONS ACKNOWLEDGEMENTS
    If you cannot find what is over lapping your navigation you may want to duplicate one of your other pages & add the information for your "Acknowledgements" Page

  • How to update a large (over 4 million item) List(Of Byte) quickly by altering indexes contained in a Dictionary(Of Integer, Byte) where the Dictionaries keys are the indexes in the List(Of Byte) that need to be changed to the values for those indexes?

       I'm having some difficulty with transferring images from a UDP Client to a UDP Server. The issue is receiving the bytes necessary to update an original image sent from the Client to the Server and updating the Servers List(Of Byte) with the
    new bytes replacing bytes in that list. This is a simplex connection where the Sever receives and the Client sends to utilize the least amount of bandwidth for a "Remote Desktop" style application where the Server side needs image updates of whatever
    occurs on the Client desktop.
       So far I can tranfer images with no issue. The images can be be any image type (.Bmp, .Gif, .JPeg, .Png, etc). I was working with sending .JPeg's as they appear to be the smallest size image when a Bitmap is saved to a memory stream as type
    .JPeg. And then I am using GZip to compress that byte array again so it is much smaller. However on a loopback on my NIC the speed for sending a full size screen capture is not very fast as the Server updates fairly slowly unless the Clients screen capture
    Bitmap is reduced in size to about 1/3'd of the original size. Then about 12000 bytes or less are sent for each update.
       Due to .JPeg compression I suppose there is no way to get the difference in bytes between two .JPegs and only send those when something occurs on the desktop that alters the desktop screen capture image. Therefore I went to using .Bmp's as each
    .Bmp contains the same number of bytes in its array regardless of the image alterations on the desktop. So I suppose the difference in bytes from a second screen capture and an inital screen capture are what is different in the second image from the initial
    image.
       What I have done so far is save an initial Bitmap of a screen capture using a memory stream and saving as type .Bmp which takes less than 93 milliseconds for 4196406 bytes. Compressing that takes less than 118 milliseconds to 197325 bytes for
    the current windows on the desktop. When that is done PictureBox1 is updated from nothing to the captured image as the PictureBox's background image with image layout zoom and the PictureBox sized at 1/2 my screens width and 1/2 my screens height.
       Then I save a new Bitmap the same way which now contains different image information as the PictureBox is now displaying an image so its back color is no longer displayed (solid color Aqua) and the cursor has moved to a different location. The
    second Bitmap is also 4196406 in bytes and compressed it was 315473 bytes in size.
       I also just found code from this link Converting a Bitmap to a Byte Array (and Byte Array to Bitmap) which gets a byte array
    directly from a Bitmap and the size of that is 3148800 for whatever is full screen captured on my laptop. So I should be able to work with smaller byte arrays at some point.
       The issue I'm having is that once the Client sends an image of the desktop to the Server I only want to update the server with any differences occuring on the Clients desktop. So what I have done is compare the first screen captures bytes (stored
    in a List(Of Byte)) to the second screen captures bytes (stored in a List(Of Byte)) by using a For/Next for 0 to 4196405 where if a byte in the first screen captures List is not equal to a byte in the second screen captures List I add the index and byte of
    the second screen captures list to a Dictionary(Of Integer, Byte). The Dictionary then only contains the indexes and bytes that are different between the first screen capture and second screen capture. This takes about 125 milliseconds which I think is pretty
    fast for 4196406 byte comparison using a For/Next and adding all the different bytes and indexes for each byte to a Dictionary.
        The difference in Bytes between the inital screen capture and the second screen capture is 242587 as an example which changes of course. For that amount of bytes the Dictionary contains 242587 integers as indexes and 242587 bytes as different
    bytes totaling 485174 bytes for both arrays (keys, values).  Compressed the indexes go from 242587 to 43489 bytes and the values go from 242587 to 34982 bytes. Which means I will have to send 78, 481 bytes from the Client to the Server to update the display
    on the server. Quite smaller than the original 4196406 bytes of the second Bitmap saved to type .Bmp or the compressed size of that array which was 315473 bytes. Plus a few bytes I add as overhead so the server knows when an image array ends and how many packets
    were sent for the array so it can discard complete arrays if necessary since UDP is lossfull although probably not so much in current networks like it may originally have been when the internet started.
        In reality the data from the Client to the Server will mostly be the cursor as it moves and updating the Server image with only a few hundred bytes I would imagine at a time. Or when the cursor selects a Button for example and the Buttons
    color changes causing those differences in the original screen capture.
       But the problem is if I send the Dictionaries Indexes and Bytes to the Server then I need to update the original Bitmap List(Of Byte) on the server by removing the Bytes in the received informations Index locations array from the Servers Bitmap
    List(Of Byte) and replacing those Bytes with the Bytes in the received informations Byte array. This takes so long using a For/Next for however many indexes are in the received informations Index array to update the Bitmap List(Of Byte) on the server using
    "Bmp1Bytes.RemoveAt(Index As Integer)" followed by "Bmp1Bytes.Insert(Index As Integer, Item As Byte)" in the For/Next.
        I've tried various For/Next statements including using a new List(Of Byte) with If statements so If the the integer for the For/Next ='s the Key in a Dictionary(Of Integer, Byte) using a Counter to provide the Dictionaries Key value then
    the Dictionaries byte value will be added to the List(Of Byte) and the counter will increas by one Else the List(Of Byte) adds the original "Bmp1Bytes" byte at that index to the new List(Of Byte). This takes forever also.
       I also tried the same For/Next adding to a new Dictionary(Of Integer, Byte) but that takes forever too.
       I think I could use RemoveRange and AddRange to speed things up. But I don't know how to retrieve a contiguous range of indexes in the received indexes that need to be updated in the servers "Bmp1Bytes" List(Of Byte) from the received
    array of indexes and bytes which are in a Dictionary(Of Integer, Byte).  But I believe this would even be slower than some realistic method for replacing all Bytes in a List(Of Byte) when I have the indexes that need to be replaced and the bytes to replace
    them with.
       Even if I just used AddRange on a new List(Of Byte) to add ranges of bytes from the original "Bmp1Bytes" and the changes from the Dictionary(Of Integer, Byte) I think this would be rather slow. Although I don't know how to do that
    by getting contiguous ranges of indexes from the Dictionaries keys.
       So I was wondering if there is some method perhaps using Linq or IEnumerable which I've been unable to figure anything out which could do this.
       I do have some copy and pasted code which I don't understand how it works that I am using which I would guess could be altered for doing something like this but I can't find information that provides how the code works.  Or even if I did
    maybe I can't understand it. Like the code below which is extremely fast.
       Dim strArray() As String = Array.ConvertAll(Of Integer, String)(BmpComparisonDict.Keys.ToArray, Function(x) x.ToString())
    La vida loca

    Monkeyboy,
    That was quite a bit to read, but still a bit unclear. Could you put a specific list of goals/questions, asked in the smallest possible form?
    It seems like either you're making a program that monitors activity on your computer, or you're writing some kind of remote pc app.
    When you do get your bytes from using lockbits, keep in mind all the files header info would be lost. I think retaining the header info is worth the extra bytes.
    The other, thing: I'm not sure if you're taking 32bpp screen shots, but also keep in mind that the "whole desktop" is the final destination for blended graphics, if that makes sense. What I mean is that there is no need to capture an "alpha"
    channel for a desktop screenshot, as alpha would always be 255, this could save you 1 byte per pixel captured... Theres nothing "behind" the desktop, therefore no alpha, and every window shown above the desktop is already blended. I suggest using
    24Bpp for a full screen capture.
    Your X,Y information for the mouse could be stored as UINT16, this would save you a measly 2 bytes per location update/save.
    When you update your byte arrays, maybe you can turn the array into a stream and write to whatever index, however many bytes, that should prevent a "Shift" of bytes, and instead overwrite any bytes that "get in the way".
    ex
    Dim example As String = "This is an example."
    Dim insertString As String = "was"
    Dim insertBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(insertString)
    Dim bytes As Byte() = System.Text.Encoding.ASCII.GetBytes(example)
    Dim modifiedBytes As Byte() = {}
    Using ms As New System.IO.MemoryStream(bytes)
    ms.Position = 5
    ms.Write(insertBytes, 0, 3)
    modifiedBytes = ms.ToArray
    End Using
    Dim newString As String = System.Text.Encoding.ASCII.GetString(modifiedBytes)
    'Notice how below there isn't the word "is" anymore, and that there isn't a
    'space.
    'This demonstrates that you overwrite existing data, versus shifting everything to
    'the right.
    'Returns: This wasan example.
    MsgBox(newString)
    “If you want something you've never had, you need to do something you've never done.”
    Don't forget to mark
    helpful posts and answers
    ! Answer an interesting question? Write a
    new article
    about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.
    Well it's too much to read. I was really tired when I wrote it. Even the below is too much to read but perhaps gets the point across of what I would like to do which I think
    Joel Engineer may have answered but I'm not sure. As I'm still too tired to understand that yet and research what he said in order to figure it out yet.
    But maybe the code below can provide the concept of the operation with the comments in it. But seeing as how I'm still tired it may be confused.
    Option Strict On
    Imports System.Windows.Forms
    Imports System.IO
    Imports System.IO.Compression
    Imports System.Drawing.Imaging
    Imports System.Runtime.InteropServices
    Public Class Form1
    Dim Bmp1Bytes As New List(Of Byte)
    Dim Bmp1BytesCompressed As New List(Of Byte)
    Dim Bmp2Bytes As New List(Of Byte)
    Dim BmpComparisonDict As New Dictionary(Of Integer, Byte)
    Dim BmpDifferenceIndexesCompressed As New List(Of Byte)
    Dim BmpDifferenceBytesCompressed As New List(Of Byte)
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    SomeSub()
    End Sub
    Private Sub SomeSub()
    ' Pretend this code is in UDP Client app. A screen capture is performed of the desktop. Takes about 90 milliseconds.
    Bmp1Bytes.Clear()
    Using BMP1 As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
    Using g1 As Graphics = Graphics.FromImage(BMP1)
    g1.CopyFromScreen(0, 0, 0, 0, BMP1.Size)
    Cursor.Draw(g1, New Rectangle(Cursor.Position.X, Cursor.Position.Y, Cursor.Size.Width, Cursor.Size.Height))
    Using MS As New MemoryStream
    BMP1.Save(MS, System.Drawing.Imaging.ImageFormat.Bmp)
    Bmp1Bytes.AddRange(MS.ToArray)
    End Using
    End Using
    End Using
    Bmp1BytesCompressed.AddRange(Compress(Bmp1Bytes.ToArray))
    ' UDP Client app sends Bmp1BytesCompressed.ToArray to UDP Server which is the entire image of the desktop that the UDP
    ' Client is on. This image takes awhile to send since compressed it is about 177000 bytes from over 4000000 bytes.
    ' I will be using different code just to get the bytes from the actual Bitmap in the future. That is not important for now.
    ' Pretend the UDP Server has received the bytes, decompressed the array received into a List(Of Byte) and is displaying
    ' the image of the UDP Clients desktop in a PictureBox.
    ' Now the image on the UDP Clients desktop changes due to the mouse cursor moving as an example. Therefore a new Bitmap
    ' is created from a screen capture. This takes about 90 milliseconds.
    Bmp2Bytes.Clear()
    Using BMP2 As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
    Using g1 As Graphics = Graphics.FromImage(BMP2)
    g1.CopyFromScreen(0, 0, 0, 0, BMP2.Size)
    Cursor.Draw(g1, New Rectangle(Cursor.Position.X, Cursor.Position.Y, Cursor.Size.Width, Cursor.Size.Height))
    Using MS As New MemoryStream
    BMP2.Save(MS, System.Drawing.Imaging.ImageFormat.Bmp)
    Bmp2Bytes.AddRange(MS.ToArray)
    End Using
    End Using
    End Using
    ' Now I have the original images bytes in Bmp1Bytes and the new images bytes in Bmp2Bytes on the UDP Client. But I don't
    ' want to send all of the bytes in Bmp2Bytes to the UDP Server. Just the indexes of and the bytes that are different in
    ' Bmp2Bytes from Bmp1Bytes.
    ' This takes less than 100 milliseconds for what I've tested so far where over 500000 bytes in Bmp2Bytes are different
    ' than the bytes in Bmp1Bytes. Usually that amount would be much less. But during testing I was displaying the image
    ' from Bmp1 bytes in a PictureBox so a large amount of data would change between the first screen shot, the PictureBox
    ' then displaying an image on the same PC and then the second screen shot.
    BmpComparisonDict.Clear()
    For i = 0 To Bmp1Bytes.Count - 1
    If Bmp1Bytes(i) <> Bmp2Bytes(i) Then
    BmpComparisonDict.Add(i, Bmp2Bytes(i))
    End If
    Next
    ' So now I have all the difference bytes and their indexes from Bmp2Bytes in the BmpComparisonDict. So I compress
    ' the indexes into on List and the Bytes into another List.
    BmpDifferenceIndexesCompressed.Clear()
    BmpDifferenceBytesCompressed.Clear()
    BmpDifferenceIndexesCompressed.AddRange(Compress(BmpComparisonDict.Keys.SelectMany(Function(d) BitConverter.GetBytes(d)).ToArray()))
    BmpDifferenceBytesCompressed.AddRange(Compress(BmpComparisonDict.Values.ToArray))
    ' Now pretend the UDP Client has sent both those arrays to the UDP Server which has added both decompressed arrays
    ' to a Dictionary(Of Integer, Byte). And the server has the original image decompressed bytes received in a List
    ' called Bmp1Bytes also.
    ' This is where I am stuck. The UDP Server has the Dictionary. That part was fast. However there is no
    ' fast method I have found for creating a new List(Of Byte) where bytes in the originally received List(Of Byte) that
    ' do not have to be altered are placed into a new List(Of Byte) except for the indexes listed in the
    ' Dictionary(Of Integer, Byte) that need to be placed into the appropriate index locations of the new List(Of Byte).
    ' The below example for doing so is exceptionally slow. Pretend UpdateDictionary has all of the decompressed indexes
    ' and bytes received by the UDP Server for the update contained within it.
    Dim UpdateDictionary As New Dictionary(Of Integer, Byte)
    Dim UpdatedBytes As New List(Of Byte)
    Dim Counter As Integer = 0
    For i = 0 To Bmp1Bytes.Count - 1
    If i = UpdateDictionary.Keys(Counter) Then ' Provides the index contained in the Keys for the Dictionary
    UpdatedBytes.Add(UpdateDictionary.Values(Counter))
    Counter += 1
    If Counter > UpdateDictionary.Count - 1 Then Counter = 0
    Else
    UpdatedBytes.Add(Bmp1Bytes(i))
    End If
    Next
    ' So what I'm trying to do is find an extremely fast method for performing something similar to what the
    ' above operation performs.
    End Sub
    Private Function Compress(BytesToCompress() As Byte) As List(Of Byte)
    Dim BytesCompressed As New List(Of Byte)
    Using compressedStream = New MemoryStream()
    Using zipStream = New GZipStream(compressedStream, CompressionMode.Compress)
    zipStream.Write(BytesToCompress, 0, BytesToCompress.Count)
    zipStream.Close()
    BytesCompressed.AddRange(compressedStream.ToArray)
    End Using
    End Using
    Return BytesCompressed
    End Function
    Private Function Decompress(BytesToDecompress() As Byte) As List(Of Byte)
    Dim BytesDecompressed As New List(Of Byte)
    Using DecompressedStream = New MemoryStream()
    Using zipStream = New GZipStream(DecompressedStream, CompressionMode.Decompress)
    zipStream.Write(BytesToDecompress, 0, BytesToDecompress.Count)
    zipStream.Close()
    BytesDecompressed.AddRange(DecompressedStream.ToArray)
    End Using
    End Using
    Return BytesDecompressed
    End Function
    End Class
    La vida loca

Maybe you are looking for

  • Getting error in my application while starting the server.

    while start my tomcat server i am getting the error like this 2010-02-02 11:39:26 StandardContext[HRM]Initializing Spring FrameworkServlet 'recruiting' 2010-02-02 11:39:26 StandardContext[HRM]StandardWrapper.Throwable org.springframework.beans.factor

  • Text is selected one or two lines away from where cursor is located

    I'm viewing a PDF in Adobe Digital Editions 4.0, and when I try to select text, it actually selects text 1-2 lines off from where the cursor (I-bar) is located.  This makes highlighting text extremely difficult.  The PDF was created in Acrobat from a

  • FastTrack on NT 4.0 workstation?

    Student looking for Web Server for class work. Will FastTrack run on a NT workstation, or does it require a server? Thanks in advance.

  • My store does not support services in my country(Iraq)

    Stor does not support services in my country (Iraq),so how can I download products,movies or music? Can I choose another country close to me supoports this.

  • Is there any rule for the JAVA_HOME variable?

    Is there any rule or guideline about the JAVA_HOME variable regarding what should be its contents and how java applications should treat it? Or does it only depend on the particular application? If there is such rule, could you give me a URL? Thanks