pages/google-bard-programuje.html
2024-02-01 20:04:14 +01:00

75 lines
No EOL
18 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="cs"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Google Bard programuje - NoLog</title><meta name="description" content="&lt;?php // Importuj knihovnu pro práci s JSON //require 'json.php'; // Vytvoř URL adresu pro požadavek $url = 'https://witter.cz/api/v1/accounts/110687031564474645/statuses'; // Proveď požadavek $response =&hellip;"><meta name="generator" content="Publii Open-Source CMS for Static Site"><link rel="stylesheet" href="https://jsem.nudista.online/media/plugins/syntaxHighlighter/prism-black.css"><link rel="canonical" href="https://jsem.nudista.online/google-bard-programuje.html"><link rel="alternate" type="application/atom+xml" href="https://jsem.nudista.online/feed.xml"><link rel="alternate" type="application/json" href="https://jsem.nudista.online/feed.json"><meta property="og:title" content="Google Bard programuje"><meta property="og:image" content="https://jsem.nudista.online/media/website/logo-2.svg"><meta property="og:image:width" content="204"><meta property="og:image:height" content="92"><meta property="og:site_name" content="NoLog"><meta property="og:description" content="&lt;?php // Importuj knihovnu pro práci s JSON //require 'json.php'; // Vytvoř URL adresu pro požadavek $url = 'https://witter.cz/api/v1/accounts/110687031564474645/statuses'; // Proveď požadavek $response =&hellip;"><meta property="og:url" content="https://jsem.nudista.online/google-bard-programuje.html"><meta property="og:type" content="article"><link rel="shortcut icon" href="https://jsem.nudista.online/media/website/favicon.ico" type="image/x-icon"><link rel="preload" href="https://jsem.nudista.online/assets/dynamic/fonts/publicsans/publicsans.woff2" as="font" type="font/woff2" crossorigin><link rel="stylesheet" href="https://jsem.nudista.online/assets/css/style.css?v=df6e0dd7b95ea201317f082730fc6b90"><script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://jsem.nudista.online/google-bard-programuje.html"},"headline":"Google Bard programuje","datePublished":"2024-01-31T03:00","dateModified":"2024-01-31T15:34","image":{"@type":"ImageObject","url":"https://jsem.nudista.online/media/website/logo-2.svg","height":92,"width":204},"description":"&lt;?php // Importuj knihovnu pro práci s JSON //require 'json.php'; // Vytvoř URL adresu pro požadavek $url = 'https://witter.cz/api/v1/accounts/110687031564474645/statuses'; // Proveď požadavek $response =&hellip;","author":{"@type":"Person","name":"Software","url":"https://jsem.nudista.online/aktivity/software/"},"publisher":{"@type":"Organization","name":"Nudismus","logo":{"@type":"ImageObject","url":"https://jsem.nudista.online/media/website/logo-2.svg","height":92,"width":204}}}</script><noscript><style>img[loading] {
opacity: 1;
}</style></noscript><style>:root {--toc-max-height: auto;}html {scroll-padding-top: 2rem;}.post__toc h3{align-items: center;border: none;cursor: pointer;display: inline-flex;gap: .5em;margin: 0;padding: 0;user-select: none;}.post__toc > ol {margin-left: 0;max-height: 0;overflow: auto;opacity: 0;transition: opacity 0.3s ease-out, max-height 0.5s ease-out;}.post__toc > ol[aria-hidden="false"] {max-height: var(--toc-max-height);opacity: 1;transition: opacity 0.3s ease-in, max-height 0.5s ease-in;}.post__toc ol {counter-reset: item;list-style: none;}.post__toc li {padding-left: 0;padding-bottom: 0;}.post__toc ol ol {margin-left: 1.5rem;margin-top: 0;}.post__toc ol ol li::before {margin-left: 0;}.post__toc a {align-items: stretch;color: var(--toc-link-color, var(--link-color));display: inline-flex;flex-wrap: nowrap;}.post__toc a:hover, .post__toc a:active, .post__toc a:focus {color: var(--toc-link-color-hover, var(--link-color-hover));}.post__toc a::before {content: counters(item, ".", decimal) ". ";counter-increment: item;color: var(--toc-number-color, var(--text-color));display: inline-block;flex-grow: 0;flex-shrink: 0;margin-right: 0.2em;}.post__toc-toggle {background: none;border: none;border-radius: 0;box-shadow: none;color: var(--toc-toggle-link-color, var(--color));cursor: pointer;display: inline;font-weight: normal;overflow: visible;padding: 0;text-align: left;text-decoration: none;text-transform: none;vertical-align: baseline;will-change: unset;}.post__toc-toggle:hover, .post__toc-toggle:active, .post__toc-toggle:focus {background: inherit;border: inherit;box-shadow: inherit;color: var(--toc-toggle-link-color-hover, var(--color, inherit));text-decoration: none;transform: inherit;}.post__toc-toggle::before{content: "[";color: var(--toc-toggle-color, var(--text-color));}.post__toc-toggle::after {content: "]";color: var(--toc-toggle-color, var(--text-color));}</style><noscript><style>.post__toc > ol {max-height: var(--toc-max-height);opacity: 1;transition: none;}.post__toc h3{cursor: default;}</style></noscript><style>.fi{fill:none;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}</style></head><body><div class="content"><div class="left-bar"><div class="left-bar__inner"><header class="header"><a class="logo" href="https://jsem.nudista.online/"><img src="https://jsem.nudista.online/media/website/logo-2.svg" alt="NoLog" width="204" height="92"></a><nav class="navbar"><button class="navbar__toggle" aria-label="Menu" aria-haspopup="true" aria-expanded="false"><span class="navbar__toggle__box"><span class="navbar__toggle__inner">Menu</span></span></button><ul class="navbar__menu"><li><a class="tltp" href="https://jsem.nudista.online/" target="_self" aria-label="Domů"><svg class="fi fi-home" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#home"/></svg> <span>Domů</span></a></li><li><a class="tltp" href="https://jsem.nudista.online/publikum/" target="_self" aria-label="Publikum"><svg class="fi fi-tag" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#tag"/></svg> <span>Publikum</span></a></li><li><a class="tltp" href="https://code.nolog.cz/nudista/main.git" target="_blank" aria-label="Repozitář"><svg class="fi fi-code" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#code"/></svg> <span>Repozitář</span></a></li><li><a class="tltp" href="https://" target="_self" aria-label="Televize"><svg class="fi fi-tv" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#tv"/></svg> <span>Televize</span></a></li><li><a class="tltp" href="https://jsem.nudista.online/feed.xml" target="_self" aria-label="RSS"><svg class="fi fi-rss" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#rss"/></svg> <span>RSS</span></a></li><li><a class="tltp" href="https://jsem.nudista.online/feed.json" target="_self" aria-label="JSON"><svg class="fi fi-hash" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#hash"/></svg> <span>JSON</span></a></li></ul></nav><a class="logo logo--atbottom" href="./"><img src="https://jsem.nudista.online/media/website/logo-2.svg" alt="NoLog" width="204" height="92"></a></header></div></div><main class="main"><article class="post"><div class="post__meta post__meta--attop"><div class="post__meta--attop__inner"><div class="post__maintag"><svg width="20" height="20" aria-hidden="true" focusable="false"><use xlink:href="https://jsem.nudista.online/assets/svg/svg-map.svg#tag"/></svg> Zveřejněno pro cílovou zemi: <a href="https://jsem.nudista.online/publikum/cz/" class="metadata__maintag">🇨🇿 CZ</a></div></div></div><div class="main__inner"><div class="post__meta"><div class="post__author"><img src="https://www.gravatar.com/avatar/153f1792a2575477faab9e0cc15eec39?s&#x3D;240" loading="lazy" height="240" width="240" alt="Software" class="post__author__avatar"><div><a href="https://jsem.nudista.online/aktivity/software/" class="post__author__name">Software</a></div></div><div class="post__date"><time datetime="2024-01-31T03:00">led 31, 2024</time></div></div><header class="post__header"><h1 class="post__title">Google Bard programuje</h1><p class="post__lead">Zadal jsem umělé inteligenci úkol, naprogramovat script v PHP pro parsování JSON</p></header><div class="post__entry"><p><code>&lt;?php<br><br>// Importuj knihovnu pro práci s JSON<br>//require 'json.php';<br><br>// Vytvoř URL adresu pro požadavek<br>$url = 'https://witter.cz/api/v1/accounts/110687031564474645/statuses';<br><br>// Proveď požadavek<br>$response = file_get_contents($url);<br><br>// Dekóduj JSON data<br>$data = json_decode($response, true);<br><br>// Vytvoř HTML5 kontejner<br>echo '&lt;div class="statuses"&gt;';<br><br>// Projděte všechna data<br>foreach ($data as $status) {<br><br>    // Vytvoř HTML5 tweet<br>    echo '&lt;div class="tweet"&gt;';<br><br>    // Vytiskněte text tweetu (default text)<br>    echo '&lt;p class="text"&gt;' . $status['content'] . '&lt;/p&gt;';<br><br>    // Vytiskněte datum a čas tweetu<br>    echo '&lt;p class="time"&gt;' . $status['created_at'] . '&lt;/p&gt;';<br><br>    // Vytiskněte počet lajků<br>    if($status['sensitive'] == "1"){<br>    $mature = 'NSFW';<br>    } else {<br>    $mature = 'OK';<br>    }<br>    echo '&lt;p class="likes"&gt;' . $mature . ' lajků&lt;/p&gt;';<br><br>    // Vytiskněte počet retweetů<br>    echo '&lt;p class="retweets"&gt;' . $status['retweets'] . ' retweetů&lt;/p&gt;';<br><br>    // Zavřete HTML5 tweet<br>    echo '&lt;/div&gt;';<br>}<br><br>// Zavřete HTML5 kontejner<br>echo '&lt;/div&gt;';<br>?&gt;</code></p></div><footer class="post__footer"><div class="post__last-updated">Tento příspěvek byl aktualizován dne: <time datetime="2024-01-31T15:34">led 31, 2024</time></div><div class="post__share"><a href="https://twitter.com/intent/tweet?url=https%3A%2F%2Fjsem.nudista.online%2Fgoogle-bard-programuje.html&amp;via=NoLog&amp;text=Google%20Bard%20programuje" class="js-share twitter tltp tltp--top" aria-label="Twitter" rel="nofollow noopener noreferrer"><svg><use xlink:href="https://jsem.nudista.online/assets/svg/svg-map.svg#twitter"/></svg> <span>Twitter</span></a></div></footer></div></article></main><div class="right-bar"><div class="right-bar__inner"><div class="sidebar"><section class="box featured"><h3 class="box__title"><svg class="fi fi-award" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#award"/></svg> Doporučuji:</h3><ul class="featured__container"><li class="featured__item"><div><a href="https://jsem.nudista.online/plan-na-migraci-z-micro-blogu.html" class="featured__title">Plán na migraci z Micro Blogu</a> <time class="featured__meta" datetime="2024-01-30T19:38">led 30, 2024</time></div></li><li class="featured__item"><a href="https://jsem.nudista.online/ice-girls-ai.html" class="featured__image"><img src="https://jsem.nudista.online/media/posts/1/responsive/upscaled_image-xs.png" loading="lazy" alt="" height="3360" width="3360"></a><div><a href="https://jsem.nudista.online/ice-girls-ai.html" class="featured__title">Ice Girls AI</a> <time class="featured__meta" datetime="2024-01-30T19:34">led 30, 2024</time></div></li></ul></section><section class="box authors"><h3 class="box__title"><svg class="fi fi-edit" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#edit"/></svg> Aktivity:</h3><ul class="authors__cotainer"><li class="authors__item"><a href="https://jsem.nudista.online/aktivity/nudismus/" class="authors__image"><img src="https://jsem.nudista.online/media/website/kv-cz-2.svg" loading="lazy" alt="Nudismus" height="512" width="512" class="authors__img"></a><div><a href="https://jsem.nudista.online/aktivity/nudismus/" class="authors__title">Nudismus</a> <span class="authors__meta">Příspěvky: 2</span></div></li><li class="authors__item"><a href="https://jsem.nudista.online/aktivity/redakce/" class="authors__image"><img src="https://www.gravatar.com/avatar/153f1792a2575477faab9e0cc15eec39?s&#x3D;240" loading="lazy" alt="Redakce" height="240" width="240" class="authors__img"></a><div><a href="https://jsem.nudista.online/aktivity/redakce/" class="authors__title">Redakce</a> <span class="authors__meta">Příspěvky: 1</span></div></li><li class="authors__item"><a href="https://jsem.nudista.online/aktivity/software/" class="authors__image"><img src="https://www.gravatar.com/avatar/153f1792a2575477faab9e0cc15eec39?s&#x3D;240" loading="lazy" alt="Software" height="240" width="240" class="authors__img"></a><div><a href="https://jsem.nudista.online/aktivity/software/" class="authors__title">Software</a> <span class="authors__meta">Příspěvky: 2</span></div></li><li class="authors__item"><a href="https://jsem.nudista.online/aktivity/tvorba/" class="authors__image"><img src="https://www.gravatar.com/avatar/153f1792a2575477faab9e0cc15eec39?s&#x3D;240" loading="lazy" alt="Tvorba" height="240" width="240" class="authors__img"></a><div><a href="https://jsem.nudista.online/aktivity/tvorba/" class="authors__title">Tvorba</a> <span class="authors__meta">Příspěvky: 1</span></div></li></ul></section><section class="box tags"><h3 class="box__title"><svg class="fi fi-message-square" width="24px" height="24px" stroke="currentColor" stroke-width="2"><use href="https://jsem.nudista.online/media/plugins/featherIcons/feather-sprite.svg#message-square"/></svg> Publikum:</h3><ul class="tags__list"><li class="tags__item"><a href="https://jsem.nudista.online/publikum/cz/" class="btn btn--gray">🇨🇿 CZ <sup>(5)</sup></a></li><li class="tags__item"><a href="https://jsem.nudista.online/publikum/de/" class="btn btn--gray">🇩🇪 DE <sup>(0)</sup></a></li><li class="tags__item"><a href="https://jsem.nudista.online/publikum/es/" class="btn btn--gray">🇪🇸 ES <sup>(0)</sup></a></li><li class="tags__item"><a href="https://jsem.nudista.online/publikum/fr/" class="btn btn--gray">🇫🇷 FR <sup>(0)</sup></a></li><li class="tags__item"><a href="https://jsem.nudista.online/publikum/uk/" class="btn btn--gray">🇬🇧 UK <sup>(1)</sup></a></li></ul></section><div class="box follow"><a href="https://twitter.com/NudistaOnline" class="tltp tltp--top" aria-label="Twitter"><svg><use xlink:href="https://jsem.nudista.online/assets/svg/svg-map.svg#twitter"/></svg> <span>Twitter</span></a></div></div></div></div></div><script defer="defer" src="https://jsem.nudista.online/assets/js/scripts.min.js?v=12d8fcd46db8fdc7af6797ec26849875"></script><script>var images = document.querySelectorAll('img[loading]');
for (var i = 0; i < images.length; i++) {
if (images[i].complete) {
images[i].classList.add('is-loaded');
} else {
images[i].addEventListener('load', function () {
this.classList.add('is-loaded');
}, false);
}
}</script><script defer="defer" src="https://jsem.nudista.online/assets/js/quicklink.umd.js?v=a52ee49fe4afff274f8c30fe880ddc13"></script><script>window.addEventListener('load', () =>{
quicklink.listen();
});</script><script>(function() {
let collapsibleTOCItems = document.querySelectorAll(".post__toc h3");
collapsibleTOCItems.forEach(function(item, index) {
let subList = item.nextElementSibling;
let parentItem = item.parentElement;
let toggleButton;
if (subList && subList.tagName === "OL") {
let defaultState = 'false';
parentItem.setAttribute('aria-expanded', defaultState);
subList.setAttribute('aria-hidden', defaultState === 'true' ? 'false' : 'true');
item.setAttribute('id', 'sublist-' + index);
item.setAttribute('tabindex', '0');
const toggleElement = "both";
if (toggleElement === "header" || toggleElement === "both") {
item.addEventListener('click', function(event) {
event.preventDefault();
toggleSubList(this, toggleButton);
});
item.addEventListener('keydown', function(event) {
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault();
toggleSubList(this, toggleButton);
}
});
}
if (toggleElement === "button" || toggleElement === "both") {
toggleButton = item.querySelector('.post__toc-toggle');
toggleButton.textContent = defaultState === 'true' ? 'hide' : 'show';
toggleButton.addEventListener('click', function(event) {
event.stopPropagation();
event.preventDefault();
toggleSubList(item, toggleButton);
});
}
}
});
function toggleSubList(element, button) {
let parentItem = element.parentElement;
let subList = parentItem.querySelector('ol');
if (subList) {
if (parentItem.getAttribute('aria-expanded') === 'true') {
parentItem.setAttribute('aria-expanded', 'false');
subList.setAttribute('aria-hidden', 'true');
} else {
parentItem.setAttribute('aria-expanded', 'true');
subList.setAttribute('aria-hidden', 'false');
}
}
if (button) {
button.textContent = parentItem.getAttribute('aria-expanded') === 'true' ? 'hide' : 'show';
}
}
})();</script><script defer="defer" src="https://jsem.nudista.online/media/plugins/syntaxHighlighter/prism.js"></script></body></html>