Posts

scope - Why does one JavaScript closure work and the other doesn't? -

It is believed that when the user clicks on the first link, it will "1", and the second link will warn, "2", etc.: Version 1: & lt; A href = "#" id = "link1" & gt; Click me & lt; / A & gt; & Lt; A href = "#" id = "link2" & gt; Click me & lt; / A & gt; & Lt; A href = "#" id = "link3" & gt; Click me & lt; / A & gt; & Lt; A href = "#" id = "link4" & gt; Click me & lt; / A & gt; & Lt; A href = "#" id = "link5" & gt; Click me & lt; / A & gt; & Lt; Script type = "text / javascript" & gt; (I = 1; i & lt; = 5; i ++) {document.getElementById ('link' + i) .click = (function () {return function () {var n = i; alert (n); Return false;}}) (); } & Lt; / Script & gt; Version 2: & lt; A href = "#" id = "link1" & gt; Click me ...

iphone - Asynchronous IO with CFWriteStream -

मैं सीएफड्राइटस्ट्रीम शेड्यूल्यूथ रीनल लूप और सीएफड्राइटस्ट्रीम वाइट का उपयोग एसिंक्रोनस आईओ करने के लिए कर रहा हूँ। यहाँ प्रश्न है: ऐसा लगता है कि केवल एक CFWriteStreamWrite कॉल सुरक्षित है (ब्लॉकिंग से मुक्त) प्रति प्रत्येक kCFStreamEventCanAcceptBytes अधिसूचना, क्योंकि दूसरे कॉल से, हम गारंटी नहीं दे सकते कि सॉकेट अधिक डेटा स्वीकार करने के लिए तैयार है। इसलिए यदि हम n CFWriteStreamWrite कॉल करना चाहते हैं, तो हमें "केसीएफस्ट्रीमइवेंटकैनएक्सेप्टबाइट्स" और "कॉलिंग CFWriteStreamWrite" एन बार दोहराना होगा। क्या यह सही है? धन्यवाद! cfwritestreamCanAcceptBytes () स्ट्रीम पर देखने के लिए कि क्या यह है कि / div> अभी भी उस पर लिखना सुरक्षित है।

can not find a declaration for NSXMLElement while working with xmpp framework in iphone sdk -

I am trying to develop the chatting application on the iPhone. For this, I have used the XMPP framework, but when I am trying to integrate it with the encoded project, so I'm getting an error like "I can not find the interface announcement for NSXMLElement" when I see the NSXML document it is a class of Mac OS SDK, not IPhone So how do I solve this problem ??? probably check

WCF REST + WebHttpRelayBinding (Azure AppFabric Service Bus) -

I have a self-hosted WCF REST application that allows JSM to accept and return as a stream with WebMessageBodyStyle Is designed for. I am bypassing DataContractSerializer using WebContentTypeMapper and WebContentFormat.Raw. This works locally well via webHTbbinding, and works fine when I use webhetting relaying and content-type: text / plain Fiddler2, but whenever I use content I use - Type: Application / JS I get the following: 500 Tracking ID: e0281df8-12b4-4914-ab87-314956fb0df3, Timestamp: 07 / 27/2010 12: 32:47 Anyone no My references say that WebHttpBinding came in support of XML and Jason Format and REST services.

linux - Accessing a cygwin symlink from windows -

I am quite new to Sagvin I have created a symlink as follows $ ln -s / var / www / cygdrive / d / foo and when I drive through windows D , Then I see the system code foo is there any way to operate as a folder for windows instead of a file foo ? It is not what I know that does not update the OS for the sync key, rather, it does not Sigwin allows 'simulated' simunes from within the shell. You can set up a shell to use Windows LNK files that you want but ... From: Creating a Shortcut Another problem area is between Unix-style links, which links one file to another, and Microsoft .lnk files, which provides a shortcut for a file. They look the same at first glance, but in reality, quite different. By default, Saigwin does not create a symlink as .lnk files, but there is an alternative to doing this, see the section called "CYGWIN Environment Variables" These are the symlinks. Lnk files are compatible with Windows-built .lnk files, but they are s...

.net - FTPWebRequest behind NAT (PASV,SSL) -

Has anyone used FTP ftps on a remote server behind a NAT Net FTPWebRequest class? My code is as follows: dim URI = "ftp: //" & amp; SRemoteDir & amp; "/" FtpWebRequest = as a dim feet, nothing is resolved servicepoint manager. ServerCertificateValidationCallback = Addressed Valid Certificate FTP = CType (FtpWebRequest.Create (URI), FtpWebRequest) FTP. Cash Policy = New System.Net.Cache.RequestCachePolicy (System.Net.Cache.RequestCacheLevel NoCacheNoStore) ftp.Credentials = New NetworkCredential (sUID, sPw) ftp.EnableSsl = True ftp.Method = WebRequestMethods.Ftp.ListDirectoryDetailsFtpWebResponse = CType Retarded reaction in form (ftp.GetResponse (), FtpWebResponse) Response = Response in the form of stream response. Dim Stream Reader (responses) as GETResponseStream New Stream Reader Dim SB New StringBuilder () sb.Append (streamReader.ReadToEnd) as streamReader.Close () Response Turn off () return sb.ToString () Expiration Return (ex. and I get the...

amazon s3 - s3 Bucket Policy Malformed error -

The following bucket policy is returning a malformed error: {"version": "" "", "ID": "S3 Policy", "Statement": [{"Sid": "1", "Effect": "Allow", "Principal": {"AWS": ["AWS:"], "Action": ["s3: GetObject", "s3: PutObject"], "Resource": "arn: aws: s3 ::: BUCKETNAME / *"]}}} I am trying to create a policy where all files in the BUCKETNAME user AWSID - can be readable by a 65-character hex ID / write I know that works. Any ideas which are returning specifically to the error? I think the brackets have been merged. Try it: {"version": "2008-10 "", "ID": "S3 Policy", "Statement": [{"Sid": "1", "Impact": "Allow", "Principal": {"AWS": ["AWSID" ], "Action": ["S3...