Notice: While JavaScript is not essential for this website, your interaction with the content will be limited. Please turn JavaScript on for the full experience.
...various Distutils commands, and possibly the client setup.py). It also takes care of receiving control from setup.py, and passing it as appropriate to Distutils commands. Most importantly, distutils.core defines the Distribution class, which is the heart and soul of the Distutils. The client (setup.py) exists mainly to provide attributes for a Distribution instance, and all the Distutils commands operate on that instance. distutils.core also defines...
...var xItems = jQuery('#histogram-chart-wrap .y-axis .tick'); var yItems = jQuery('#histogram-chart-wrap .x-axis .tick'); xItems.each(function(){ var currentLabel = jQuery(this).find('text'); var labelText = currentLabel.text(); var newText = labelText; if (labelText.indexOf(",") !== -1) { newText = "$" + labelText.replace(",000", "k"); } else { newText = "$" + labelText; } currentLabel.text(newText); }) yItems.each(function(i){ var current...
Recurring Giving Campaign Help us raise $30,000 USD by November 27th! #countdown-wrap { width: 70%; padding: 10px; font-family: arial; max-width: 650px; margin: 10px auto 50px; } #goal { font-size: 36px; text-align: center; color: #888; @media only screen and (max-width : 640px) { text-align: center; } } #glass { width: 100%; height: 20px; background: #c7c7c7; border-radius: 10px; float: left; overflow: hidden; } #progress { float: left; width: 0...
...var end = new Date(dt); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; if (distance < 0) { document.getElementById(id).innerHTML = '0'; return; } var days = Math.floor(distance / _day); do...
...var end = new Date(dt); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; if (distance < 0) { document.getElementById(id).innerHTML = '0'; return; } var days = Math.floor(distance / _day); document.getElementBy...
...variable in the current Context: # Set the variable 'var' to 1 in the current context. var.set(1) ContextVar.reset(token) is used to reset the variable in the current context to the value it had before the set() operation that created the token (or to remove the variable if it was not set): # Assume: var.get(None) is None # Set 'var' to 1: token = var.set(1) try: # var.get() == 1 finally: var.reset(token) # After reset: var.get(None) is None, # i.e. 'var' was removed from the curren...
...variables holding a syntactic element, they are not normal variables. So, $VARS = $items is not an assignment of $items to $VARS, but an unpacking of $items into the variables that $VARS holds. For example, with the abstract syntax case [$VARS]:, and the concrete syntax case[a, b]: then $VARS would hold the variables (a, b), not the values of those variables. The psuedo-function QUOTE takes a variable and returns the name of that variable. For example, if the meta-variable $VAR held the variable...
From 13 May through 17 May, 2014
Location: L'Île des Embiez, Var, France
Djangocon Europe 2014
...var1 = contextvars.ContextVar('var1') var2 = contextvars.ContextVar('var2') def gen(): var1.set('var1-gen') var2.set('var2-gen') # EC = [ # outer_LC(), # gen_LC({var1: 'var1-gen', var2: 'var2-gen'}) # ] n = nested_gen() # nested_gen_LC is created next(n) # EC = [ # outer_LC(), # gen_LC({var1: 'var1-gen', var2: 'var2-gen'}) # ] var1.set('var1-gen-mod') var2.set('var2-gen-mod') # EC = [ # outer_LC(), # ...
...var cpid = 14; var jsonvar = eval('jsondata' + cpid); var crmCurrency = jsonvar.currencySymbol; document.getElementById('crm_cpid_'+cpid+'_title').innerHTML = jsonvar.title; if ( jsonvar.money_target > 0 ) { document.getElementById('crm_cpid_'+cpid+'_amt_hi').innerHTML = jsonvar.money_target_display; document.getElementById('crm_cpid_'+cpid+'_amt_low').innerHTML = crmCurrency+jsonvar.money_low; } document.getElementById('crm_cpid_'+cpi...
...VAR: BLOCK After the modification, the with statement semantics would be as follows: mgr = (EXPR) exit = mgr.__exit__ # Not calling it yet try: value = mgr.__enter__() except SkipStatement: VAR = StatementSkipped # Only if "as VAR" is present and # VAR is a single name # If VAR is a tuple of names, then StatementSkipped # will be assigned to each name in the tuple else: exc = True try: try: VAR = value # Only if "as VAR" is present ...
...VAR =" part is optional): with VAR = EXPR: BLOCK which roughly translates into this: VAR = EXPR VAR.__enter__() try: BLOCK finally: VAR.__exit__() Now consider this example: with f = open("/etc/passwd"): BLOCK1 BLOCK2 Here, just as if the first line was "if True" instead, we know that if BLOCK1 completes without an exception, BLOCK2 will be reached; and if BLOCK1 raises an exception or executes a non-local goto (a break, continue or return), BLOCK2 is not reached. The magi...
...VAR This single expression does the following: Evaluate the value of EXPR, an arbitrary expression; Assign the result to VAR, a single assignment target; and Leave the result of EXPR on the Top of Stack (TOS) Here -> or (RARROW) has been used to illustrate the concept that the result of EXPR is assigned to VAR. The translation of the proposed syntax is: VAR = (EXPR) (EXPR) The assignment target can be either an attribute, a subscript or name: f() -> name[0] # where 'name' exists...
...var cpid = 16; var jsonvar = eval('jsondata' + cpid); var crmCurrency = jsonvar.currencySymbol; document.getElementById('crm_cpid_'+cpid+'_title').innerHTML = jsonvar.title; if ( jsonvar.money_target > 0 ) { document.getElementById('crm_cpid_'+cpid+'_amt_hi').innerHTML = jsonvar.money_target_display; document.getElementById('crm_cpid_'+cpid+'_amt_low').innerHTML = crmCurrency+jsonvar.money_low; } document.getElementById('crm_cpid_'+cpi...
...variable in iterator where "variable" refers to the variable of the loop and "iterator" refers to the iterator created for the given integer interval. The values taken by the loop variable in an integer for-loop may be either plain integers or long integers, according to the magnitude of the bounds. Both bounds of an integer for-loop must evaluate to a real numeric type (integer, long, or float). Any other value will cause the for-loop statement to raise a TypeError exception. Issues The fo...
...var '=' ] expr ':' suite This statement is defined as being equivalent to the following sequence of statements: var = expr if hasattr(var, "__enter__"): var.__enter__() try: suite finally: var.__exit__() (The presence of an __exit__ method is not checked like that of __enter__ to ensure that using inappropriate objects in with: statements gives an error). If the variable is omitted, an unnamed object is allocated on the stack. In that case, the suite has no access to the u...
...VAR): def f(): a = [EXPR for VAR in ITERABLE] Translation (let's not worry about name conflicts): def f(): def genexpr(iterator): for VAR in iterator: yield EXPR a = list(genexpr(iter(ITERABLE))) Let's add a simple assignment expression. Original code: def f(): a = [TARGET := EXPR for VAR in ITERABLE] Translation: def f(): if False: TARGET = None # Dead code to ensure TARGET is a local variable def genexpr(iterator): nonloc...
...var grantDisbursementsChart = new CanvasJS.Chart("grantDisbursementsChartContainer", { subtitles:[ { text: "per grant type", fontFamily: "SourceSansProItalic, Arial, sans-serif", fontSize: 16 } ], backgroundColor: "#f9f9f9", colorSet: "psfCharts", data: [ { type: "pie", showInLegend: false, legendText: "{indexLabel}", indexLabel: "#percent%", percentFormatString: "#0.##", toolTipCo...