import java.security.MessageDigest;
String md5(String in) {
String result = null;
try
{
MessageDigest digest = MessageDigest.getInstance("MD5");
digest.reset();
digest.update(in.getBytes());
BigInteger bigInt = new BigInteger(1, digest.digest());
result = bigInt.toString(16);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return result;
}
<div id='templates' style='display:none;'>
<div class='latest-price'>
<div class='price-value'></div>
</div>
</div>
$.getJSON(url,
function(dt){
if (dt.success){
var template = $('#templates > div');
var clone = template.clone();
clone.find('.price-value').text(dt.data[0].value);
clone.appendTo($('#parent-block'));
}
});
.latest-price .price-value{
color: red;
}
<html>
<body>
<style>CSS</style>
<div>
<div id='parent-block'></div>
Код выше
</div>
<script>Javascript </script>
</body>
</html>
public async Task CopyFileAsync(string sourcePath, string destinationPath)
{
using (Stream source = File.Open(sourcePath))
{
using(Stream destination = File.Create(destinationPath))
{
await source.CopyToAsync(destination);
}
}
}