.modal-header
h3
| {{modalOptions.headerText}}
.modal-body
p
| {{modalOptions.bodyText}}
.modal-footer
button.btn(type='button', data-ng-click='modalOptions.close()')
| {{modalOptions.closeButtonText}}
//-Вернет строку 'delete'
button.btn.btn-primary(data-ng-click='modalOptions.ok("delete")')
| {{modalOptions.actionButtonText}}
$scope.$watch(
angular.bind(vm, function () {
return vm.data;
}),
function (newVal, oldVal, scope) {
console.log("$scope.$watch is worked:", vm.data);
if (newVal) {
dataService.setLocalData(vm.data);
}
},
true
);
([^;]*)?;([^;]*)?;([^;]*)?;([^;]*)?;([^;]*)?;([^;\r\n]*)?\n*
\{\n\tmodel: '$1',\n\tyears: \[\{\n\t\tyear: '$2',\n\t\tengines: \[\n\t\t\t\{ engine: '$3', image: '$4', work: '$5', parts: '$6' \}\n\t\t\]\n\},\n
<script type="text/javascript">
jQuery(function () {
jQuery.scrollUp({
// Element ID
scrollName: 'scroll_to_up',
// Distance from top/bottom before showing element (px)
scrollDistance: 359,
// 'top' or 'bottom'
scrollFrom: 'top',
// Speed back to top (ms)
scrollSpeed: 300,
// Scroll to top easing (see http://easings.net/)
easingType: 'linear',
// Fade, slide, none
animation: 'fade',
// Animation speed (ms)
animationSpeed: 200,
// Text for element, can contain HTML
scrollText: 'Scroll To Up',
scrollTrigger: false, // Set a custom triggering element. Can be an HTML string or jQuery object
scrollTarget: false, // Set a custom target element for scrolling to. Can be element or number
scrollTitle: false, // Set a custom <a> title if required.
scrollImg: false, // Set true to use image
activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
zIndex: 2147483647 // Z-Index for the overlay
});
});
</script>
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ в рот мне ноги. какой же здесь прокомментированный и отформатированный код :( +++++++++++++++++++++++++++++++++++++++++
import threading
import random
lock = threading.RLock() # <<< one
def write(*args, **kwargs):
global lock
with lock: # <<< two
print "Thread name: %s. Result %-6f" % (args)
class App(threading.Thread):
def __init__(self, *args, **kwargs):
threading.Thread.__init__(self, *args, **kwargs)
self.setDaemon(False)
def run(self):
for i in xrange(5000):
r = random.random()
i = i*i-789*96/2*r
write(self.name, i)
for i in xrange(5):
app = App(name="THREADING_%d" % (i))
app.start()