Posts

Paypal C# Return Url -

i have c# mvc (using umbraco) site need submit payment through paypal. have setup sandbox merchant , buyer account. able submit payment , working there. however, site needs know when payment has completed send email , database operations, , here i'm having problem. cannot paypal auto return site. need return url be: http://localhost:56733/payment-confirmation this not duplicate of question: setting paypal return url , making auto return? i using c#, not php. also, trying run locally. solutions listed on above question not work. behavior , results same. i screen shows following: you completed payment. xxxx, completed payment. transaction id payment is: xxxxxxxxxxxxx. we'll send confirmation email xx@xxxx.com. transaction appear on statement paypal. go paypal account overview it not recommended handle post-payment processing on return url. auto-return enabled there no guarantee user make there, , if don't, code never run , you'll end tas...

PHP - Parsing invalid XML and outputting to own xml document -

trying figure out effective way parse invalid xml (in php). the element i'm attempting parse contains nested that'd output own xml doc. i've tried simple xml, continuously running errors. tried using dom , seems work well, resulted in being able output text. appreciated. sample xml: <?xml version="1.0" encoding="utf-8"?> <server_name> <creative> <content><vast xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" version="2.0" xsi:nonamespaceschemalocation="vast.xsd"> <ad id="222296909"> <inline> <adsystem version="2.0">dart_dfa</adsystem> <adtitle>in-stream video</adtitle> <description>parisian love - updated</description> <survey/> <impression id="dart"> <![cdata[ http://ad.doubleclick.net/imp;v7;x;222296909;0-0;0;45922216;0/0;35460632/35478450/2;;~cs=s%3fhttp://s0.2mdn.net/dot....

ios - Replace some contents of NSMutableDictionary with another NSMutableDictionary -

i having 2 nsmutabledictionaries each has 5 nsarrays inside, these 2 nsmutabledictionaries have excactly same 5 keys , nsarrays different content, i need replace 2 arrays arrays of other nsmutabledictionary dic1 = dic2; //isn't solution...will replace contents of 1 other... i need can replace object of specific key other same key. i tried [dic1 setobject:[dic2 objectforkey:@"key1"] forkey:@"key1"]; [dic1 setobject:[dic2 objectforkey:@"key2"] forkey:@"key2"]; and error: attempt insert nil value (key: key1)' the error means [dic2 objectforkey:@"key1"] returning nil value. in other words, key not exist in dictionary. likewise, can't set nil value inside of nsdictionary, thats why error sent out. print out each of dictionaries , ensure keys/values expect. can use nslog or pause program breakpoint, , enter po dic1 in console.

excel - I want to enter todays date in cell Z2 if any cell between A2 and Y2 are altered -

this recording date of alteration record in spreadsheet containing many thousand records. appreciate suggestions may have; can think of no way formula, if possible, prefer on macro. thank you. although specify row 2 in question, mention thousands of rows, assume want macro work rows, not row 2. following add date stamp column z in row change occurred. works if multiple cells changed @ same time, example paste or delete operation. option explicit private sub worksheet_change(byval target range) dim cel range if not intersect(target, [a:y]) nothing on error resume next application.enableevents = false each cel in target range("z" & cel.row).value = date next cel application.enableevents = true end if end sub to install, right-click sheet tab, click view code , paste above code window.

mysql - Importing XML and Skipping Errors (PHP) -

i have cron job runs each night update our stock system (from external source) via multiple xml files. however, case, errors appear in xml (nothing can - 3rd party provides this). when error occur, script comes stop , no more files processed. there way if error encountered, remaining files still imported? here code: <?php include 'connect.php'; $sql = "delete stock allow_keep!='1'"; mysql_query($sql); //clear stock table loop through , add active users $query = "select * users active='1'"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)){ $xml = simplexml_load_file(“users/xml_file_”.$row['id'].".xml"); foreach($xml->children() $child) { $myquery="replace stock set stockid='" . $child->stockid . "', make='" . addslashes($child->make) . "', model='" . addslashes($child->model) . "', image='" . ...

html - Move a nav which is inside a header to the right side -

i have nav inside header , wanted move nav right side of page. tried float:right not lined anymore header. here code: <header> <nav> <h1>my page</h1> <ul> <a href="#"><li>home</li></a> <a href="#"><li>blog</li></a> <a href="#"><li>about</li></a> <a href="#"><li>contact</li></a> <a href="#"><li>links</li></a> </ul> </nav> header{ background:#999; color:white; padding:15px 15px 0 15px; } header h1{ margin:0; display:inline; } nav ul{ margin:0; display:inline; padding:0 0 0 15px; } nav ul li{ background:black; color:white; display:inline-block; list-style:none; padding:5px 15px; } all need add inline-block properties nav , header elements. add width:100% header full size. of course don't forget ...

javascript - Three.js 3D cube spins faster and faster when re-initializing -

i trying understand this: first three.js example spinning 3d cube spins faster , faster every time re-initialized. the code has init function sets scene , animate function starts animation loop. if repeatedly call init , animate , expect cube reset instead cube spinning faster , faster every time it re-initialized. why happening? isn't object being re-initialized? is feature of three.js or javascript? here js fiddle shows i'm talking about. have set re-initialize every 2 seconds: http://jsfiddle.net/1hq2eslr/ (tested in firefox , chrome) here full code: var camera, scene, renderer, geometry, material, mesh; function init() { scene = new three.scene(); camera = new three.perspectivecamera( 75, window.innerwidth / window.innerheight, 1, 10000 ); camera.position.z = 1000; geometry = new three.boxgeometry( 200, 200, 200 ); material = new three.meshbasicmaterial( { color: 0xff0000, wireframe: true } ); mesh = new three.mesh( geo...