Jump to content

Search the Community

Showing results for tags 'key'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 5 results

  1. I got the code below from W3Schools tutorial on Google maps. I also received an API code from google. When I try to put this on my site I get an error message in what looks like an iframe. I think I am suppose to do something additional with my api code. Google had me set a project name and then just generated a code. I don't know if I am suppose to do something besides generate that code in order for it to work for the specific map I want on my site. Can anyone tell me something obivous I am doing wrong or something that I still need to do on google? <script> function myMap() { var mapProp= { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); } </script> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyARr9stC0XnoFmg2DEqjj5U8sTC_nkvg0A&q&callback=myMap"></script> <iframe width="450" height="250" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/search?AIzaSyARr9stC0XnoFmg2DEqjj5U8sTC_nkvg0A&q=Wayne+State+University" allowfullscreen> </iframe>
  2. How to get an array index by its value (key)? Is there a special function for that in PHP? For example, I have an array $a ["zero","one","two"] and a variable $b = "two", I know the value is in the array, but I don't know its index.
  3. j.silver

    Index vs Key

    Dear all, I am trying to dig into the exact difference between key and index in MySQL tables. Some say they are synonymous, others give some differences. I still don't feel confident enough to decide when to use each on a table. I would appreciate if someone well-versed in their difference explain such difference and when to use each. Thanks.
  4. I need to loop through an array, in the order that the items appear, and get both the key of the item and its value. I know I can use foreach to loop through an array but as far as I know I can choose between the key and the value of the current item but not get both. Here's an example of an array: <?php$SampleArray = array(55 => "car","2" => "house","boat" => "boat",0 => "engine",666 => "website",);?> It would work somehow like this: loop($SampleArray){ echo key . " - " value . "n";} And the result would be something like:55 - car 2 - house boat - boat 0 - engine 666 - website
  5. Here is my xml: <?xml version='1.0' encoding='UTF-8'?><wd:Report_Data xmlns:wd="urn:com.workday.report/CR-INT034-ADP-Garnishment_Disbursements_File-Outbound2"> <wd:Report_Entry> <wd:field>1111</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>2222</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>3333</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>2222</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>3333</wd:field> </wd:Report_Entry> <wd:Report_Entry> <wd:field>1111</wd:field> </wd:Report_Entry></wd:Report_Data> Here is the xslt I am using: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:wd="urn:com.workday.report/CR-INT034-ADP-Garnishment_Disbursements_File-Outbound2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="2.0"><xsl:strip-space elements="*"/><xsl:output indent="no" method="text" /> <xsl:key name="entry" match="wd:Report_Entry" use="wd:field" /> <xsl:template match="wd:Report_Data"> <xsl:value-of select="count(wd:Report_Entry | wd:field[ generate-id() = generate-id(key('entry', wd:field))])"/> </xsl:template> </xsl:stylesheet> I am trying to count the unique values. So in the example above, the answer should be 3 and I am getting 6. I can get this to work in 1.0 with the following code: <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:wd="urn:com.workday.report/CR-INT034-ADP-Garnishment_Disbursements_File-Outbound2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="1.0"><xsl:strip-space elements="*"/><xsl:output indent="no" method="text" /> <xsl:key name="entry" match="wd:Report_Entry" use="wd:field" /> <xsl:template match="wd:Report_Data"> <xsl:value-of select="count(wd:Report_Entry [ generate-id() = generate-id(key('entry', wd:field))])"/> </xsl:template> </xsl:stylesheet> But I can't use 1.0 I have to use 2.0. Is there any way to get this to work in 2.0 or am I just out of luck? Any help would greatly be appreciated! Thanks,Sarah
×
×
  • Create New...