Unexpected results of rsync

I am trying to use rsync to back up by using this command:

rsync - vaE - courses - delete rsource/destination/source

My goal is to have the destination to be an exact copy of the source. I updated to 3.1.2 rsync (using the homebrew) on my iMac running 10.11.6.

My problem: I use Finder to copy initially rsource/destination/source. To help read the information, I see the size and the number of elements in the source and destination is the exact matches. Then I run the command rsync above to ensure that the destination is an exact match of the source, but he rewrote several files (parts resources incl., DS_Store files, etc.) before completing successfully. But if I do another read the information on the source and destination the size and the number of items is no longer the game.

Another curiosity: if I run rsync twice in a row, the second round is still writing/rewriting files. Why is this? Shouldn't the first round have exactly synchronized directories?

Destination should be not an exact copy of the source after a series of rsync, with the same size and the number of items, etc.? Rsync does not exactly match the source, including resources, hidden files, etc. ranges destination. ? I'm inexperienced at the Terminal and would appreciate any help and advice.

Is not the answer I was looking for, but it's the best answer to the question how to use rsync to backup folders/files. After a lot of research and testing, I finally renounced do rsync, it is beyond my limited capacity and I couldn't do what I wanted. Fortunately, I found a very good, not expensive GUI for rsync on the App Store: SyncBuddy. Very easy to use, very accurate and Yes, rsync, as shown in the activity monitor.

Tags: Mac OS & System Software

Similar Questions

  • Unexpected results after calculation

    Hello.

    I have 3 databases of production which have worked successfully until Thursday.

    FARM sales for the whole company per month.

    EB2. Sale of a specific division a week.

    EB3. Sale of a specific division and top ranges, per day.

    Thursday.

    The problem is that after calculation of EB3, the totals I see in the validation reports are incorrect when compared with the totals in the EB1.

    The whole story is the display of incorrect results, not only the data for the current month, which is that I charge per day.  I'm doing an incremental loading of the current and previous month only.

    I took a backup and loaded in the EB3 and performed the calculation... once again the totals were incorrect.

    Friday

    When I compare the validation reports, totals in EB3 were as expected when checking against the EB1.

    I did nothing for the outline, the backup is the same.

    EB1 and EB2 were ok.

    Saturday (today)

    When I see the validation report today I noticed that EB3 has the same behavior; incorrect results.

    And EB2 also contains unexpected values after calculation.

    Have you encountered this problem before?  Is there something specific I should review to determine and solve this problem?

    Log files reflect not any message "error" or "fail".

    Any comment is welcome.

    Kind regards

    JC

    Difficult to clarify the question without knowing what actually do the calculations. Just a suggesiton wild as you see error every day replacing when you see good results just make a backup of contour and then use the problematic day contour compare to compare 2 contours. May be there are some jobs that you are not aware of the evolution of the sketch, thus destabilizing the whole of the data!

  • VLOOKUP gives incorrect/unexpected results

    HI guys

    I used to think I had this spreadsheet thing down pat, but I find myself place after midnight with a VLOOKUP problem struggle! I really hope that you can show me the error of my ways...

    I'm a convert from Excel so I can be taken in a mind control thing. I built a fairly large things relating of worksheet to do a lot of hobbies. I give it to the people who do the same kind of thing I do. It calculates the SOAP making tips, but I just found out that he gets things wrong - that is potentially dangerous.

    I have a version simplified that what is happening in the picture above. In the F2 cell I: VLOOKUP (E2, values: results, 2, the search by proximity-match).

    Now, I expect the numbers look down column B to find the value in cell E2 (1.90) and return the corresponding value of the C column (19.0). However, it does not. Instead, it provides the value of the cell above as if it could not find a match.

    I tried every setting I can think of nothing doesn't. I put all the cells in the table above to a number to 2 decimal places. I even changed the exact match and close match but that just made things worse.

    I know it's going to be something that will make me to get started me, but I need to fix no will not hurt. Any help gratefully received.

    Cheers, Grant

    PS I think I should mention that I do this on an iPad 2 air which is a bit new for me. And I just noticed I have write in figures for Mac. I'm sorry for that but I think that the versions are supposed to have the same capabilities?

    I suspect that you use calculated values, rather than hand is entered in your "Search values" column, and even if you have formatted the column to display two decimal places, due to approximations that occur when doing calculations decimal on a computer using binary mathematics, the actual values using the VLOOKUP function differ slightly as many additional decimals on any line. If you wrap each calculation in a function to change the actual value with 2 decimal places, if the cell contains exactly what your put poster in the form, you will get the desired result.

  • DAQmxReadAnalogF64 gives unexpected results with 9239 of Ni - DAQmx

    Hi all

    I use a NI 9239 with a laser sensor, and I would like to acquire some pressure readings of the probe which measures the height. It works very well with Ni Max, but not in C + c++ / MFC app I am developing. I get something that looks like amplidied noise:
    1 reading scale doesn't seem fair (pressure readings I get from range - 2E9 to 2E9)
    2 changes in what the sensor is supposed to measure does not appear in my measurements at all, there is nothing other than the noise (as if I were acquires bad chain - this I double checked)
    I would like to get the same result as in Ni Max, but may not know what wrong with my code (below).

    Thanks for your help,

    Ben

    DAQmx Configure Code
    DAQmxErrChk (DAQmxCreateTask ("LaserReading", & taskHandle));
    DAQmxErrChk (DAQmxCreateAIVoltageChan(taskHandle,"cDAQ1Mod1/ai0","",DAQmx_Val_Diff,-10,10,DAQmx_Val_Volts,));
    DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,,10000,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,5000));

    Starting code DAQmx
    DAQmxErrChk (DAQmxStartTask (taskHandle));

    Reading DAQmx code
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,NUM,-1,DAQmx_Val_GroupByChannel,data,5000,&read,));

    TRACE sends the readings to the debug output

    TRACE ('%d points\n acquis', read);
    for (i = 0; i<5000;>
    {
    TRACE("%d\n",data[i]);
    }

    DAQmxStopTask (taskHandle);
    DAQmxClearTask (taskHandle);

    Found the answer to this problem, the problem was in the function TRACE which data acquired to the debugger output. %D %f for the float to TRACE("%f\n",data[i values changed]) - things are great now.

    Thank you

    Ben

  • Multiplying by output of small polynomial coefficients on vi trendline and get unexpected results

    I'd appreciate it if someone could shine any light on this problem for me.

    I'm performing a polynomial regression with the VI express Curve Fitting.  The express VI itself works very well.  I used the polynomials it generates for the graph of a function in Excel and it looks perfect.

    When I convert the signal to an array and then multiply by other values things start to go south.

    The results of multiplications are wrong when some 'x' values are used.  The strange thing for me, is that it does not work for all values of x.

    Not sure if this is useful, but the expected values for x 0 through x 5 (bottom right, below) are:

    x 0:-1,14

    x 1: 16.11

    x 2:6-3-19

    x 3:-3.39E - 4

    x 4: 6.76E - 7

    X 5:-2.08e - 7

    and the values displayed when the routine is running:

    x 0:-1,14

    x 1: 16.11

    x 2: 25.57

    x 3:-925.06

    x 4: 104.25

    x 5:-2017.87

    Any ideas?  I think a data type must be changed since the expected values are very small and the problem is only present for certain values of x.

    If this is the case I don't know how to change the data type.  The table contains double the conversion of the shape of the signal.

    Thanks for any help,

    Dave

    Hi TCPlomp,

    I just realized that I had x and is reversed in my entries "power x" function.

    Thanks for letting me know about polynomial screws.  Add those who should be more pleasant than to try to clean it.

    Kind regards

    Dave

  • Round off to infinity gives an unexpected result in my VI-

    In the file attached, the resultant expected after round to-Infinity is 10, but what gives LabVIEW is 9.  Anyone know why?

    I divided by 0,166 10 1.66 and rounding to-infinity must give 10.  But LabVIEW give 9.

    In the digital representation of rounding error is the problem. The thing to remember is this decimal floating representations are approximations, while the real result of the calculation is 10, you can't really represent 10 exactly as a floating point number. While the indicator can say 10, internal representation of the answer is something like 9.999999999999999 - which is very, very close to 10, but when you go to turn it still gets rounded down.

    This isn't a problem with LV, it is inherent in the floating point representations.

    Mike...

  • Unexpected result when saving image of façade in EXE

    Below the code is used to save a picture of the façade of a VI. The façade has a XY Chart with two plots.

    It works perfectly in the development environment. With the exe, the plots of the graph (only the plots) are invisible.

    Have you ever watched this unexpected behavior? Thanks a lot for any advice.

    JB wrote:

    Problem solved.

    It was a mistake "too stupid to be mentioned here" of mine. Things that can happen at the end of a day (too) long.

    If anyone knows how to avoid grey areas on the right and bottom of the image, I am always interested.

    It appears only when the 'visible zone?' option is set to TRUE.

    I didn't try, but I suggest that you try to define horizontal and vertical scrollbars to always off.

    Ben64

  • Problem with pantone and 'effect of mix' gives 'of unexpected results.

    Hey!

    This is the case:
    Im working on one design racing car and I need a pantone mix to match a graphic film 3 m.
    I have a graphic film that will apply to the front of the car. This film of 3 m spesific equality / match pantone 165 C.
    The other half of the car is supposed to have a printed film applied. on this impression, I have a mix (complex, cannot be used in this case degraded form) from a dark place
    CMYK color and ending in Pantone 165 C. The result of the printing is not as I want it to be. Smooth smoothing on the screen has turned into something and is not quite usable.

    My question is that is can not turn the spot pantone to process, because then I will not have control over the outcome of the printer. The people of said production if they print in CMYK the result will not be 165 C.
    I need the Pantone to be printed in Pantone 165C to match the packaging film.

    I did some testprints and it seems to be an issue between illustrator and printer.

    Is it possible to solve this problem and still have total control of color?

    Greatfull for any help in this matter!

    Too everyone. Thanks for all the good advice and to comment on it.
    The solution for me was simply to send the file to the production elsewhere.

    They have the newest equipment/digital printer, there is.

    Probably not very satisfactory for the geek inside you, but he saved for sure to spend more time on
    This. Thanks again!

  • Oracle 12 c - unexpected result with the insertion of the DBA_VIEWS view

    Hello

    I try inserting the DBA_VIEWS fields in a table belonging to a common C a PDB file ##SA user:

    (a) the PDB PDBORCL using user C ##SA connection:

    SQL * more: Production of liberation 12.1.0.1.0 kills him Sep 10 16:21:39 2013

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.

    Enter the password:

    Last successful login time: kills Sep 10-2013 16:18:26 + 02:00

    Connected to:

    Database Oracle 12 c Enterprise Edition Release 12.1.0.1.0 - 64 bit Production

    With the options of partitioning, OLAP, advanced analytics and Real Application Testing

    C##SA@pdborcl 10.09.2013 > see the con_name

    CON_NAME

    ------------------------------

    PDBORCL

    C##SA@pdborcl 10.09.2013 > see the con_id

    CON_ID

    ------------------------------

    3

    (b) I create the table user SA_VIEWS_V

    C##SA@pdborcl 10.09.2013 > select count (*) in the dba_views;

    COUNT (*)

    ----------

    6220

    1 selected line.

    C##SA@pdborcl 10.09.2013 > create table sa_views_v (owner varchar2 (128), view_name varchar2 (128));

    Table created.

    (c) the insertion in the table SA_VIEWS_V gave me only 65 rows at the same time lines of content 6220 dba_views:

    C##SA@pdborcl 10.09.2013 > INSERT INTO SA_VIEWS_V (OWNER, VIEW_NAME) SELECT MASTER, VIEW_NAME DBA_VIEWS;

    65 lines were created.

    C##SA@pdborcl 10.09.2013 > commit;

    Validation complete.

    C##SA@pdborcl 10.09.2013 > SELECT MASTER, VIEW_NAME DBA_VIEWS;

    ...

    IX

    IX

    IX

    SH

    6220 selected lines.

    (d) you will find above the executed plan of the insert and the single select statement:

    C##SA@pdborcl 10.09.2013 > select * from table (dbms_xplan.display_cursor ('aj3vkggtvv9d9'));

    PLAN_TABLE_OUTPUT

    ------------------------------------------------------------------------------------------------------------

    SQL_ID, aj3vkggtvv9d9, number of children 0

    -------------------------------------

    INSERT INTO SA_VIEWS_V (OWNER, VIEW_NAME) SELECT VIEW_NAME, MASTER OF

    DBA_VIEWS

    Hash value of plan: 1585970530

    -----------------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    -----------------------------------------------------------------------------------------------------

    |   0 | INSERT STATEMENT.                  |       |       |   136 (100) |          |

    |   1.  LOAD TABLE CLASSIC |                  |       |       |            |          |

    |*  2 |   FILTER                         |                  |       |       |            |          |

    |*  3 |    HASH JOIN |                  |    65.  6045.   136 (0) | 00:00:01 |

    |*  4 |     HASH JOIN |                  |    65.  4875.   132 (0) | 00:00:01 |

    |   5.      NESTED LOOPS |                  |       |       |            |          |

    |   6.       NESTED LOOPS |                  |    65.  3315 |   131 (0) | 00:00:01 |

    |   7.        INDEX SCAN FULL | I_VIEW1 |    65.   325.     1 (0) | 00:00:01 |

    |*  8 |        INDEX RANGE SCAN | I_OBJ1 |     1.       |     1 (0) | 00:00:01 |

    |   9.       TABLE ACCESS BY INDEX ROWID | OBJ$             |     1.    46.     2 (0) | 00:00:01 |

    |  10.      INDEX SCAN FULL | I_USER2 |   131.  3144 |     1 (0) | 00:00:01 |

    |  11.     TABLE ACCESS FULL | USER$ |   131.  2358.     4 (0) | 00:00:01 |

    | * 12 |    TABLE ACCESS FULL | USER_EDITIONING$ |     1.     6.     2 (0) | 00:00:01 |

    |  13.    SEMI NESTED LOOPS.                  |     1.    29.     2 (0) | 00:00:01 |

    | * 14 |     INDEX SKIP SCAN | I_USER2 |     1.    20.     1 (0) | 00:00:01 |

    | * 15 |     INDEX RANGE SCAN | I_OBJ4 |     1.     9.     1 (0) | 00:00:01 |

    | * 16.    TABLE ACCESS FULL | USER_EDITIONING$ |     1.     6.     2 (0) | 00:00:01 |

    -----------------------------------------------------------------------------------------------------

    Information of predicates (identified by the operation identity card):

    ---------------------------------------------------

    2 filter (((IS NULL AND "O". ("TYPE #" <>88) OR BITAND ("O". ("" FLAGS ", 1048576) = 1048576 OR

    BITAND ("U". "" SPARE1»(, 16) = 0 OR (((SYS_CONTEXT ('userenv', 'current_edition_name') = ' ORA$ BASE ", AND)))"

    "U"." TYPE #"(<>2) OR ('U'." ' TYPE # '= 2 AND 'U'. "SPARE2" = TO_NUMBER (SYS_CONTEXT ('userenv ',' current_e)) "

    dition_id'))) or IS NOT NULL) AND IS NOT NULL)))

    3 - access("O".") SPARE3 '=' U '. ("" USER # ")

    4 - access("O".") "OWNER # '=' U '. ("" USER # ")

    8 - access("O".") ' OBJ # '=' V '. (' ' OBJ # ")

    12 filter (("TYPE #" =: B1 ET "UE".)) "THE USER #" =:B2))

    14 - access("U2".") TYPE # "= 2, AND"U2"." SPARE2 "= TO_NUMBER (SYS_CONTEXT ('userenv ',' current_editi))"

    on_id')))

    filter (("U2". "TYPE #"= 2, AND "U2"."" SPARE2 "= TO_NUMBER (SYS_CONTEXT ('userenv ',' current_edit))"

    ion_id')))

    15 - access("O2".") DATAOBJ #"=: B1 AND 'O2'." ' TYPE # '= 88 AND 'O2'. "OWNER #"= "U2". ("" USER # ")

    16 filter ((' EU'. "TYPE #" =: B1 AND 'EU '. "THE USER #" =:B2))

    47 selected lines.

    C##SA@pdborcl 10.09.2013 > select * from table (dbms_xplan.display_cursor ('bc4f1jh1snwdp'));

    PLAN_TABLE_OUTPUT

    -------------------------------------------------------------------------------------------------------

    SQL_ID, bc4f1jh1snwdp, number of children 0

    -------------------------------------

    SELECT THE OWNER, DBA_VIEWS NOM_DE_VUE

    Hash value of plan: 1508506130

    --------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Pstart. Pstop |

    --------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                  |       |       |     1 (100) |       |       |

    |   1.  PARTITION LIST ALL |                  | 10000 |  1289K |     0 (0) |     1.     2.

    |   2.   TABLE FIXED FULL | X$ COMVW$ 5885ef62 | 10000 |  1289K |     0 (0) |       |       |

    --------------------------------------------------------------------------------------------

    14 selected lines.

    You have an idea about this result?

    Thank you in advance,

    Arnaud.

    Arnaud,

    This has a fairly simple explanation.

    In 12cR1, there are common objects, and there are local objects. The definition of a common object is stored in the ROOT, and only a stub for the object is stored in the PDB. The definition of a local object is stored in the PDB.

    When DBA_VIEWS is questioned in a PDB file, so we must return to lines of views both as common as the result of the query. If views Commons are not returned, then several views that a client is used to see in the result of a query DBA_VIEWS to 11.2 and earlier versions not will be seen in paragraph 12.1. For example, ALL_TABLES, DBA_OBJECTS, etc.

    When DBA_VIEWS is questioned in a PDB file, then we extraction of lines for local opinions of PDB and common views of ROOT lines. The first has value ORIGIN_CON_ID equal to the ID of the container of the PDB to which you are connected, and they value ORIGIN_CON_ID equal to the ID of the ROOT container. Given that the recovery of these lines should be done in two different containers, we go through a fixed table X$ COMVW$ *.

    The gap that you are experiencing is because this fixed table based assessment is used only to SELECT and not for etc. SELECT, INSERT AS SELECT, CREATE TABLE AS.

    Let me know if that makes sense.

    Thank you

    Thomas

  • Unexpected results - unique Triple returns 2 results using SEM_MATCH

    Hi, I have a prototype that I build. I start with a very simple triple store that says:
    (<http://ihc.com/drik/concept#clinical_cohort>, <http://www.w3.org/2000/01/rdf-schema#subClassOf>, <http://ihc.com/drik/concept#cohort>)
    I have run the following expected to retrieve a result (URI by cohort), but I'll be back 3 results:
    select
      object
    from 
      table(sem_match('{ <http://ihc.com/drik/concept#clinical_cohort> <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?object . }', 
            sem_models('Prototype'),
            sem_rulebases('RDFS'),
            sem_aliases(sem_alias('rdfs','http://www.w3.org/2000/01/rdf-schema/')),
            null
            ))
    http://ihc.com/drik/concept#cohort
    http://ihc.com/drik/concept#clinical_cohort
    http://www.w3.org/2000/01/rdf-schema#Resource
    Can you help me understand why I get the self-reference? Is clinical_cohort a subclass of itself? It seems counterintuitive to me. I understand the subclass of resource and I'm okay with that.

    Script to reproduce is:
    CREATE TABLE DRIK.RDF_DATA
    (
      ID      NUMBER,
      TRIPLE  MDSYS.SDO_RDF_TRIPLE_S
    )
    COLUMN TRIPLE NOT SUBSTITUTABLE AT ALL LEVELS
    TABLESPACE RDF_USERS
    ;
    
    -- Staging Table
    CREATE TABLE DRIK.RDF_STAGING
    (
      RDF$STC_SUB        VARCHAR2(4000 BYTE)        NOT NULL,
      RDF$STC_PRED      VARCHAR2(4000 BYTE)        NOT NULL,
      RDF$STC_OBJ        VARCHAR2(4000 BYTE)        NOT NULL,
      RDF$STC_SUB_EXT    VARCHAR2(64 BYTE),
      RDF$STC_PRED_EXT  VARCHAR2(64 BYTE),
      RDF$STC_OBJ_EXT    VARCHAR2(64 BYTE),
      RDF$STC_CANON_EXT  VARCHAR2(64 BYTE)
    )
    TABLESPACE RDF_USERS
    ;
    
    begin  SEM_APIS.CREATE_RDF_MODEL('Prototype', 'RDF_DATA', 'TRIPLE', 'RDF_USERS'); end;
    
    grant insert on rdf_data to mdsys;
     
    Insert into DRIK.RDF_STAGING
       (RDF$STC_SUB, RDF$STC_PRED, RDF$STC_OBJ)
     Values
       ('<http://ihc.com/drik/concept#clinical_cohort>', '<http://www.w3.org/2000/01/rdf-schema#subClassOf>', '<http://ihc.com/drik/concept#cohort>');
    COMMIT;
    
    begin SEM_APIS.BULK_LOAD_FROM_STAGING_TABLE('Prototype', 'DRIK', 'RDF_STAGING'); end;
    
    select id, a.triple.GET_TRIPLE() from drik.rdf_data a;
    
    begin SEM_APIS.CREATE_ENTAILMENT('PROTOTYPE_RB_IDX', SEM_Models('Prototype'), SEM_Rulebases('RDFS')); end;

    Hello

    What is expected. Rule RDFS10 in the following W3C SPECIFICATION dictates this behavior.
    http://www.w3.org/TR/rdf-mt/

    If you don't like (or wants to) this rule, then you can turn it off.

    SEM_APIS. CREATE_ENTAILMENT ('PROTOTYPE_RB_IDX',
    SEM_Models ('Prototype'),
    SEM_Rulebases ('RDFS'),
    SEM_APIS. REACH_CLOSURE,
    "RDFS10 -"
    );

    There are a few other rules, you may want to disable (turn off).
    "RDFS12-, RDFS4A-, RDFS4B-, RDFS6-, RDFS8-, RDFS10-, RDFS13 -"

    Thank you

    Zhe Wu

  • Unexpected result in efficieny comparson of Hashtable and ArrarList

    I learned that Hashtable is much more efficient than ArrayList. To convince my self, I did the following:
    (a) create a file of 100000 channels acii range of 65 to 122 3 random letters. Foll. is the code I used.
    import java.util.Random;
    import java. IO;
    Class RandomStrToFile {}
    Public Shared Sub main (String [] args) {}
    Random rnd = new Random();
    long I, imax = 100000;
    cNL tank;
    String sFileName = "myrandom_strings.txt";
    String sBuffer ="";
    try {}
    FileWriter fw = new FileWriter (sFileName);
    BufferedWriter BW = new BufferedWriter (fw);

    for (i = 0; i < imax; i ++) {}
    sBuffer = "" + (char) (65 + (int) ((rnd.nextDouble ()) * 57)) + (char) (65 + (int) ((rnd.nextDouble ()) * 57)) + (char) (65 + (int) ((rnd.nextDouble ()) * 57));
    BW. Write (sbuffer);
    bw.newLine ();
    System.out.println (sbuffer);

    }
    BW. Close();
    FW. Close();
    } catch (IOException e) {}
    }
    }
    b. timed to create a unique valielist of the file above, nuer ArrayList and Hashtable respectively. Here is my code:
    import java. IO;
    Import Java.util;

    public class test2 {}
    Public Shared Sub main (String [] args) {}
    String Slithe.
    int iVal;
    long startTime, endTime;
    < String > ArrayList al = new ArrayList < String > ();
    Hashtable ht = new Hashtable (4999); Use a prime number

    try {}
    ////////////////////////////////////
    FileReader fr = new FileReader("C:\\Home\\MyJava\\eclipse_proj\\MyFirst\\bin\\myrandom_strings.txt");
    BufferedReader br = new BufferedReader (en);

    startTime = System.currentTimeMillis ();
    iVal = 0;
    While ((mean = br.readLine ())! = null) {}
    System.out.println (William);
    iVal iVal = + 1;

    If (! ht.contains (William)) {}
    HT.put(iVal,sLine);
    System.out.println (William);
    }
    }
    endTime = System.currentTimeMillis ();
    System.out.println ("elapsed time in the Hashtable is:" + (endTime-startTime));
    Br. Close();
    Fr. Close();
    /////////////////////////////////////////


    en = new FileReader("C:\\Home\\MyJava\\eclipse_proj\\MyFirst\\bin\\myrandom_strings.txt");
    BR = new BufferedReader (en);

    startTime = System.currentTimeMillis ();
    iVal = 0;
    While ((mean = br.readLine ())! = null) {}
    System.out.println (William);
    iVal iVal = + 1;
    If (! al.contains (William)) {}
    Al. Add (William);
    System.out.println (William);
    }
    }
    endTime = System.currentTimeMillis ();
    System.out.println ("elapsed time of ArrayList is:" + (endTime-startTime));
    Br. Close();
    Fr. Close();
    } catch (IOException e) {}
    }
    }


    To my surprise Hashtable approach has been much slower Quen ArrayList approach. Am I missing something here?

    user10035918 wrote:
    OK, here we go. I can't get rid of the file

    Yes, you can. You're not a file need to compare the performance of the list relative to the map. Since you don't get rid of it, I don't look at your test.

    Here is the result of my test. Card is more than 10 000 times faster than the list here.

    list took 20,828 ms to find 500 items
    map took 16 ms to find 5,000 items
    

    Here's the code.

    package scratch;
    
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.util.HashMap;
    
    public class MapVList {
      static List list = new ArrayList ();
      static Map map = new HashMap ();
    
      public static void main (String[] args) throws Exception {
    
        for (int ix = 0; ix < 1000000; ix++) {
          Thing thing = new Thing("abc" + ix + "xyz");
          list.add(thing);
          map.put(thing.name, thing);
        }
    
        long start;
        long end;
        long elapsed;
        int ix;
    
        start = System.currentTimeMillis ();
    
        for (ix = 0; ix < 500; ix++) {
          String name = "abc" + ix * 1000 + "xyz";
          findInList(name);
        }
        end = System.currentTimeMillis ();
        elapsed = end - start;
        System.out.printf ("list took %,d ms to find %,d items%n", elapsed, ix);
    
        start = System.currentTimeMillis ();
        for (ix = 0; ix < 5000; ix++) {
          String name = "abc" + ix * 100 + "xyz";
          findInMap(name);
        }
        end = System.currentTimeMillis ();
        elapsed = end - start;
        System.out.printf ("map took %,d ms to find %,d items%n", elapsed, ix);
      }
    
      static void findInList (final String name) {
        for (Thing thing : list) {
          if (thing.name.equals(name)) {
            return;
          }
        }
    
        throw new RuntimeException("list did not find " + name);
      }
    
      static void findInMap(final String name) {
        if (map.get(name) == null) {
          throw new RuntimeException("map did not find " + name);
        }
      }
    
      static class Thing {
        String name;
    
        Thing(String name) {
          this.name = name;
        }
      }
    }
    
  • unexpected results

    I don't get the results should I expect with this code: var numPoints:uint = selectedPieces * selectedPieces * selectedPieces;

    What I expect is selectedPieces ^ 3 is what I get (selectedPieces ^ 2) ^ 2

    That is, if selectedPieces = 3, I expect 3 * 3 * 3 = 27; I get (3 * 3)(3*3) = 81 why?

    that would be amazing. create a new fla which demonstrates that issue and post a link to it.

  • Using variables in sql, unexpected results queries coldfusion.

    I came across a somewhat embarrassing problem. I'd be interested to see if the following works for other people:

    < cfset sql_var "'something', 'something'" is >
    < = 'test' datasource cfquery name = "db" >
    Select id from table where unnom (#sql_var #)
    < / cfquery >

    Because it is that which produces a sql error - coldfusion tries to run the query in the form

    Select id from table where unnom in ("something", "thing")

    It is with the double quotes around each of the strings, even if it has not been specified in the sql_var variable.

    So I tried this:

    < cfset sql_var = "something","something else" > ".
    < = 'test' datasource cfquery name = "db" >
    Select id from table where unnom in (' #sql_var # ')
    < / cfquery >

    Where the sql_var variable has that single quotes between the two strings, and I added the quotes to the select statement. It produces no error, but no results either. Running sql is

    Select id from table where unnom ('something', 'something')

    Which is exactly as it should. I copy and paste the exact same query into the database and it produces results - but when coldfusion runs the query it doesn't. Executes the query with without product quotes a sql error, which is what I expect wopuld.

    Which leaves me somewhat at a loss. Anyone got any ideas?

    Running CF 6.1 (I think) using a database MySQL, if that makes a difference to anything.

    It is with the double quotes around each of the strings, even if it has not been specified in the sql_var variable.

    In Coldfusion, 'something' and 'something' are the same thing. You should expect that Coldfusion could pass from one to the other.

    Where the sql_var variable has that single quotes between the two strings, and I added the quotes to the select statement. It produces no error, but no results either. Running sql is
    Select id from table where unnom ('something', 'something')

    I don't think that it is running the query. Before moving on to the string, "something", "something else" to the Coldfusion query will automatically escape the single quotes on either side of the comma. This is the default behavior. The resulting query is

    Select id from table where unnom in (' something "," something else "")

    To avoid these complications, use the PreserveSingleQuotes() function. Therefore,.



    Select id from table where unnom in (#preservesinglequotes (sql_var) #)

  • Shortcuts with single letter keys can produce unexpected results. Why no function keys?

    Sometimes I start typing a reply, or by entering a key word to search without having to pay a lot of attention when the window focus is. If it's on the messaged pane, a few keystrokes can correspond to a single letter shortcuts, mess up the Inbox without noticing this immediately (for example a message archiving). It's very embarrassing.

    Why allow shortcuts without function keys?

    Because old-time pre - GUI users love shortcuts keyboard. They are effective.

    Watch the keyconfig extension if you want to disable or change the keyboard shortcuts.

    http://KB.mozillazine.org/Keyconfig_extension

  • System LabVIEW Web API - unexpected results Service folder

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/6466

    http://www.NI.com/white-paper/11820/en

    The aforementioned white paper explains how I should be able to use the referenced example of API and the "fws/dirlist'"Mapping of URL"to get information on a set of files in a remote directory (in my case on a cRIO).  Using the example of the VI "Directory list" tab, I can actually get this list of files in the specified directory of cRIO. If no option under 'options dirlist' is checked, then the internal POST vi that does the actual work is called with these arguments:

    URL = http://192.168.84.198:3580/AAR/dirlist

    data = Param1 labview = / c / / data / arc_tandh_scissor_lift / & Param2 = XML & Param3 =
    and this is the response that is returned:












    Turn on the "Show details" option causes the POST vi to be called with these arguments:

    http://192.168.84.198:3580/AAR/dirlist

    Param1 = labview / c / / data / arc_tandh_scissor_lift / & Param2 = XML & Param3 =-a

    but the response that is returned unchanged (same as above, no detail!)

    However, turning on the 'sizes show' option causes POST to be called with these arguments:

    http://192.168.84.198:3580/AAR/dirlist

    Param1 = labview / c / / data / arc_tandh_scissor_lift / & Param2 = XML & Param3 = s

    And the returned answer actually contains information about the size of the files:












    This leads to my questions:

    1. In the 'dirlist' '-a ' option broken?
    2. How peux-I, using this API, the dates of creation/editing file for files in remote directory?

    Never mind. I found the problem.  The 'List.vi of the single remote directory"included as part of the example of the API has a small bug in there.

    The '-a ' constant circled below in orange must really be "-a"(il doit exister un espace de fin après le «a»). "" You can see sort from behind the other constants.

    After you add the missing space and re - run the VI, I can get this information from the remote directory:












Maybe you are looking for

  • I want to reverse the display full page

    I turned on to full page display in the screen of my FB and now can't access all the tools to reverse the trend.I also accidentally decreased the font size & need of restoration, but don't know how.

  • Satellite Pro 2100 is hot when you use the knee

    Hello. I have a 2100.I started using it again after using it not for a few months. I noticed when it is sitting on my lap if feels very hot and the fan comes on a very large number.The problem is that I don't remember if it was always like this or if

  • Qosmio G20-120 - disabling audio?

    HY can someone pls me say how can I disable the audio chipset of my qosmio g20-120 portable? I want to buy a card its audigy pcmia for my system surround logitech... thx allot

  • How can I change the ink?

    How can I change the ink for HP Officejet 4500? And why isn't this information available?

  • Blocked Hotmail account

    Hey, my account is blocked and I filled out the information of technical support like a million times now and still no response from hotmail? How much time does it take to unlock my account I changed my password and it still blocked? I still wwaiting