{% addtoblock "js" %}
<script type="text/javascript" src="{% static 'js/some_script.js' %}"></script>
</script>
{% endaddtoblock %}
{% render_block "js" %}
<script type="text/javascript">
window.urls = {
some_url: {% url 'some_url' param=some_value %}
}
</script>
import java.util.*;
public class ShuffleDemo {
public static void main(String[] args) {
Integer[] numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9};
ArrayList<Integer> numbersList = new ArrayList<>(Arrays.asList(numbers));
long seed = System.nanoTime();
Collections.shuffle(numbersList, new Random(seed));
for(int x = 0; x < numbersList.size(); x++) {
System.out.print(numbersList.get(x) + " ");
}
}
}
var obj = new Proxy({
f1: function() {
console.log('1');
return this;
},
f2: function() {
console.log('2');
return this;
}
},
{
get: function(target, name) {
if(name in target) {
return target[name]();
}
}
});
a = ['maz/2/arini', 'ya/16/streb', 'lovel/5/as']
max([int(''.join([c for c in i if c.isdigit()])) for i in a])
import string
translation = str.maketrans(string.digits, string.digits, string.ascii_letters + string.punctuation)
max([int(i.translate(translation)) for i in a])
$('tr').each(function(i) {
var cells = $(this).children('td');
if(cells.length) {
var price = parseFloat($(cells[1]).text());
var count = parseInt($(cells[2]).find('input').val());
$(cells[3]).text(price * count);
}
});