Posts

XSLT: If check parameter value -

following code in xslt (i've cut out irrelevant parts, get-textblock lot longer , has lot of parameters passed correctly): <xsl:template name="get-textblock"> <xsl:param name="style"/> <xsl:element name="border"> <xsl:if test="$style='{staticresource labeltext}'" > <xsl:attribute name="background">#ff3b596e</xsl:attribute> </xsl:if> <xsl:attribute name="background">#ff3b5940</xsl:attribute> </xsl:element> </xsl:template> the style parameter can either '{staticresource labeltext}' or '{staticresource valuetext}' , background of border depends on value. this if structure fails however, draws ff3b5940 border in output.xaml file. call template this: <xsl:call-template name="get-textblock"> <xsl:with-param...

java - validate that an email address contains "@" and "." -

i need validate inserted email address contains "@" , "." without regular expression. can give me "java code" , "structure chart" examples please? i suspect you're after like: if (!address.contains("@") || !address.contains(".")) { // handle bad address } edit: far complete validation, of course. it's barely start of validation - going particular case wanted handle.

Creative Use of OpenID -

the situation i have 3 websites used same one. result, use single database user administration , authentication. unfortunately, distinct websites , have grown include drastically different features. when 3 sites 1 site, used nifty layout switcher keyed on requested url determine stylesheets use. if logged in domain1.com user domain2.com , server swap url without problem. as added features 1 site, needed split 3 different systems keep stepping on ourselves. adding feature domain1 break unrelated system on domain3 , keeping things separate smarter. kept same user database because it's tied in our licensing , subscription systems. now, want begin using ssl/tls protect sites ... meaning they're transferred on https rather http. using http, didn't have many problems bouncing users 1 site version another. log in of 3 sites, server detect site supposed on, , kick on there. since we're using state server session management, didn't lose in transfer, ...

c# - Data transfer from one website to another -

i have 2 websites , b both written in asp.net mvc 3. in website there form needs submitted website b via post method. user has option post directly or after encrypting values. when submit form without encryption simple form.submit() , able values in website b using formcollection object. when user selects submit after encryption, redirect action on website encryption occurs , encrypted data placed in hidden textbox in corresponding view , auto submitted on page load using jquery website b. unable values in formcollection object on website b. what problem be? happening because of security feature prevent xss or similar? its doubtful xss protections - in case see exception. load fiddler , make sure see data in element inside form getting posted website b. if there in form being submitted - should available.

xaml - Silverlight 5: Set ConstructorArgument on a IMarkupExtension class -

i have markupextension can initiated 1 value, binding : <textbox text="{binding mypath}"/> instead of <textbox text="{binding path=mypath}"> in wpf done constructorargumentattribute , doesn't exist in silverlight. checked attributes on path property of binding have'nt found attributes applied it. any ideas? for realize it's not yet implemented. so if think feature compelling, please go ahead , vote feature here . hope answer updated have piece of news (hope happen asap...).

sql - Excluding a table from a transaction rollback -

we have table , set of procedures used generating pk ids. table holds last id, , procedures gets id, increments it, updates table, , returns newly incremented id. this procedure potentially within transaction. problem if have rollback, potentially rollback id before id's came use during transaction (say generated different user or thread). when id incremented again, cause duplicates. is there way exclude id generating table parent transaction prevent happening? to add detail our current problem... first, have system preparing migrate lot of data into. system consists of ms-sql (2008) database, , textml database. sql database houses data less 3 days old, while textml acts archive older. textml db relies on sql db provide ids' particular fields. these fields identity pk's currently, , generated on insertion before publishing texml db. not want wash our migrated data through sql since records flood current system, both in terms of traffic , data. @ same time have n...

jdbc - blocking consumers in apache camel using existing components -

i use apache camel jdbc component read oracle table. want camel run in distributed environment meet availability concerns. however, table reading similar queue, want have single reader @ given time can avoid locking issues (messy in oracle). if reader goes down, want reader take over. how accomplish using out-of-the-box camel components? possible? it depends on deployment architecture. example, if deploy camel apps on servicemix (or activemq) in master/slave configuration (for ha), 1 consumer active @ given time... but, if need multiple running (clustered scalability), (by default) compete/duplicate reads table unless write own locking logic. this easy using hazelcast distributed locking . there camel-hazelcast component, doesn't support lock api. once configure apps participate in hazelcast cluster, just lock api around code need synchronize given object... import com.hazelcast.core.hazelcast; import java.util.concurrent.locks.lock; lock lock = haz...