Posts

binding - Multiselection combobox display text silverlight -

i have grid, contains loads of columns. in 1 of columns have combobox, data template containing x number of checkboxes. <datatemplate> <combobox itemssource="{binding data}" dropdownclosed="combobox_dropdownclosed" loaded="combobox_loaded" selectionchanged="combobox_selectionchanged"> <combobox.itemtemplate> <datatemplate> <checkbox content="{binding subproject}" ischecked="{binding checked, mode=twoway}"/> </datatemplate> </combobox.itemtemplate> </combobox> what show summary of items checked in combobox when it's closed. "sub1, sub2, sub8". however, haven't been able find way of doing this. got idea? i found later on, , kind of answered question. combobox display value in silverlight

url - Local sub-domains on httpd apache -

i have on machine wampp server installed use run php applications. there many folder in htdocs inside projects , can see in browser @ url: localhost/folder-name/. i'd see every project in custom url like: dev.name-folder.com with iis easy that, can explain how apache, using wampp server? thanks. you can change c:\windows\system32\drivers\etc\hosts file map domain names dev.name-folder.com local system. (otherwise you'll have use dns server). to configure vhost in apache create file each domain/project you'd serve: <virtualhost *:80> serveradmin email@domain.tld servername domain.tld documentroot /var/www/htdocs/domain.tld/html <directory /> options followsymlinks allowoverride none </directory> <directory /var/www/htdocs/domain.tld/html> options indexes followsymlinks multiviews allowoverride none order allow,deny allow </d...

symfony1 - Zend Framework or Symfony -

i in process of migrating new php framework. have been involved in heavy development using codeigniter framework, finding little lightweight needs now. i have boiled choices down either zend framework or symfony. know learning curve both relatively high. however, wanted rough idea of worth getting stuck (as spending quite lot of time getting familiar chosen framework). if helps narrow answer down little. not looking build simple blog or that. in need support full-fledged development of e-commerce systems, customer relationship managers , content management systems. personally have been working zf since in version 1.6, , pretty happy , had seen improvement since 1.6 , think zf missing ideas : 1- orm , later on great implementation between zf + doctrine 1.2 has taken popularity , depend on zf + doctrine in many projects , these days can see great integration between zf + doctrine2 2- symfony's bundle forgotten in zf do think zend framework misses symfony...

java - Calling grails commands from grails events? -

i need call plugin arguments grails event script. how do this? specifically, i'm trying hook eventcompile call generate-dto --all , sending y stdin. the easiest (and slowest) way invoke grails in event handler. bit tricky, since generate-dto generates compile event, can make conditional on system property. second problem required input. convention, grails scripts supposed accept --non-interactive , not prompt user, dto plugin seems not follow this. workaround posix systems linux or macos x pipe in yes command grails input. here's how got working: // scripts/_events.groovy eventcompilestart = { args -> if (boolean.valueof(system.getproperty('in.generate', "false"))) { // skip } else { ['bash', '-c', 'yes | grails -din.generate=true generate-dto --all'].execute() } }

c# - How do I show a Save As dialog in WPF? -

i have requirement in wpf/c# click on button, gather data , put in text file user can download machine. can first half of this, how prompt user "save as" dialog box? file simple text file. both answers far link silverlight savefiledialog class; wpf variant quite bit different , differing namespace. microsoft.win32.savefiledialog dlg = new microsoft.win32.savefiledialog(); dlg.filename = "document"; // default file name dlg.defaultext = ".text"; // default file extension dlg.filter = "text documents (.txt)|*.txt"; // filter files extension // show save file dialog box nullable<bool> result = dlg.showdialog(); // process save file dialog box results if (result == true) { // save document string filename = dlg.filename; }

wpf - ResourceDictionary Source Binding to Module (for Localization) -

i have xaml window has set of strings bound objects so: <label content="{staticresource labelusername}" horizontalalignment="right" name="label1" verticalalignment="center" /> this code works fine when define resoucedictionary this: <window.resources> <resourcedictionary > <resourcedictionary.mergeddictionaries> <resourcedictionary source="/strings/strings_en-us.xaml" /> </resourcedictionary.mergeddictionaries> <objectdataprovider x:key="objlogon" objecttype="{x:type starutilities:logon}" /> </resourcedictionary> </window.resources> however, want beable change strings bound from, created module looks this: public module localizationchooser public readonly property getlocalization uri return new uri("/strings/strings_en-us.xaml", urikind.relative) end end propert...

c# - How performant is the DBNull.Value.Equals() check? -

i know it's not enough worried about, how performant dbnull.value.equals() check? public ienumerable<dynamic> query(string sql, params object[] args) { using (var conn = openconnection()) { var rdr = createcommand(sql, conn, args).executereader(commandbehavior.closeconnection); while (rdr.read()) { var e = new expandoobject(); var d = e idictionary<string, object>; (var = 0; < rdr.fieldcount; i++) d.add(rdr.getname(i), dbnull.value.equals(rdr[i]) ? null : rdr[i]); yield return e; } } } in particular, line: d.add(rdr.getname(i), dbnull.value.equals(rdr[i]) ? null : rdr[i]); versus original code (from rob conery's massive class): d.add(rdr.getname(i), rdr[i]); there's bound @ least small impact, again not noticable, i'm curious. reason conversion because it's easier testing null in asp.net mvc views. if in .net reflector c...