CopyPastor

Detecting plagiarism made easy.

Score: 1.693605899810791; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Reposted on 2013-08-12
by mdDroid

Original Post

Original - Posted on 2013-08-06
by mdDroid



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

for save image to specific folder,
private void createDirectoryAndSaveFile(Bitmap imageToSave, String fileName) {
File direct = new File(Environment.getExternalStorageDirectory() + "/DirName");
if (!direct.exists()) { File wallpaperDirectory = new File("/sdcard/DirName/"); wallpaperDirectory.mkdirs(); }
File file = new File(new File("/sdcard/DirName/"), fileName); if (file.exists()) file.delete(); try { FileOutputStream out = new FileOutputStream(file); imageToSave.compress(Bitmap.CompressFormat.JPEG, 100, out); out.flush(); out.close();
} catch (Exception e) { e.printStackTrace(); }
}

try this for accessing that image
private void showImage(String imageName) {
File direct = new File(Environment.getExternalStorageDirectory() + "/SlamImages");
if (direct.exists()) {
File f = new File(Environment.getExternalStorageDirectory() + "/SlamImages/" + imageName);
if (f.exists() && !imageName.equals("")) { Bitmap bmp = BitmapFactory.decodeFile(f.getAbsolutePath()); imgUserLogo.setImageBitmap(bmp); } else { imgUserLogo.setImageResource(R.drawable.friend_image); Toast.makeText(FriendsDetailsActivity.this, "Image Does not exist", Toast.LENGTH_SHORT).show(); }
}
}
Go through following code for storing file
private void createDirectoryAndSaveFile(Bitmap imageToSave, String fileName) {
File direct = new File(Environment.getExternalStorageDirectory() + "/DirName");
if (!direct.exists()) { File wallpaperDirectory = new File("/sdcard/DirName/"); wallpaperDirectory.mkdirs(); }
File file = new File(new File("/sdcard/DirName/"), fileName); if (file.exists()) file.delete(); try { FileOutputStream out = new FileOutputStream(file); imageToSave.compress(Bitmap.CompressFormat.JPEG, 100, out); out.flush(); out.close();
} catch (Exception e) { e.printStackTrace(); }
}

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