{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \n\n"}}},{"rowIdx":1092715,"cells":{"text":{"kind":"string","value":"function plotPeriod(data, dStart, dEnd)\n%plotPeriod(data, dStart, dEnd)\n%Plot a period between two dates\n%\n% Parameters:\n% -----------\n% data = historical data to plot\n% dStart = initial date\n% dEnd = final date\n%\n% Returns:\n% --------\n%\n% Example:\n% --------\n% plotPeriod(gspc,\"2010-1-31\",\"2015-12-10\")\n\n if ~exist('data', 'var')\n fprintf('\\tERROR: %s does not exist. Did you load it first?\\n', data)\n fprintf('\\ttype ''help plotPeriod'' for more information\\n')\n return\n end\n \n startDate = datetime(dStart, 'Inputformat', 'yyyy-MM-dd');\n endDate = datetime(dEnd, 'InputFormat', 'yyyy-MM-dd');\n \n if startDate > endDate\n fprintf('\\tERROR: Start date must be before End date\\n')\n fprintf('\\ttype ''help plotPeriod'' for more information\\n')\n return\n end\n \n dateRange = (data.Date >= startDate) & (data.Date <= endDate);\n \n plot(data.Date(dateRange), data.Open(dateRange), 'LineWidth', 2)\nend"}}},{"rowIdx":1092716,"cells":{"text":{"kind":"string","value":"\n\n\n\n"}}},{"rowIdx":1092717,"cells":{"text":{"kind":"string","value":"import { useState, useEffect, useRef } from \"react\";\nimport DashboardLayout from \"../layout/DashboardLayout\"\nimport { useAuth } from \"../../../auth/AuthProvider\";\nimport { database } from \"../../firebase\";\nimport { getDatabase, ref, get, set, onValue } from \"firebase/database\";\nimport AddUserModal from \"./AddUserModal\";\nimport Swal from 'sweetalert2';\n\n\nconst Users = () => {\n\n // const { fetchfetchAllUsers } = useAuth();\n const [users, setUsers] = useState([]);\n const [name, setName] = useState('');\n const [openModal, setOpanModal] = useState(false);\n const [newUser, setNewUser] = useState([]);\n\n const { deleteVoter } = useAuth();\n\n\n useEffect(() => {\n\n\n const fetchAllUsers = async () => {\n try {\n const usersRef = ref(database, `users`);\n const usersSnapshot = await get(usersRef);\n\n if (usersSnapshot.exists()) {\n const usersData = usersSnapshot.val();\n\n console.log(usersData)\n // Convert nested object into an array of users\n const usersArray = Object.entries(usersData).map(([uid, userData]) => ({\n uid,\n ...userData,\n }));\n\n setUsers(usersArray);\n\n\n\n\n } else {\n console.log('No users found');\n }\n } catch (error) {\n console.error('Error fetching users:', error.message);\n }\n };\n\n fetchAllUsers();\n\n\n }, [])\n\n\n\n const handleOpenModal = (e) => {\n e.preventDefault();\n setOpanModal(true)\n\n\n };\n\n const handleCloseModal = (e) => {\n e.preventDefault();\n setOpanModal(false)\n\n\n };\n\n\n\n const handleDeleteUser = async (userId) => {\n try {\n \n const result = await Swal.fire({\n \n title: \"Are you sure?\",\n text: \"You won't be able to revert this!\",\n icon: \"warning\",\n showCancelButton: true,\n confirmButtonColor: \"#3085d6\",\n cancelButtonColor: \"#d33\",\n confirmButtonText: \"Yes, delete it!\"\n });\n \n if (result.isConfirmed) {\n\n await deleteVoter(userId);\n await Swal.fire({\n title: \"Deleted!\",\n text: \"User has been deleted.\",\n icon: \"success\"\n });\n \n window.location.reload();\n }\n } catch (error) {\n console.log(\"error while deleting from client\", error);\n }\n };\n return (\n \n\n
\n

User Table

\n
\n setName(e.target.value)}\n className=\"shadow appearance-none border rounded w-full border-[#777]/30 py-3 px-3 bg-[#777]/30 text-white leading-tight focus:outline-none focus:shadow-outline\"\n />\n \n\n\n {\n openModal ? (\n
\n \n
\n\n\n ) : (\n null\n )\n\n }\n\n
\n \n \n \n \n \n \n \n \n \n\n {\n users.map((user) => (\n \n \n \n \n \n ))\n }\n\n\n\n \n
IDNameAction
{user.uid}{user.name}\n handleDeleteUser(user.uid)}\n className=\"bg-red-500 text-white px-3 py-1 rounded-lg\"\n >\n Delete\n \n
\n\n
\n
\n )\n}\n\nexport default Users"}}},{"rowIdx":1092718,"cells":{"text":{"kind":"string","value":"//\n// DetailMovieModel.swift\n// TMDBMovie\n//\n// Created by Evan Eka Laksana on 26/10/23.\n//\n\nimport Foundation\n\nstruct DetailMovieModel {\n\n struct Request {\n var id: Int\n }\n \n struct Response: Codable {\n let adult: Bool?\n let backdropPath: String?\n let budget: Int?\n let genres: [Genres]?\n let id: Int?\n let imdbID: String?\n let originalTitle: String?\n let overview: String?\n let popularity: Double?\n let posterPath: String?\n let productionCompanies: [ProductionCompanies]?\n let productionCountries: [ProductionCountries]?\n let releaseDate: String?\n let revenue: Int?\n let runtime: Int?\n let status: String?\n let tagline: String?\n let title: String?\n let video: Bool?\n let voteAverage: Double?\n let voteCount: Double?\n let languages: [SpokenLanguages]?\n\n enum CodingKeys: String, CodingKey {\n case adult\n case backdropPath = \"backdrop_path\"\n case budget\n case genres\n case id\n case imdbID = \"imdb_id\"\n case originalTitle = \"original_title\"\n case overview\n case popularity\n case posterPath = \"poster_path\"\n case productionCompanies = \"production_companies\"\n case productionCountries = \"production_countries\"\n case releaseDate = \"release_date\"\n case voteAverage = \"vote_average\"\n case voteCount = \"vote_count\"\n case languages = \"spoken_languages\"\n case revenue,runtime,status,tagline,title,video\n }\n }\n \n struct DetailMovieViewModel {\n let id: Int\n let movieTitle: String\n let rating: Double\n let ratingValue: Double\n let movieYear: String\n let movieCover: String\n let backdropCover: String\n let isWatched: Bool\n let synopsis: String\n let genres: String\n let tagline: String\n let runtime: String\n let releaseDate: String\n let isAdult: Bool\n let popularity: Double\n }\n \n struct Genres: Codable {\n let id: Int?\n let name: String?\n }\n \n struct ProductionCompanies: Codable {\n let id: Int?\n let name: String?\n let originCountry: String?\n \n enum CodingKeys: String, CodingKey {\n case name,id\n case originCountry = \"origin_country\"\n }\n }\n \n struct ProductionCountries: Codable {\n let iso31661: String?\n let name: String?\n \n enum CodingKeys: String, CodingKey {\n case name\n case iso31661 = \"iso_3166_1\"\n }\n }\n \n struct SpokenLanguages: Codable {\n let iso6391: String?\n let name: String?\n let englishName: String?\n \n enum CodingKeys: String, CodingKey {\n case name\n case iso6391 = \"iso_639_1\"\n case englishName = \"english_name\"\n }\n }\n}"}}},{"rowIdx":1092719,"cells":{"text":{"kind":"string","value":"const express = require(\"express\");\nconst mongoose = require(\"mongoose\");\nconst path = require('path');\nconst bodyParser = require(\"body-parser\");\nconst app = express();\nconst multer = require(\"multer\");\n\nconst cors = require(\"cors\");\napp.use(cors());\nmongoose.connect(\"mongodb+srv://naiduabhay1:naiduabhay1107@cluster0.llkl16k.mongodb.net/news\");\n\n// Define mongoose schema for news feed\nconst newsSchema = new mongoose.Schema({\n title: String,\n content: String,\n category: String,\n status: String,\n date: String,\n fileUrl: String,\n});\n\n// Create mongoose model\nconst NFeed = mongoose.model(\"NFeed\", newsSchema);\n\n// Multer configuration for file upload\nconst storage = multer.diskStorage({\n destination: function (req, file, cb) {\n cb(null, \"./uploads\");\n },\n filename: function (req, file, cb) {\n cb(null, file.originalname);\n },\n});\nconst upload = multer({ storage: storage });\n\n// Serve static files from uploads directory\napp.use('/uploads', express.static(path.join(__dirname, 'uploads')));\n\n// Middleware for parsing request body\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: true }));\n\n// POST route for creating a new news feed\napp.post(\"/\", upload.single(\"file\"), async (req, res) => {\n try {\n // Construct file path\n const filePath = \"uploads/\" + req.file.filename;\n\n // Create new news feed instance\n const newsFeed = new NFeed({\n title: req.body.title,\n content: req.body.content,\n category: req.body.category,\n status: req.body.status,\n date: req.body.date,\n fileUrl: req.file ? filePath : null, // Store the file path if available\n });\n\n // Save the news feed to database\n await newsFeed.save();\n\n res.status(201).send(\"News feed created successfully\");\n } catch (error) {\n console.error(\"Error creating news feed:\", error);\n res.status(500).send(\"Internal server error\");\n }\n});\n\n// GET route for fetching all news feeds\napp.get(\"/\", async (req, res) => {\n try {\n const data = await NFeed.find({});\n res.send(data);\n } catch (error) {\n console.error(\"Error finding news feed:\", error);\n res.status(500).send(\"Internal server error\");\n }\n});\n\n// DELETE route for deleting a news feed\napp.delete(\"/\", async (req, res) => {\n try {\n // Get data from request body\n const data = req.body;\n\n // Delete the news feed\n const deletedFeed = await NFeed.deleteOne(data);\n\n res.send(deletedFeed);\n } catch (error) {\n console.error(\"Error finding news feed:\", error);\n res.status(500).send(\"Internal server error\");\n }\n});\n\n// Define port\nconst PORT = process.env.PORT || 8000;\n\n// Start server\napp.listen(PORT, () =>\n console.log(\"Server is running on port \" + PORT)\n);"}}},{"rowIdx":1092720,"cells":{"text":{"kind":"string","value":"import React from 'react';\nimport Header from './Header';\nimport Main from './Main';\nimport Footer from './Footer';\nimport PopupWithForm from './PopupWithForm';\nimport ImagePopup from './ImagePopup';\nimport { cardApi } from '../utils/cardApi';\nimport { authApi } from '../utils/authApi';\nimport currentUserContext from '../contexts/CurrentUserContext';\nimport EditProfilePopup from './EditProfilePopup';\nimport EditAvatarPopup from './EditAvatarPopup';\nimport AddPlacePopup from './AddPlacePopup';\nimport Login from './Login';\nimport Register from './Register';\nimport { Routes, Route, Navigate, useNavigate, useLocation } from 'react-router';\nimport ProtectedRouteElement from './ProtectedRoute';\nimport InfoTooltip from './InfoTooltip';\n\nfunction App() {\n const [isEditProfilePopupOpen, setIsEditProfilePopupOpen] = React.useState(false);\n const [isEditAvatarPopupOpen, setIsEditAvatarPopupOpen] = React.useState(false);\n const [isAddPlacePopupOpen, setIsAddPlacePopupOpen] = React.useState(false);\n const [isLoading, setIsLoading] = React.useState(false);\n const [selectedCard, setSelectedCard] = React.useState(null);\n const [currentUser, setCurrentUser] = React.useState(null);\n const [cards, setCards] = React.useState([]);\n const [isMenuOpen, setMenuOpen] = React.useState(false);\n\n const [isLoggedIn, setLoggedIn] = React.useState(false);\n const [tooltip, setTooltip] = React.useState({\n isOpened: false,\n isSuccess: false,\n text: ''\n });\n\n const navigate = useNavigate();\n const location = useLocation();\n\n function handleEditAvatarClick() {\n setIsEditAvatarPopupOpen(true);\n };\n\n function handleEditProfileClick() {\n setIsEditProfilePopupOpen(true);\n };\n\n function handleAddPlaceClick() {\n setIsAddPlacePopupOpen(true);\n };\n\n function handleCardClick(card) {\n setSelectedCard(card);\n };\n\n function handleCardLike(card) {\n const isLiked = card.likes.some(i => i === currentUser._id);\n cardApi.changeLikeCardStatus(card._id, isLiked)\n .then((newCard) => {\n setCards((state) => state.map((c) => c._id === card._id ? newCard.data : c));\n })\n .catch(err => console.log(err));\n };\n\n function handleCardDelete(card) {\n cardApi.deleteCard(card._id)\n .then(() => {\n setCards((state) => state.filter((c) => c._id !== card._id));\n })\n .catch(err => console.log(err));\n };\n\n function closeAllPopups() {\n setIsEditAvatarPopupOpen(false);\n setIsEditProfilePopupOpen(false);\n setIsAddPlacePopupOpen(false);\n setTooltip({\n ...tooltip,\n isOpened: false\n });\n setSelectedCard(null);\n };\n\n function handleUpdateUser({ name, about }) {\n setIsLoading(true);\n cardApi.setUserInfo(name, about)\n .then(res => {\n setCurrentUser({\n ...currentUser,\n name: res.data.name,\n about: res.data.about\n });\n closeAllPopups();\n })\n .catch(err => console.log(err))\n .finally(() => setIsLoading(false));\n };\n\n function handleUpdateAvatar(link) {\n setIsLoading(true);\n cardApi.updateAvatar(link)\n .then(res => {\n setCurrentUser({\n ...currentUser,\n avatar: res.data.avatar\n });\n closeAllPopups();\n })\n .catch(err => console.log(err))\n .finally(() => setIsLoading(false));\n };\n\n function handleAddPlaceSubmit({ title, link }) {\n setIsLoading(true);\n cardApi.addCard(title, link)\n .then(newCard => {\n setCards([newCard.data, ...cards]);\n closeAllPopups();\n })\n .catch(err => console.log(err))\n .finally(() => setIsLoading(false));\n };\n\n function handleRegistration(email, password) {\n setIsLoading(true);\n authApi.register(email, password)\n .then(() => {\n setTooltip({\n isOpened: true,\n isSuccess: true,\n text: 'Вы успешно зарегистрировались!'\n })\n })\n .catch(err => {\n setTooltip({\n isOpened: true,\n isSuccess: false,\n text: err\n })\n })\n .finally(() => setIsLoading(false));\n }\n\n function handleAuthorization(email, password) {\n if (!email || !password) {\n return;\n }\n setIsLoading(true);\n authApi.authorize(email, password)\n .then(() => {\n setLoggedIn(true);\n navigate('/');\n })\n .catch(err => {\n setTooltip({\n isOpened: true,\n isSuccess: false,\n text: err\n })\n })\n .finally(() => setIsLoading(false));\n }\n\n function handleSignOut() {\n return authApi.logout()\n .then(() => setLoggedIn(false))\n .catch(err => console.log(err));\n }\n\n React.useEffect(() => {\n authApi.getContent()\n .then(() => {\n setLoggedIn(true);\n navigate('/');\n })\n .catch(err => {\n console.log(err);\n });\n }, []);\n\n function handleMainMount() {\n Promise.all([cardApi.getUserInfo(), cardApi.getInitialCards()])\n .then(([userData, cardsData]) => {\n setCurrentUser(userData.data);\n setCards(cardsData.data);\n })\n .catch(err => {\n console.log(err);\n });\n }\n\n const handleMenuOpen = () => isMenuOpen ? setMenuOpen(false) : setMenuOpen(true);\n\n return (\n \n
\n
\n \n : } />\n \n \n
\n \n \n \n \n \n } />\n } />\n } />\n \n \n
\n
\n );\n}\n\nexport default App;"}}},{"rowIdx":1092721,"cells":{"text":{"kind":"string","value":" {\n const { user } = useContext(AuthContext);\n const PF = process.env.REACT_APP_PUBLIC_FOLDER;\n return (\n <>\n \n \n
\n
\n \n \n Vruskhvalli\n \n
\n
\n
\n \n \n
\n
\n
\n \n \n \n \n

\n {user.username}\n

\n \n
\n
\n
\n
\n \n );\n};\n\nexport default Topbar;"}}},{"rowIdx":1092723,"cells":{"text":{"kind":"string","value":"
\n
\n

Add your pooch!

\n

Edit your pooch!

\n
\n
\n
\n
\n\n
\n \n \n

\n {{ nd.errors.other }}\n

\n
\n\n
\n \n \n

\n {{ nd.errors.other }}\n

\n
\n\n \n\n
\n \n \n

\n {{ nd.errors.other }}\n

\n
\n\n
\n \n \n

\n {{ nd.errors.other }}\n

\n
\n\n
\n \n \n

\n {{ nd.errors.other }}\n

\n
\n\n
\n \n \n

\n {{ nd.errors.other }}\n

\n
\n\n \n \n
\n
\n
\n
\n \n
\n \n \"{{nd.dog.name}}\"\n
\n

{{nd.dog.name}}
{{nd.dog.breed}}

\n

{{nd.dog.bio}}

\n
\n
\n
\n
\n
\n
"}}},{"rowIdx":1092724,"cells":{"text":{"kind":"string","value":"import type { AppProps } from \"next/app\";\nimport Head from \"next/head\";\nimport React from \"react\";\nimport { QueryClient, QueryClientProvider } from \"react-query\";\nimport { LoginProvider } from \"../context/loginContext\";\nimport \"../styles/buttons.css\";\nimport \"../styles/colors.css\";\nimport \"../styles/fonts.css\";\nimport \"../styles/globals.css\";\nimport \"../styles/inputs.css\";\nimport \"../styles/texts.css\";\n\nfunction MyApp({ Component, pageProps }: AppProps) {\n const queryClient = new QueryClient()\n\n return (\n \n \n \n Next Challenge\n \n \n \n \n \n \n );\n}\n\nexport default MyApp;"}}},{"rowIdx":1092725,"cells":{"text":{"kind":"string","value":"\n\n\n \n \n Transitions\n\n\n\n\n\n \n \n\n

Transitions

\n\n\n \n\n



\n\n \n \n \n\n\n

Opdracht 2

\n\n
Zoek uit wat transitions zijn en beschrijf met eigen woorden wat het betekent.
\n
Transitions / annimations binnen CSS zijn opties om waardes van bepaalde CSS properties te veranderen over\n een bepaalde tijd.\n
\n
\n
\n\n
\n\n\n\n




\n\n\n\n\n\n

Opdracht 2

\n\n
Maak een simpele transition wat de kleur van een tekst aanpast.
\n
\n
\n
\n\n

Ga met je muis over deze text.

\n\n
\n\n\n\n\n\n




\n\n\n\n\n

Opdracht 3

\n
Transitions kent verschillende transition-timing. Zie hieronder een voorbeeld. Maak het na.
\n
\n
\n
\n
1
\n
2
\n
3
\n
4
\n
5
\n
\n\n\n\n




\n\n\n\n

Opdracht 4

\n
Je kunt op verschillende properties transitions aangeven. Zie hieronder een voorbeeld. Zoek uit op welke properties de transitions zitten en maak het ongeveer hetzelfde na
\n
\n
\n
\n
1
\n
2
\n
3
\n
\n\n




\n\n\n\n

Opdracht 5

\n\n\n
\n
\"\"
\n
\n
\n\n\n\n




\n\n\n

Opdracht 6

\n
\n
\n\n
\n

Article Sep 16, 2019

\n

Placeholder title

\n

Author: Elmer Volgers

\n
\n
\n

Article Sep 16, 2019

\n

Placeholder title

\n

Author: Elmer Volgers

\n
\n
\n

Article Sep 16, 2019

\n

Placeholder title

\n

Author: Elmer Volgers

\n
\n
\n

Article Sep 16, 2019

\n

Placeholder title

\n

Author: Elmer Volgers

\n
\n\n\n
\n\n




\n\n\n\n

Opdracht 7

\n
\n
\n\n
\n\n
\n\n\n




\n\n\n\n\n\n"}}},{"rowIdx":1092726,"cells":{"text":{"kind":"string","value":"import { Card, CardBody, Text, Button, HStack, VStack } from \"@chakra-ui/react\";\nimport { ArrowUpIcon, ArrowDownIcon } from \"@chakra-ui/icons\";\n\nconst TodoCards = ({ data, setCardData }: any) => {\n const handleClick = (index: number) => {\n setCardData((prevData: any) =>\n prevData.map((item: any, i: number) =>\n i === index ? { ...item, completed: !item.completed } : item\n )\n );\n };\n const handleDeleteClick = (index: number) => {\n setCardData(\n (prevData: any) => prevData.filter((_: any, i: number) => i !== index) // so this logic will provide us the new array that is not equal to the index which we were passing as an argument\n );\n };\n\n const handleMoveUp = (index: number) => {\n if (index > 0) {\n setCardData((prevData: any) => {\n const newData = [...prevData];\n [newData[index], newData[index - 1]] = [\n newData[index - 1],\n newData[index],\n ];\n return newData;\n });\n }\n };\n\n const handleMoveDown = (index: number) => {\n if (index < data.length - 1) {\n setCardData((prevData: any) => {\n const newData = [...prevData];\n [newData[index], newData[index + 1]] = [\n newData[index + 1],\n newData[index],\n ];\n return newData;\n });\n }\n };\n\n return (\n <>\n {data.map((item: any, index: any) => (\n \n \n \n \n \n {item.inputBar}\n \n \n \n #{item.todoType}\n \n \n #{item.Category}\n \n \n #{item.dateAndTime}\n \n \n \n \n \n handleMoveUp(index)}\n isDisabled={index === 0}\n >\n \n \n handleMoveDown(index)}\n isDisabled={index === data.length - 1}\n >\n \n \n \n \n \n handleDeleteClick(index)}\n width=\"100px\"\n >\n Delete\n \n \n \n \n \n \n ))}\n \n );\n};\n\nexport default TodoCards;"}}},{"rowIdx":1092727,"cells":{"text":{"kind":"string","value":"/**\n * @file PrimitiveWrappers.c\n * @author: Zhang Hai\n */\n\n/*\n * Copyright (C) 2014 Zhang Hai\n *\n * This file is part of zhclib.\n *\n * zhclib is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * zhclib is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with zhclib. If not, see .\n */\n\n#include \"PrimitiveWrappers.h\"\n\n/* For string_format() */\n#include \"string.h\"\n\n\n#define DEFINE_PRIMITIVE_WRAPPER(NAME, TYPE, FORMAT) \\\n\\\n void NAME##_initializeMethods(NAME *this) { \\\n _$(this, new) = NAME##_new; \\\n _$(this, delete) = NAME##_delete; \\\n _$(this, toString) = NAME##_toString; \\\n _$(this, newFromValue) = NAME##_newFromValue; \\\n } \\\n\\\n void NAME##_initialize(NAME *this, string name) { \\\n\\\n Object_initialize((Object *)this, name); \\\n\\\n _(this, value) = 0; \\\n\\\n NAME##_initializeMethods(this); \\\n } \\\n\\\n void NAME##_initializeFromValue(NAME *this, string name, \\\n TYPE value) { \\\n\\\n Object_initialize((Object *)this, name); \\\n\\\n _(this, value) = value; \\\n\\\n NAME##_initializeMethods(this); \\\n } \\\n\\\n void NAME##_finalize(NAME *this) { \\\n Object_finalize((Object *)this); \\\n } \\\n\\\n NAME *NAME##_new() { \\\n OBJECT_NEW(NAME, , #NAME) \\\n } \\\n\\\n OBJECT_DEFINE_DELETE(NAME) \\\n\\\n string NAME##_toString(NAME *this) { \\\n return string_format(FORMAT, _(this, value)); \\\n } \\\n\\\n NAME *NAME##_newFromValue(TYPE value) { \\\n OBJECT_NEW(NAME, FromValue, #NAME, value) \\\n } \\\n\n\n DEFINE_PRIMITIVE_WRAPPER(Boolean, bool, \"%d\")\n\n DEFINE_PRIMITIVE_WRAPPER(Character, char, \"%c\")\n\n DEFINE_PRIMITIVE_WRAPPER(Integer, int, \"%d\")\n\n DEFINE_PRIMITIVE_WRAPPER(Long, long, \"%ld\")\n\n DEFINE_PRIMITIVE_WRAPPER(Float, float, \"%f\")\n\n DEFINE_PRIMITIVE_WRAPPER(Double, double, \"%f\")\n\n\n#undef DEFINE_PRIMITIVE_WRAPPER"}}},{"rowIdx":1092728,"cells":{"text":{"kind":"string","value":"\n\n\n \n \n Student Review Quiz Page\n \n \n \n \n \n \n\n \n
\n \n
\n
\n \n \n
\n
\n
\n
\n

[[${nameQuiz}]]

\n
\n
\n\n
\n
\n\n
\n \n
\n
\n
\n
\n
\n
    \n
  1. \n
    \n
    \n \n \n
    \n
    \n
  2. \n\n
\n
\n
\n
\n
\n
\n
\n Corrected\n Not Correct\n Not Correct\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n\n
\n
\n Back\n
\n
\n
\n
\n
\n
\n
\n \n"}}},{"rowIdx":1092729,"cells":{"text":{"kind":"string","value":"{% load static %}\n\n\n"}}},{"rowIdx":1092730,"cells":{"text":{"kind":"string","value":"// App.js\nimport React from 'react';\nimport { View, StyleSheet } from 'react-native'; \nimport Header from './components/Header';\nimport Container from './components/Container';\nimport Advice from './components/Advice';\nimport Footer from './components/Footer';\nimport { NavigationContainer } from '@react-navigation/native';\nimport { createStackNavigator } from '@react-navigation/stack';\nimport SobreMim from './components/SobreMim';\nimport SobreAPI from './components/SobreAPI';\n\nconst Stack = createStackNavigator();\n\nconst App = () => {\n return (\n \n \n \n \n \n \n \n );\n};\n\nconst HomeScreen = ({ navigation }) => {\n const navigateToSobreMim = () => {\n navigation.navigate('SobreMim');\n };\n\n const navigateToSobreAPI = () => {\n navigation.navigate('SobreAPI');\n };\n\n return (\n \n
\n \n \n \n