Posts

Grab-to-pan in Silverlight app -

I have canvas inside a scrollViewer. I want the user to be able to capture and move the canvas, scrollbars But with a thumbs up properly on updating My initial implementation calculates the offset on each mouse move, and updates the scrollbar: // calculate new drag distance newOffsetPos = e.GetPosition (MapCanvas); System.Diagnostics.Debug.WriteLine ("New Offset Grade:" + newOffsetPos.X + "" + newOffsetPos.Y); Double delta x = newoffset.pos.x - _offset.position.x; Double Delta Y = newOffsetPos.Y - _offsetPosition.Y; System.Diagnostics.Debug.WriteLine ("Delta X / Y:" + DeltaX + "" + Delta) "; System.Diagnostics.Debug.WriteLine ("SV offset X / Y:" + _scrollViewer.HorizontalOffset + "" + _scrollViewer.VerticalOffset); _scrollViewer.ScrollToHorizontalOffset (_scrollViewer.HorizontalOffset - Deltax); _scrollViewer.ScrollToVerticalOffset (_scrollViewer.VerticalOffset - Delta); _offsetPosition = newOffsetPos; Although...

When implementing an interpreter, is it a good or bad to piggyback off the host language's garbage collector? -

Assume that you are implementing an interpreter for a GCED language for GCed language, which looks like a GCD That you will receive garbage collection for free, as long as you are very careful about your design. Is this usually done? Are there good reasons to do this? There are two different things in language and sequence: they are not really related to IMHO. Therefore, if your current runtime already provides GC, then there should be a good reason to increase the runtime with other GCs. In the good old days when the memory allocation in the OS was slow and expensive, the app brought its heap managers, where the smaller part of the data is more efficient in handling. This was a reading to add another memory management to the current runtime (or OS). But if you are talking about Java, .NET - then they should be sufficient and efficient to work most. However, you may want to create a proper interface / API for memory and object management. Work (and others), so that your ...

Using Html.ActionLink() with ASP.NET MVC & Spark - Syntax? -

Everything, normal / ASPX view works well with Spark and MVC within NerdDinner, and I have not touched any controller code so I am pretty sure that it is not so. & lt; ViewData Model = "System Colections. Generic.InMemable [[NerdDinner.Models.Dinner]]" /> & Lt; Set Title = "'Upcoming Day' '' & gt; & lt; Content: Main & gt; & lt; li Each =" P in Model "& gt;! {Html.ActionLink (P. Title, 'Description', 'Dinner')} Content: Main> In view of the above code, ActionLink is considered as good as that which is good When I try to provide an ID to my action method, then I start killing a wall, as far as I can tell from Spark sample docs, do something like this Should be enabled in: ! {Html.ActionLink (p.Title, 'Details', 'Dinners', new {id = p.DinnerID}}} However, it throws an exception: "unexpected token '{'" I hope this is something silly. I'm missi...

git - in zsh, how do I do a conditional on the exit status of a program? -

मुझे कुछ ऐसा करने के लिए wnat: अगर [[git स्थिति & amp; & gt; / Dev / null]]; फिर "एक जीआईटी रेपो" गूंज; Else गूंज "एक git repo नहीं है"; फाई को छोड़कर मुझे पता नहीं है कि कैसे बाहर की स्थिति पर जाँच करने के लिए। मैं इसे कैसे ठीक करूं? धन्यवाद का प्रयोग करें $? , इसमें अंतिम कमांड रिटर्न कोड होता है संपादित करें: सटीक उदाहरण: git स्थिति & gt; & amp; / Dev / null अगर [$? -ई 0 0]; फिर "जीआईटी स्थिति सफलतापूर्वक समाप्त हो गई" एको गूंजती "गिट स्थिति त्रुटि कोड से बाहर निकली" फ़िक्स

nested linq queries -

मैं इस तरह एक XML फ़ाइल के साथ काम कर रहा हूं। & lt; लिफाफा xmlns = "http://schemas.xmlsoap.org/soap/envelope/"> & LT; body & gt; & LT; Element1 & gt; & Lt; एलिमेंट 2 दिन = "2009-10-18" & gt; & Lt; Element3 नाम = "जो" & gt; & Lt; एलिमेंट 4 समय = "1" & gt; & Lt; एलिमेंट 5 राशि = "0" मूल्य = "16.58" / & gt; & Lt; एलिमेंट 5 राशि = "1" मूल्य = "18.58" / & gt; & Lt; एलिमेंट 5 राशि = "2" मूल्य = "20.58" / & gt; & Lt; / Element4 & gt; & Lt; / Element3 & gt; & Lt; Element3 name = "Fred" & gt; & Lt; एलिमेंट 4 समय = "5" & gt; & Lt; एलिमेंट 5 राशि = "1" मूल्य = "15.41" / & gt; & Lt; एलिमेंट 5 राशि = "2" मूल्य = "16.41" / & gt; & Lt; एलिमेंट 5 राशि = "3" मूल्य = "17.41" / & gt; & Lt; ए...

iphone - Publish UIWebview via Facebook connect -

I am using fbConnect in my coke touch application. I have UIWebview on my code, and I want to publish the context of UIWebview (its only text) to Facebook. How do I change FBStream to publish my UIWebview? FBStreamDialog * dialog2 = [[[FBstream dialog] alloc] init] autoresphere]; Dialog2.delegate = self; Dialog2.userMessagePrompt = @ "Share Gazals On Your Wall"; Dialog2.attachment = @ "{\" name \ ": \" Huffes app for iPhone \ "," "\" href \ ": \" http://itunes.apple.com/us/app/divan-of - Hefez / ID 340865571? MT = 8? Tab = iPhone \ "," "\" media \ ": [{\" type \ ": \" image \ "," "\" src \ ": \" http: // photos-h.ak.fbcdn. Net / photos-ak-sf2p / v43 / 67/279420942343 / app_5_279420942343_8373.gif \ "," "\" href \ ": \" http://developers.facebook.com/connect. Php? Tab = iphone / \ "}]," \ "attribute ...

.net - Is there a UnicodeCategory Enumeration diagram? -

I'm looking for a good diagram that shows an example for each. This will define a character's Unicode range. A surrogate pair is a coded character representation for a single abstract character, the sequence of two code units, where the first unit of the pair is a high-surrogate and the other is a low-surrogate. Through U-D-FFF, there is a unicode code point in the range of U + D800 and low-surrogate is a unicode code point through U + DfF via U + DFFF. This calculation is based on Unicode standard, version 3.1 This calculation is used to support four methods, such as iSiper Is an open source software that receives one character and returns the character category. In this category, the Unicode character database (Annex # 44) provides complete information about each of the variables described on this database, in which the character range (and open source software, using this DB will allow you to leave the class ) Windows Charmapp will also show you the ch...