Posts

c# - Xsl: xsl:value-of and email addresses -

it has been long time since have written xsl, have template: <xsl:template match="teammember" mode="author"> <xsl:element name="author"> <xsl:attribute name="email"> <xsl:value-of select="email" /> </xsl:attribute> <xsl:value-of select="email" /> <xsl:value-of select="displayname" /> </xsl:element> </xsl:template> which seems work ok, except 1 thing. output "email" within element not attribute. xml snippet beign matched against looks like: <teammember sequence="1" primaryindicator="yes" personid="102"> <role rank="1">analyst</role> <lastname>yyy</lastname> <firstname>xxx</firstname> <middlename /> <position /> <clientcode /> <division id="1" code="equity resear...

python - How can a custom icon be used in an image menu item? -

i can create menu items icons: new = gtk.imagemenuitem(gtk.stock_new, 'new') but how can use custom icon - file? http://library.gnome.org/devel/pygtk/stable/class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-image img = gtk.image() img.set_from_file(filename) new = gtk.imagemenuitem(gtk.stock_new, 'new') new.set_image(img)

iphone - CoreData Save Permanently? -

i have been working core data in ipad app , can save , fetch data inside app. when closing application, fully, quit, take out of multitasking, , data disappears. so core data in anyway keep data anywhere when app closed? or need somewhere else? edit: in app delegate didfinishlaunchingwithoptions : [[[uiapplication sharedapplication] delegate] managedobjectcontext]; , have this: context_ = [(prototypeappdelegate *)[[uiapplication sharedapplication] delegate] managedobjectcontext]; in uiview subclass. this nspersistentstorecoordinator code premade in app delegate: - (nspersistentstorecoordinator *)persistentstorecoordinator { if (persistentstorecoordinator_ != nil) { return persistentstorecoordinator_; } nsurl *storeurl = [[self applicationdocumentsdirectory] urlbyappendingpathcomponent:@"prototype.sqlite"]; nserror *error = nil; persistentstorecoordinator_ = [[nspersistentstorecoordinator alloc] initwithmanagedobjectmodel:[self mana...

vb.net - How to scale controls on a form to fit the form proportionately? -

i have visual basic 2010 form various group boxes, buttons, , labels. want able have form maximized, when controls stay @ , not resize form. want them resize proportionately form. appreciated. you can set position , size of controls form resizeend or resize event, based on form's size. need make sure doesn't crash when form minimized or made small.

Character replacement in strings in VB.NET -

how fast can replace characters in string? so background on question this: have couple of applications communicate each other , clients' applications through sockets. these socket messages contain non-printable characters (e.g. chr(0)) need replaced predetermined string (e.g "{nul}"}, because socket messages kept in log file. on side note, not every log message need have characters replaced. now started off on little adventure reading this msdn link found different post site. the current method used...at beginning of day...was using stringbuilder check possible replacements such as... public function replacesb(byval p_message string) string dim sb new system.text.stringbuilder(p_message) sb.replace(chr(0), "{nul}") sb.replace(chr(1), "{soh}") return sb.tostring end function now blog post points out leaving stringbuilder out , using string.replace yield faster results. (actually, using stringbuilder slowe...

redirect - How do I track the route to my destination page from various 301s? -

simple question might know, difficult thing in world me: there's url: http://hstgb.tradedoubler.com/file/118779/banners/searchboxes/holidays_search_8sep09.html?url=http://clkgb.tradedoubler.com/click?p=118779&a=1868402&g=18436588 it's affiliate url (i'm not trying buy ;) ) now when click search, takes me intermediary page, sends parameters lastminute open destination page. the second page goes cannot view or anyhow read it's source code. how track page , parameters sent? you use packet sniffer such wireshark or browser add-on monitors network traffic, capture every request gets send , every page gets received.

orm - Nhibernate SQL named queries and projection -

i've mapped class sql server table , use sql named query retrieve rows it. don't want of columns on pages (e.g. if it's document, want display full content on "view details" page only, while title can on list , "view details" page. if don't select of columns of table in question, indexoutofrangeexception on columns i've left out. is there way project columns i'm interested in on named queries or have create pocos different scopes of application? regards, f. you want nhibernate ad-hoc mapping . p.s.: others have said, should @ least take @ hql , criteria or nhibernate.linq . , handle generated sql, uses nhibernate profiler .