CopyPastor

Detecting plagiarism made easy.

Score: 0.8261914253234863; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-11-29
by R.Alonso

Original Post

Original - Posted on 2012-03-11
by 2mia



            
Present in both answers; Present only in the new answer; Present only in the old answer;

P1 AND P2 ARE POINTS.
A point is this: ({ lat:Latitud, lng: Longitud }
Latitud and Longitud are values with coordinates.
function MapsP2P(p1, p2) //dipuja linea de punto a punto { if (p1.lat != 0) { var line = new google.maps.Polyline({ path: [ new google.maps.LatLng(p1.lat, p1.lng), new google.maps.LatLng(p2.lat, p2.lng) ], strokeColor: "#0000FF", strokeOpacity: 1.0, strokeWeight: 1, icons: [{ icon: { path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, strokeColor:'#0000ff', fillColor:'#000000', fillOpacity:1 }, repeat:'100px', path:[] }], map: map }) lines.push(line); } }
Just out of curiosity I've taken a look at what happens under the hood, and I've used [dtruss/strace][1] on each test.
C++
./a.out < in Saw 6512403 lines in 8 seconds. Crunch speed: 814050
syscalls `sudo dtruss -c ./a.out < in`
CALL COUNT __mac_syscall 1 <snip> open 6 pread 8 mprotect 17 mmap 22 stat64 30 read_nocancel 25958

Python
./a.py < in Read 6512402 lines in 1 seconds. LPS: 6512402
syscalls `sudo dtruss -c ./a.py < in`
CALL COUNT __mac_syscall 1 <snip> open 5 pread 8 mprotect 17 mmap 21 stat64 29
[1]: http://en.wikipedia.org/wiki/Strace

        
Present in both answers; Present only in the new answer; Present only in the old answer;