CopyPastor

Detecting plagiarism made easy.

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

Possible Plagiarism

Plagiarized on 2019-03-10
by Yassin Hajaj

Original Post

Original - Posted on 2009-12-01
by Andy Schneider



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

Wouldn't something like this work? I don't have a compiler so I can't really test it
public Map<A, List<C>> convert(Collection<A> as) { return as.stream() .collect(Collectors.toMap(Function::identity, a -> a.getBs().stream() .map(B::getIdOfC) .flatMap(id -> getCsByIds(asList(id)) .values() .stream()) .collect(Collectors.toList()) ) ); }
You can look at the built in variable, `$psversiontable`. If it doesn't exist, you have V1. If it does exist, it will give you all the info you need.

1 > $psversiontable Name Value ---- ----- CLRVersion 2.0.50727.4927 BuildVersion 6.1.7600.16385 PSVersion 2.0 WSManStackVersion 2.0 PSCompatibleVersions {1.0, 2.0} SerializationVersion 1.1.0.1 PSRemotingProtocolVersion 2.1

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