Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 420 results for
closure
- Page 1
Re: Differential Directory, indexing method
Programming
Software Development
6 Days Ago
by xrjf
… context, but a change in legislation unfortunately led to the
closure
of the school and the discontinuation of its degrees. Despite…
Re: Closure in Python
Programming
Software Development
18 Years Ago
by vegaseat
… function pay() # this constitutes the block of code of the
closure
is_high = pay_scale(nathan) print "Is nathan paid high? …can access variables in the calling function, i.e. its
closure
def times(n): def _f(x): return x * n…function _f() is the block of code of the
closure
, similar to the lambda code in the first example.
Re: Closure table
Programming
Web Development
9 Years Ago
by diafol
…`id` field. Just: ancestor | descendant | tier INSERT INTO
closure
SET ancestor = ?, descendant = ?, tier = LEAST(3, …(SELECT COUNT(*) FROM (SELECT * FROM
closure
) AS tblalias WHERE ancestor = ?)) The ? placeholders can be … `execute()`. BTW - change each occurrence of `
closure
` in the SQL to the name of your…
Re: Closure in Python
Programming
Software Development
18 Years Ago
by azimuth0
[quote=Ene Uran;242588]What is a
closure
? I keep reading this word in programming, but never got … which it's called. So it's placed into a
closure
, where all the variables in its environment are available. In…
Closure in Python
Programming
Software Development
18 Years Ago
by Ene Uran
What is a
closure
? I keep reading this word in programming, but never got a good explanation.
Closure table
Programming
Web Development
9 Years Ago
by mangel.murti
…, 1, 2 6, 66, 66, 0, 0 i am using
closure
table model. i placed tier_id cloumn there. let say new…
Re: Closure table
Programming
Web Development
9 Years Ago
by mangel.murti
… to do to achive above. i am storing referrals in
closure
table like i already mention above. Application wants only process…
Re: Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by vegaseat
Another look at
closure
... ''' closure102.py A nested function has access to the environment … occurs during the execution of the outer function. In a
closure
you return the reference to the inner function that remembers…
Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by flebber
… through some python syntax examples. When I ge to this
closure
example I am not understanding how 'y' gets its value…
Re: Closure in Python
Programming
Software Development
18 Years Ago
by Ene Uran
Thank you vegaseat and azimuth0. I have to play with that for a while to comprehent it. By the way, vegaseat's code is Python put into a PHP code field to give it some color highlighting (use a PHP tags instead of CODE).
Re: Closure table
Programming
Web Development
9 Years Ago
by mattster
I think what you're doing here is either weird on unclear. So my understanding is, you add a row (ID = 1, TIER = 1, PARENT = 0) then when you add another row the TIER should increment (ID = 2, TIER = 2, PARENT = 1). This should happen again (ID = 3, TIER = 3, PARENT = 2), and then reset and start again? (ID = 4, TIER = 1, PARENT = 3) Either way, …
Re: Closure table
Programming
Web Development
9 Years Ago
by mangel.murti
Thanks mattster for you reply. Acctully i am working with a three tier affiliate system. so i choose closures table model. i have a second table where all % is storing , like tier_1-->3% , tier_2 -->1% tier_3-->0.2% if i forever incrementing the TIER then how will i distribute % to affiliate? so if tier_id reaches 3 then other new entry …
Re: Closure table
Programming
Web Development
9 Years Ago
by diafol
Not sure about any of this. Please take the time to explain CLEARLY exactly what you're trying to do and give sample data. I don't think your first few posts are sufficient.
Re: What is the concept of closure in JavaScript?
Programming
1 Year Ago
by aahent45
In JavaScript,
closure
refers to the ability of a function to remember and access variables from its outer scope even after the function has finished executing. It allows functions to maintain access to their outer scope's variables, providing a way to create private variables and implement data encapsulation.
Re: Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by aswekown
Well, when you set doubler = f(2) that just create a function which parameter is x so doubler is a function object. now the x is set to be 2, you can change it. When you type print doubler(5) 5 is the y. so you get the result 10.
Re: Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by flebber
But how does y get the value?
Re: Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by woooee
I can't tell what your code looks like because it is not indented. doubler is now f(2) = return g so that is removed and the value from doubler(5) gets assigned to y that is why you get the x*y value and not "function g at blah blah" which is what the return g would print. __Add some print statements__ def f(x): print &…
Re: Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by snippsat
Some good example over,one more. Running it interactive can help. I keep function out from interactive environment,then it's eaiser to keep indentation. def foo(x): print 'foo got called with argument', x def wrapped(y): return x * y return wrapped Run it. >>> foo <function foo at …
Re: Not Understanding Passing values in Closure
Programming
Software Development
12 Years Ago
by flebber
Thank You so much for the great replies. I was really struggling to grasp this concept. >>> foo(4)(5) foo got called with argument 4 20 >>> #Both function is called >>> #So store it in a varible >>> bar = foo(4) foo got called with argument 4 >>> #So to get the same as …
SLR
Programming
Software Development
15 Years Ago
by fghdmhmmd
…;j++) { if(
closure
[clno][i].pno>
closure
[clno][j].pno) { temp=
closure
[clno][i];
closure
[clno][i]=
closure
[clno][j];
closure
[clno][j]=temp…gt;
closure
[clno][j].dpos) && (
closure
[clno][i].pno==
closure
[clno][j].pno)) { temp=
closure
[clno][i];
closure
[clno][i]=
closure
[clno][j];
closure
[clno…
Need help in running a SLR parser program.
Programming
Software Development
12 Years Ago
by garvit184
…>
closure
[clno][j].dpos) && (
closure
[clno][i].pno==
closure
[clno][j].pno)) { temp=
closure
[clno][i];
closure
[clno][i]=
closure
[clno][j];
closure
[clno…
OSGI bundle starting problem
Programming
Software Development
14 Years Ago
by GDICommander
… org.apache.felix.gogo.runtime.
Closure
.execute(
Closure
.java:421) at org.apache.felix.gogo.runtime.
Closure
.executeStatement(
Closure
.java:335) at org.apache… org.apache.felix.gogo.runtime.
Closure
.execute(
Closure
.java:421) at org.apache.felix.gogo.runtime.
Closure
.executeStatement(
Closure
.java:335) at org.apache…
ClassNotFoundException (javax.xml.ws.Service) when starting OSGI bundle
Programming
Software Development
14 Years Ago
by GDICommander
… org.apache.felix.gogo.runtime.
Closure
.execute(
Closure
.java:421) at org.apache.felix.gogo.runtime.
Closure
.executeStatement(
Closure
.java:335) at org.apache… org.apache.felix.gogo.runtime.
Closure
.execute(
Closure
.java:421) at org.apache.felix.gogo.runtime.
Closure
.executeStatement(
Closure
.java:335) at org.apache…
Can't run OSGI bundle with JAR only.
Programming
Mobile Development
14 Years Ago
by GDICommander
…org.apache.felix.gogo.runtime.
Closure
.executeCmd(
Closure
.java:458) at org.apache.felix.gogo.runtime.
Closure
.executeStatement(
Closure
.java:384) at org.…org.apache.felix.gogo.runtime.
Closure
.executeCmd(
Closure
.java:458) at org.apache.felix.gogo.runtime.
Closure
.executeStatement(
Closure
.java:384) at org.…
Writing output into file
Programming
Software Development
9 Years Ago
by sludgecornell
…"OTHER STATISTICS:" print " LATITUDE
CLOSURE
:", Latitude_Closure print " DEPARTURE
CLOSURE
:", Departure_Closure print print " LINEAR ERROR OF…
CLOSURE
(LEC):", LEC print " LEC BEARING: ", LECBearing …
Re: Writing output into file
Programming
Software Development
9 Years Ago
by Gribouillis
…:") printout(" LATITUDE
CLOSURE
:", Latitude_Closure) printout(" DEPARTURE
CLOSURE
:", Departure_Closure) printout() printout…printout(" CORRECTED LATITUDE
CLOSURE
:", CorrLatClosure) printout(" CORRECTED DEPARTURE
CLOSURE
", CorrDepClosure) def main…
Setup version for module 'Sample_CustomController' is not specified Magento
Community Center
8 Years Ago
by Amesh_1
…\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(
Closure
), Object(Magento\Framework\App\Request\Http)) #4 /opt/lampp…(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{
closure
}(Object(Magento\Framework\App\Request\Http)) #11 [internal function]:…
XML Transformation using XSL
Programming
Software Development
14 Years Ago
by awofesof
…="@AGENCYCODE"/></AGENCYCODE> <
Closure
> <ACTIONCODE><xsl:value-of…select="@ACTIONCODE"/></ACTIONCODE> </
Closure
> <ExternalNumbers> <EXTERNALNUMBER>&…
A PROGRAM TO CALCULATE THE NET SALARY OF A STAFF
Programming
Software Development
11 Years Ago
by Ericus7
… FORTHY.ALSO DISPLAY NET PAY,WHICH IS
CLOSURE
PAY MINUS WITHHELDING;WITHHELDING IS CALCULATED AS 28%… OF
CLOSURE
PAY,IF GROSS PAY IS OVER $1000,…20% OF GROSS PAY, IF
CLOSURE
PAY IS NOT OVER $1000 BUT IS OVER $…600 AND 10% OF GROSS PAY, IF
CLOSURE
PAY IS NOT OVER $600. I NEED YOUR …
Update database with ajax, can't get radio or check boxes working on Safari
Programming
Web Development
9 Years Ago
by Dennis_8
…(formElement, elementType) {//formElement and elementType are trapped in the
closure
and are reused var xmlHttp = GetXmlHttpObject();//xmlHttp is trapped in…, txtHint, xmlHttp, tim);//use of the variables here causes a
closure
to be formed. }; } onload = function(){ var i; var elements = …
1
2
3
7
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC