Search Results

Search found 4 results on 1 pages for 'samb09'.

Page 1/1 | 1 

  • How to generate link with XSLT

    - by SamB09
    Hi i've made a php webservice that returns some xml which is transformed into html by an XML file i have . But i want to be able to click on each returned item to get more details about that item. <a href="item.php?id=<?php echo $itemid"?>"> <?php echo $itemname"?> </a> Recently i did the same thing but in PHP, ive tried to use this in XSLT but it doesn't work.

    Read the article

  • Android maps out of memory error

    - by SamB09
    Hi , sometimes when running a google maps program with an overlay image i will receive a bit map out of memory error. It always seems to be at a random point in the app. Im not sure how to solve this. Anyone have any ideas ? My overlay code is below , im not sure if you need to see the class its called in though? public class MyOverlay2 extends Overlay { private static final double MAX_TAP_DISTANCE_KM = 3; // Rough approximation - one degree = 50 nautical miles private static final double MAX_TAP_DISTANCE_DEGREES = MAX_TAP_DISTANCE_KM * 0.5399568 * 50; private final GeoPoint gPoint; private final Context cont; private final int draw; // private final int lat; public MyOverlay2(Context cont, GeoPoint gPoint1, int draw) { // constructor will be called in the userLocation class to draw an overly image this.cont = cont; this.gPoint = gPoint1; this.draw = draw; } @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { // constructor takes 3 arguments super.draw(canvas, mapView, shadow); // Convert geo coordinates to screen pixels Point screenPoint = new Point(); mapView.getProjection().toPixels(gPoint, screenPoint); //Read the image from the xml resource using a bitmap factory BitmapFactory.Options options=new BitmapFactory.Options(); options.inSampleSize = 1; Bitmap preview_bitmap=BitmapFactory.decodeResource(cont.getResources(),R.drawable.monday12,options); //draw the image at the location specified by the co-ordinates canvas.drawBitmap(preview_bitmap, screenPoint.x - preview_bitmap.getWidth() /2, screenPoint.y - preview_bitmap.getHeight()/2 , null); // get the images height and width values divided by two draw the image at the specified screen points return true; } @Override public boolean onTap(GeoPoint s, MapView mapView) { // Handle tapping on the overlay here return true; } }

    Read the article

  • Call asp.net web service from php

    - by SamB09
    Hi im calling an aps.net web service from a php service. The service searches both databases with a search parameter. Im not sure how to pass a search parameter to the asp.net service. Code is below. ( there is no search paramter currently but im just interested in how it would be passed to the asp.net service) $link = mysql_connect($host, $user, $passwd); mysql_select_db($dbName); $query = 'SELECT firstname, surname, phone, location FROM staff ORDER BY surname'; $result = mysql_query($query,$link); // if there is a result if ( mysql_num_rows($result) > 0 ) { // set up a DOM object $xmlDom1 = new DOMDocument(); $xmlDom1->appendChild($xmlDom1->createElement('directory')); $xmlRoot = $xmlDom1->documentElement; // loop over the rows in the result while ( $row = mysql_fetch_row($result) ) { $xmlPerson = $xmlDom1->createElement('staff'); $xmlFname = $xmlDom1->createElement('fname'); $xmlText = $xmlDom1->createTextNode($row[0]); $xmlFname->appendChild($xmlText); $xmlPerson->appendChild($xmlFname); $xmlSname = $xmlDom1->createElement('sname'); $xmlText = $xmlDom1->createTextNode($row[1]); $xmlSname->appendChild($xmlText); $xmlPerson->appendChild($xmlSname); $xmlTel = $xmlDom1->createElement('phone'); $xmlText = $xmlDom1->createTextNode($row[2]); $xmlTel->appendChild($xmlText); $xmlPerson->appendChild($xmlTel); $xmlLoc = $xmlDom1->createElement('loc'); $xmlText = $xmlDom1->createTextNode($row[3]); $xmlLoc->appendChild($xmlText); $xmlPerson->appendChild($xmlLoc); $xmlRoot->appendChild($xmlPerson); } } // // instance a SOAP client to the dotnet web service and read it into a DOM object // (this really should have an exception handler) // $client = new SoapClient('http://stuiis.cms.gre.ac.uk/mk05/dotnet/dataBind01/phoneBook.asmx?WSDL'); $xmlString = $client->getDirectoryDom()->getDirectoryDomResult->any; $xmlDom2 = new DOMDocument(); $xmlDom2->loadXML($xmlString); // merge the second DOM object into the first foreach ( $xmlDom2->documentElement->childNodes as $staffNode ) { $xmlPerson = $xmlDom1->createElement($staffNode->nodeName); foreach ( $staffNode->childNodes as $xmlNode ) { $xmlElement = $xmlDom1->createElement($xmlNode->nodeName); $xmlText = $xmlDom1->createTextNode($xmlNode->nodeValue); $xmlElement->appendChild($xmlText); $xmlPerson->appendChild($xmlElement); } $xmlRoot->appendChild($xmlPerson); } // return result echo $xmlDom

    Read the article

  • linq join query

    - by SamB09
    Hi, im trying to do a join in linq , however for some reason i cant access the primary key of a table. It's the 'h.ProjectId' that doesn't seem to be accepted. The following error is given CW1.SearchWebService.Bid does not contain a definition for 'ProjectId' and no extention method 'ProjectId' accepting a first argument of type 'CW1SearchWebService.Bid' var allProjects = ctxt.Project.ToList() ; var allBids = ctxt.Bid.ToArray();// return all bids var projects = (from project in allProjects join h in allBids on project.ProjectId equals h.ProjectId

    Read the article

1