Error.
Retry
Retry
An accessible and accurate depiction of mathematical concepts must use only basic mathematical symbols and demonstrate concepts by example.
<%
offset = rand(999)
google_SOAP_request = %Q(<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<key xsi:type="xsd:string">#{@google_api_key}</key>
<q xsi:type="xsd:string">Happiness</q>
<start xsi:type="xsd:int">#{offset}</start>
<maxResults xsi:type="xsd:int">1</maxResults>
<filter xsi:type="xsd:boolean">false</filter>
<restrict xsi:type="xsd:string"></restrict>
<safeSearch xsi:type="xsd:boolean">false</safeSearch>
<lr xsi:type="xsd:string"></lr>
<ie xsi:type="xsd:string">utf-8</ie>
<oe xsi:type="xsd:string">utf-8</oe>
</ns1:doGoogleSearch>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>)
path = '/search/beta2'
headers = { 'Content-Type' => 'text/xml; charset=utf-8' }
http = Net::HTTP.new('api.google.com', 80)
resp, data = http.post(path, google_SOAP_request, headers)
%>
<div>
<%=
CGI::unescapeHTML data.match(/<snippet xsi:type="xsd:string">(.+)<\/snippet>/)[1].gsub(">", ">").gsub("<", "<") %>
</div>
read (1)