Posts

jQuery Encrypted API - XML display -

is there way parse xml encrypted api via jquery? need use ajax? have examples? have: http://www.mysite.com/net/webservice.aspx?login=email@email.com& encryptedpassword=xxxxx&edi_name=generic\products& select_columns=p.productcode,pe.productprice this returned xml return , parse table or something: <?xml version="1.0" encoding="iso-8859-1"?> <export> <products_joined> <productcode>product 1</productcode> <productprice>1500</productprice> </products_joined> </export> yes, assuming have access run javascript on server, this: var url = 'http://www.mysite.com/net/webservice.aspx?...'; $.ajax({ type: 'get', url: url, datatype: 'xml', success: function(xml) { var table = $('#mytable-id'); $(xml).find('products_joined').each(function(){ var product = $(this), code = product.find(...

xaml - prevent WPF clipping of Grid content when translated vertically -

i have following xaml displays stack panel of text blocks. because of main grid size, last few items in stack panel naturally clipped. if translate stack panel's parent grid (not main grid) vertically up, stack panel's contents still clipped instead of displaying items @ bottom. how can perform vertical translation on grid without clipping bottom contents of stack panel? the viewbox important - first grid needs size max height of main window or monitor. <window x:class="wpfapplication5.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow"> <viewbox> <grid width="500" height="888" background="#cccccc"> <grid background="#cc99cc"> <grid.rendertransform> <translatetransform y="-...

android - Find best matching routes from GPS data -

i'm making application users can save gps data phone server when travel everyday routes. example heading home work. gps data stored in database. now, user wants know maybe there's more people travels route too. want compare different users routes , give user example 3-5 best matches other users routes. important compare whole trip, because users can join routes , go work starting @ point not beginning , end. think important destination point users view, searching other users routes. other user route must near searchers route end. there 2 factors - time , location. 1 user drives car , walks , takes bus example. 1 walks starts trip earlier, later, because travels route faster. in 1 point @ time routes matching. how can routes compared? there algorithm(s) that? need compare every point in route? essentially talking combination of routing algorithms , traveling-sales-man the common routing algorithm invented dijkstra 50 years ago, , calculate best way of get...

posting page title on the facebook when user clicks on like button in asp.net -

i have button on website, whenever click on button, information posted on facebook wall proper url, issue there no proper page title, , image on facebook wall, want customize information. mean want post page title, coz page title changes every article, , want post image of article on facebook... how can post customize information on facebook on button click. you need include open graph tags on site in order customize title. you <meta property="og:title" content="my title"/> https://developers.facebook.com/docs/opengraph/ make sure include required tags (title, url, site_name, type, image) , include namespaces: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml"> hope helps.

mysql - Deliver rows to JavaScript using JSON -

i'm trying rows of mysql table arrays, haven't found out how correctly till now. appreciate if give me hint. it's very, wrong way i'm doing it, haven't found information regarding json , problem till now. function updatemap(){ var latlngarray = new array(); var titlearray = new array(); var ogvarray = new array(); var mp4array = new array(); var webmarray = new array(); $.getjson('getpoi.php', function(data){ for(var i=0; data.length; i++){ latlngarray[i] = data[i][0]; alert(latlngarray[i]); titlearray[i] = data[i][1]; ogvarray[i] = data[i][2]; mp4array[i] = data[i][3]; webmarray[i] = data[i][4]; } }); } the phpfile: $con = mysql_connect($server,$benutzername,$passwort) or die ("keine verbindung moeglich"); mysql_select_db($datenb...

c# - How do I write a list using BinaryWriter? -

i want use generic writelist(list value) function write list using binarywriter. here code using: public void writelist<t>(list<t> value) { (int = 0; < value.count; i++) { _writer.write(value[i]); } } the error receiving is: error 1 best overloaded method match 'system.io.binarywriter.write(bool)' has invalid arguments error 2 argument 1: cannot convert 't' 'bool' the binaryformatter absolutely not option. if check out docs binarywriter you'll see doesnt accept argument of object ( writes primitive types ), , compiler trying best @ overload, , failing, since can't cast t bool, or else binarwwriter like. you're going have convert object binarywriter work with.

How I check in PHP if a string contains or not specific things? -

i need function in php work in way. $string = "blabla/store/home/blahblah"; if in $string find /store/ this, else that. how can it? thanks! $string = "blabla/store/home/blahblah"; if (preg_match("|/store/|", $string)){ //do } else{ //do } or $string = "blabla/store/home/blahblah"; if (false !== strpos($string, "/store")){ //do } else{ //do }