/usr/share/qt5/doc/qtquick/qtquick-demos-tweetsearch-content-tweetsearch-js.html is in qtdeclarative5-doc-html 5.2.1-3ubuntu15.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>tweetsearch.js Example File (demos/tweetsearch/content/tweetsearch.js) | QtQuick 5.2</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.2</li>
<li><a href="qtquick-index.html">Qt Quick</a></li>
<li>tweetsearch.js Example File (demos/tweetsearch/content/tweetsearch.js)</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<h1 class="title">tweetsearch.js Example File</h1>
<span class="small-subtitle">demos/tweetsearch/content/tweetsearch.js</span>
<!-- $$$demos/tweetsearch/content/tweetsearch.js-description -->
<div class="descr"> <a name="details"></a>
<pre class="js">.pragma library
function formatDate(date)
{
var da = new Date(date)
return da.toDateString()
}
function demoToken()
{
var a = new Array(22).join('A')
return a + String.fromCharCode(0x44, 0x69, 0x4a, 0x52, 0x51, 0x41, 0x41, 0x41, 0x41,
0x41, 0x41, 0x74, 0x2b, 0x72, 0x6a, 0x6c, 0x2b, 0x71,
0x6d, 0x7a, 0x30, 0x72, 0x63, 0x79, 0x2b, 0x42, 0x62,
0x75, 0x58, 0x42, 0x42, 0x73, 0x72, 0x55, 0x48, 0x47,
0x45, 0x67, 0x3d, 0x71, 0x30, 0x45, 0x4b, 0x32, 0x61,
0x57, 0x71, 0x51, 0x4d, 0x62, 0x31, 0x35, 0x67, 0x43,
0x5a, 0x4e, 0x77, 0x5a, 0x6f, 0x39, 0x79, 0x71, 0x61,
0x65, 0x30, 0x68, 0x70, 0x65, 0x32, 0x46, 0x44, 0x73,
0x53, 0x39, 0x32, 0x57, 0x41, 0x75, 0x30, 0x67)
}
function linkForEntity(entity)
{
return (entity.url ? entity.url :
(entity.screen_name ? 'https://twitter.com/' + entity.screen_name :
'https://twitter.com/search?q=%23' + entity.text))
}
function textForEntity(entity)
{
return (entity.display_url ? entity.display_url :
(entity.screen_name ? entity.screen_name : entity.text))
}
function insertLinks(text, entities)
{
if (typeof text !== 'string')
return "";
if (!entities)
return text;
// Add all links (urls, usernames and hashtags) to an array and sort them in
// descending order of appearance in text
var links = []
if (entities.urls)
links = entities.urls.concat(entities.hashtags, entities.user_mentions)
else if (entities.url)
links = entities.url.urls
links.sort(function(a, b) { return b.indices[0] - a.indices[0] })
for (var i = 0; i < links.length; i++) {
var offset = links[i].url ? 0 : 1
text = text.substring(0, links[i].indices[0] + offset) +
'<a href=\"' + linkForEntity(links[i]) + '\">' +
textForEntity(links[i]) + '</a>' +
text.substring(links[i].indices[1])
}
return text.replace(/\n/g, '<br>');
}</pre>
</div>
<!-- @@@demos/tweetsearch/content/tweetsearch.js -->
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|