<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()
import sys
sys.path.append('/module/')
# в папке module есть файл __init__.py и moduleBest.py
# делаем импорт
from module import moduleBest