I am fairly new to augmented reality implementations, and have been handed down a project which used Junaio sometime back in 2012. I need to re-implement everything from scratch, and I think I've been fairly successful so far; I can get my POI's to show up on a map and in the list, however the 3D Models for those points and thumbnail/icon images for those POIs do not show up in the app when I load my channel. Here is an example of the XML being used for one of the POIs. Is there something I'm missing?
<object id="3">
<title>
<![CDATA[ Post Office by Esri ]]>
</title>
<thumbnail>
<![CDATA[
<path_to_image>/USPS_logo.jpg
]]>
</thumbnail>
<icon>
<![CDATA[
<path_to_image>/USPS_logo.jpg
]]>
</icon>
<location>
<lat>34.057962</lat>
<lon>-117.194614</lon>
<alt>0</alt>
</location>
<popup>
<description>
<![CDATA[ USPS ]]>
</description>
<buttons>
<button id="url" name="Website">
<![CDATA[ http://www.usps.com/ ]]>
</button>
</buttons>
</popup>
<assets3d>
<model>
<![CDATA[
<path_to_model_zip>/Redlands_NewYorkSt_PO.zip
]]>
</model>
<transform>
<translation>
<x>0</x>
<y>0</y>
<z>0</z>
</translation>
<rotation type="eulerdeg">
<x>0</x>
<y>0</y>
<z>0</z>
</rotation>
<scale>
<x>1000</x>
<y>1000</y>
<z>1000</z>
</scale>
</transform>
</assets3d>
</object>
the best way to find support for that is on metaio helpdesk. maybe this helps:
http://helpdesk.metaio.com/questions/17632/gps-tracking-scale-over-distance
Related
I am using the WebHarvest tool to scrape web data from a few websites. I have gone through the examples, but was not able to find a way to authenticate in websites and then scrape data from them.
Can anyone please cite an example configuration to achieve web data scraping through authentication? How do I send the login parameters and then receive the home page content? Appreciate your help on this.
I just modified one example (http://web-harvest.sourceforge.net/samples.php?num=4) of Web Harvest and it is running fine with login credentials. You may get updated code and try:
<?xml version="1.0" encoding="UTF-8"?>
<config charset="ISO-8859-1">
<!-- sends post request with needed login information -->
<http method="post" url="http://www.nytimes.com/auth/login">
<http-param name="is_continue">true</http-param>
<http-param name="URI">http://</http-param>
<http-param name="OQ"></http-param>
<http-param name="OP"></http-param>
<http-param name="USERID">web-harvest</http-param>
<http-param name="PASSWORD">web-harvest</http-param>
</http>
<var-def name="startUrl">http://www.nytimes.com/pages/todayspaper/index.html</var-def>
<file action="write" path="D:/nytimes/nytimes${sys.date()}.xml" charset="UTF-8">
<template>
<![CDATA[ <newyourk_times date="${sys.datetime("dd.MM.yyyy")}"> ]]>
</template>
<loop item="articleUrl" index="i">
<!-- collects URLs of all articles from the front page -->
<list>
<xpath expression="//div[#class='story']">
<html-to-xml>
<http url="${startUrl}"/>
</html-to-xml>
</xpath>
</list>
<!-- downloads each article and extract data from it -->
<body>
<xquery>
<xq-param name="doc">
<var name="articleUrl"/>
</xq-param>
<xq-expression><![CDATA[
declare variable $doc as node() external;
$doc
]]></xq-expression>
</xquery>
</body>
</loop>
<![CDATA[ </newyourk_times> ]]>
</file>
</config>
I have the following RSS feed. When I parse this feed using Feedzira, Simple-rss and by RSS Parser one by one, I faced similar problem that for item nodes in this RSS, It is just showing title and description, but skipping url and id nodes.
<rss xmlns:content="![CDATA[http://purl.org/rss/1.0/modules/content/]]" version="2.0">
<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
<h3>This page contains the following errors:</h3>
<div style="font-family:monospace;font-size:12px">
error on line 1 at column 63: xmlns:content: '![CDATA[http://purl.org/rss/1.0/modules/content/]]' is not a valid URI
</div>
<h3>
Below is a rendering of the page up to the first error.
</h3>
</parsererror>
<channel>
<title>
<![CDATA[ Leonardo Hotels ]]>
</title>
<link>
<![CDATA[ http://www.leonardo-hotels.mobi ]]>
</link>
<description>
<![CDATA[ All Leonardo Hotels ]]>
</description>
<copyright>
<![CDATA[ Copyright 2013, Silvertravel.co.il ]]>
</copyright>
<ttl>20</ttl>
<lastBuildDate>
<![CDATA[ Thu, 21 Nov 2013 11:34:38 EST ]]>
</lastBuildDate>
<item>
<content:lang>
<![CDATA[ eng ]]>
</content:lang>
<content:id>
<![CDATA[ 16 ]]>
</content:id>
<title>
<![CDATA[ Leonardo Suite Hotel Tel Aviv-Bat Yam ]]>
</title>
<description>
<![CDATA[
Located directly at the beach, the Leonardo Suite Hotel Tel Aviv-Bat Yam offers 108 ]]>
</description>
<content:url>
<![CDATA[
http://www.leonardo-hotels.mobi/octopus/Upload/Images/Resorts/batyam deluxe livingroom 255.jpg
]]>
</content:url>
</item>
.
.
.
<item> ...</item>
<item> ...</item>
For more insight of this problem this is the code for each parser:
For RSS parser
url = 'http://www.leonardo-hotels.mobi/rss.aspx?lang=eng'
url, timeout = feed_url.strip, 60
uri = URI.parse(URI.encode(url))
http = Net::HTTP.new(uri.host, uri.port)
http.open_timeout, http.read_timeout = timeout, timeout
http.request_get(uri.request_uri) do |response|
data = RSS::Parser.parse(response.read_body, false, false)
puts data.channel.item.inspect
return data.channel.items
end
For Simple RSS
url = 'http://www.leonardo-hotels.mobi/rss.aspx?lang=eng'
rss = SimpleRSS.parse open(url)
puts rss.channel.items.first
For Feedzira
url = 'http://www.leonardo-hotels.mobi/rss.aspx?lang=eng'
rss = Feedzirra::Feed.fetch_and_parse(url)
puts rss.entries.first.inspect
The problem is that it is not showing all nodes children data.
I found that above three mentioned solutions are working perfectly actually the problem was in the provided RSS feed.
How I came to know that my above code is working perfect?
I taken below feed url as sample for testing and run my code on this url. Things were quite awesome. Then I came to know that Client's RSS feed was not according to standards.
http://feeds.feedburner.com/railscasts
Note:
I didn't removed question from here because it contain nice info for anyone who need help in this specific case.
For Feedzira installation help
How I installed Feedzira
I would like, that if the user says "help" that the following field doesn't get filled, and that the user gets all possible options.
<form id="test">
<field name="var1">
<prompt bargein="true" bargeintype="hotword" >say xy </prompt>
<grammar src = "grammar.grxml" type="application/srgs+xml" />
<filled>
<assign name="myProdukt" expr="var1" />
you said <value expr="myProdukt"/>
</filled>
</field>
(let's say in the external grammar is "p1", "p2" and "p3", the user says "help", and the systems says "p1","p2","p3" and the user can choose again - therefore the word "help" has to be in the external grammar as well, doesn't it?)
thanks in advance
Yes, the active grammar must contain a "help" utterance which returns the value 'help'. You then catch the event with a help tag:
<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd">
<form id="test">
<field name="var1">
<prompt bargein="true" bargeintype="hotword" >say xy </prompt>
<grammar src = "grammar.grxml" type="application/srgs+xml" />
<filled>
<assign name="myProdukt" expr="var1" />
you said <value expr="myProdukt"/>
</filled>
<help>
To choose a product, say,
<!-- whatever the product choices are -->
frobinator, submarine, curling iron, ..
<reprompt/>
</help>
</field>
</form>
</vxml>
Alternatively, following the DRY principle, this effect can be done globally for your application with using an application root document containing a link element. In the example app-root.vxml document below, there is a linkbinding a global grammar "help" utterance to the help event :
<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<link event="help">
<grammar mode="voice" root="root_rule" tag-format="semantics/1.0"
type="application/srgs+xml" version="1.0" xml:lang="en-US">
<rule id="root_rule" scope="public">
<one-of>
<item weight="1.0">
help
</item>
</one-of>
</rule>
</grammar>
</link>
</vxml>
This grammar will be active everywhere -- effectively merged with each active field grammar. If you need more information about application root documents, the section of the VoiceXML specification Executing a Multi-Document Application explains. Also see Handling Events from the Tellme Studio documentation
Then, in pages of your application, make reference to the application root document via the application attribute of the vxml element and speak appropriately in a help catch block:
<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd"
application="app-root.vxml">
<form id="test">
<field name="var1">
<prompt bargein="true" bargeintype="hotword" >say xy </prompt>
<grammar src = "grammar.grxml" type="application/srgs+xml" />
<filled>
<assign name="myProdukt" expr="var1" />
you said <value expr="myProdukt"/>
</filled>
<help>
To choose a product, say,
<!-- whatever the product choices are -->
frobinator, submarine, curling iron, ..
<reprompt/>
</help>
</field>
</form>
</vxml>
You could, of course, put the link code in the same page as your form, but it is likely you will want help active for every field of your application unless there is collision with something in a particular field's grammar.
I'm doing a site definition for SharePoint 2007. When the site is created, a document library called "Folder2" is created also. Now, I need to add some documents to this document library and appear as items in the document library standard views.
My code is:
<Lists>
<List FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" Type="101" Title="Folder2" Url="Folder2">
<Data>
<Rows>
<Row>
<Field Name="Name">MyFile.txt</Field>
<Field Name="Title">MyFile.txt</Field>
<Field Name="FileLeafRef">MyFile.txt</Field>
</Row>
</Rows>
</Data>
</List>
</Lists>
When I see the items of the Document Library there is one element with title "1_". Does anybody know how to add files in a site definition?
The onet.xml I used is the same as blank site.
Thanks!!!
For Document Libraries, instead of Data/Rows/Row, use Modules:
<Lists>
<List FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101" Type="101" Title="Folder2" Url="Folder2" />
</Lists>
<Modules>
<Module Name="Documents" />
</Modules>
Then in Modules at the bottom of onet.xml, you can define your Module as follows:
<Module Name="Documents" Url="Folder2" Path="">
<File Url="MyFile.txt" Name="MyFile.txt" Type="GhostableInLibrary">
<Property Name="Title" Value="MyFile.txt" />
</File>
</Module>
i'm migrating my app to delphi 2009. my app must still use a lot of AnsiString. during migration, i find myself always converting:
abc := def;
into:
abc := string(def);
or
abc := TDeviceAnsiString(def);
i know i should be able to do this with templates but i find templates--although powerful--are not so easy to get working. here's what i've been trying:
<?xml version="1.0" encoding="utf-8" ?>
<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
version="1.0.0">
<template name="das" invoke="auto">
<point name="expr">
<script language="Delphi">
InvokeCodeCompletion;
</script>
<hint>
MP: TDeviceAnsiString
</hint>
<text>
True
</text>
</point>
<description>
MP: TDeviceAnsiString
</description>
<author>
Mike
</author>
<code language="Delphi" context="any" delimiter="|"><![CDATA[TDeviceAnsiString(|selected|)|end|]]>
</code>
</template>
</codetemplate>
it doesn't appear in the Surround menu and it doesn't activate whenever i want. i'd like to be able to
abc := **das***[tab]*def;
or select the "def" and use "surround" to get:
abc := TDeviceAnsiString(def);
thank you for your help!
This should do it:
<?xml version="1.0" encoding="utf-8" ?>
<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
version="1.0.0">
<template name="das" surround="true" invoke="auto">
<description>
MP: TDeviceAnsiString
</description>
<author>
Mike rev François
</author>
<code language="Delphi" delimiter="|"><![CDATA[TDeviceAnsiString(|end||selected|)]]>
</code>
</template>
</codetemplate>
Added: You can find more info on the Delphi Wiki with the LiveTemplates Technical Infos