mercredi 8 avril 2015

is it Plagiarism? if I use piece of code which is common on the internet


Vote count:

-1




I am doing my school project. Everyone has different project. someone does web, someone does win form app, I choose android app. I used some pieces of code which can be found in many places on the internet. For example, sending email by using Javamail, there are three tool classes which already available on the Internet, they are MailSenderInfo,SimpleMailSender and MyAuthenticator. I just used them and call them at where needs to send an email in my own program.


Also, when I doing the route navigation function in google map, there is a method which can decode the polyline in a json file to a list of points on the map. As shown below:



private List<LatLng> decodePoly(String encoded){


List<LatLng> poly = new ArrayList<LatLng>();
int index = 0;
int length = encoded.length();

int latitude = 0;
int longitude = 0;

while(index < length){
int b;
int shift = 0;
int result = 0;

do {
b = encoded.charAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b >= 0x20);

int destLat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
latitude += destLat;

shift = 0;
result = 0;
do {
b = encoded.charAt(index++) - 63;
result |= (b & 0x1f) << shift;
shift += 5;
} while (b > 0x20);

int destLong = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
longitude += destLong;

poly.add(new LatLng((latitude / 1E5),(longitude / 1E5) ));
}
return poly;
}


I also used some methods like void updateToNewLocation(Location location), which can change the current view to a specific position according to the input Location variable. I already fully understand them and just combine them together, and edit them according to my own requirements. If they ask me what this variable does, what this methods does, I think I could answer it well. I just worry whether it is plagiarism. In my application, say there are 8 functions, just 2 of them partly use these common code from internet, the remaining 6 are written by myself. In my opinion, if u ask me to rewrite these common methods by myself, I think I would write not too much differently compared with them. However, if I cite these code in my application, what is the consequence? Cus each one can be found on lots of websites, which website should I cite? And some of them are even not English website. Should I still cite these non-english website? Any ideas?



asked 59 secs ago







is it Plagiarism? if I use piece of code which is common on the internet

Aucun commentaire:

Enregistrer un commentaire