Posts

asp.net - c#.net Error: There is already an open DataReader associated with this Command which must be closed first -

help, new asp.net c#. tried codes once before didn't seems have error. can't seems figure make changes to. sever error : there open datareader associated command must closed first. codes: string strconnectionstring = configurationmanager.connectionstrings["fypdb"].connectionstring; sqlconnection myconnect = new sqlconnection(strconnectionstring); string strcommandtext = "select promoid fypdb.dbo.promotions membershiptype '%' + @membership + '%' , defaults '%' + @defaults + '%'"; try { string ddlmembership = ((dropdownlist)dvinsertpromotion.findcontrol("ddladdmembershiplist")).selecteditem.tostring(); string ddldefault = ((radiobuttonlist)dvinsertpromotion.findcontrol("radiobuttonlist2")).text.tostring(); dataset da = dal.retrievemembership(ddlmembership, ddldefault); sitegridview.datasource = da; sitegridview.databind(); sqlcommand cmd = new sqlcommand(strcommandtext...

Image.open() cannot identify image file in python script file -

i trying execute script from pil import image im = image.open("image.jpg") nx, ny = im.size it working fine when run in python shell pytesser_v0.0.1]#env python >>> pil import image >>> im = image.open("image.jpg") <pil.jpegimageplugin.jpegimagefile image mode=rgb size=46x24 @ 0x7fa4688f16d0> but when put in test.py file , run python test.py getting error file "test1.py", line 17, in <module> im = image.open("image.jpg") file "/usr/local/python.2.7.11/lib/python2.7/site-packages/pil/image.py", line 2309, in open % (filename if filename else fp)) ioerror: cannot identify image file 'image.jpg' please me issue, thanks ps: earlier installed pil imaging-1.1.7 setup.py, later installed pillow, think problem in mutual presence of pil , pillow library on machine. make sure "image.jpg" in same directory "test1.py". if isn't either move it, or p...

php - Apply htmlentities to stripped tags -

researched links: how apply htmlentities selectively? , php function strip tags, except list of whitelisted tags , attributes they close not expected. what have tried? <?php define('charset', 'utf-8'); define('replace_flags', ent_html5); function htmlcleaned($string) { $string = htmlentities($string); return str_replace( array("&lt;i&gt;", "&lt;b&gt;", "&lt;/i&gt;", "&lt;/b&gt;", "&lt;p&gt;", "&lt;/p&gt;"), array("<i>", "<b>", "</i>", "</b>", "<p>", "</p>"), $string); } echo htmlcleaned("<p>how you?</p><p><b>this bold</b></p><p><i>this italic</i></p><p><u>this underline</u></p><p><br></p><ul><li>this list item 1...

Import WSO2 Identity Server default schemas into OpenLDAP -

i'm trying set wso2 identity server openldap primary user store. add idp embedded apacheds schemas': wso2person, identityperson , scimperson openldap not able import neither schema nor wso2person, identityperson , scimperson ldif files. can provide example regarding how achive goal? i trying import files new openldap on ubuntu server 16 lts using apacheds studio or other ldap clients every time try import files error thrown. i.e.: launching sudo ldapadd -q -y external -h ldapi:/// -f ou\=schema.ldif the server responds: server in unwilling perform (53) no global superior knowledge or, trying import wso2person.ldif ldapadd -d ldap:/// -d "cn=admin,dc=example,dc=org" -x -w -f wso2person.ldif the following error thrown: invalid syntax (21) additional info: attributetypes: value #0 invalid per syntax it not necessary use wso2person schema. can use of schemas supported external ldap (for ex: inetorgperson). thing have claim mapping ...

php - ifconfig parameter with store condition -

in magento xml layut or config file can write ifconfig parameter in tag apply condition this <action method="addlink" translate="label title" module="contacts" ifconfig="contacts/contacts/enabled"> <label>contact us</label> <url>contacts</url> <title>contact us</title> <prepare>true</prepare> </action> i trying find ifconfig alternative of function mage::getstoreconfig($path,mage::app()->getstore()); so can include store condition along path in ifconfig. appreciated. there no built in way that, because ifconfig constraint used current store. when calling mage::getstroreconfig() 1 parameter current store used second parameter. , layout loaded current store. if insist, here possible idea on how it. action tags in layout parsed , applied in method mage_core_model_layout::_generateaction() . piece of code checks ifconfig attribute. if (isset($node['ifc...

windows - How to delete recent opened file session on Visual Studio Code? -

i opened few files during coding (both files in project , out project). after that, close few in (by ctrl+w , click 'x' button). when type ctrl+tab , see opened files. i try restart vscode, restart windows nothing change. how close unnecessary files? i use vs code 1.0 + windows 10. edit: feature added in new versions i mistaken don't want delete, "clear" opened files. if case, follow these steps in regards vs code version 1.15.0: press ctrl + p then, within quick open bar, type in >clear opened press enter , restart visual studio code, , should see nothing under recent .

Normalization data and show NA in R -

i try normalized data in r, , show n/a actually. data before normalization data after normalization is data small? or problem? have research , found add na.rm=t , can put? normalized <-function(x) {(x-min(x,na.rm=t))/(max(x,na.rm=t)-min(x,na.rm=t))} if that, found outcome positive. thanks answering.