|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/markrose/ |
Upload File : |
<html>
<head>
<meta http-equiv="content-type" content="text-html; charset=utf-8">
<title>Hànzì Flashcards</title>
</head>
<body bgcolor="#FFE0E0">
<form action="" name="theform">
<script>
// This is a web page for displaying a set of flashcards.
// Copyright (C) 2011 by Mark Rosenfelder ([email protected])
// May be freely used and modified for non-commercial use;
// for commerical use, write me.
// Original page: http://www.zompist.com/flash-hanzi.html
// Whether to label the cards or not
hidden = 1;
// The character database. There must be a space between character and pinyin.
// E-Z Paste: āēīōū ǎěǐǒǔ
cards = new Array(
"§", // Radicals 1
"中 zhōng", "人 rén", "大 dà", "止 zhî", "火 huǒ",
"化 huà", "车 chē", "失 shǐ", "水 shuǐ", "千 qiān",
"川 chuān", "巾 jīn", "门 mén", "白 bái", "竹 zhú",
"目 mù", "心 xīn", "工 gōng", "手 shǒu", "木 mù",
"入 rù", "又 yòu", "山 shān", "比 bî", "贝 bèi",
"爪 zhǎo", "片 piàn", "寸 cún", "干 gān", "弓 gōng",
"方 fāng", "子 zǐ", "米 mǐ", "北 běi", "牛 niú",
"云 yún", "文 wén", "月 yuè","石 shí", "风 fēng",
"玉 yù", "王 wáng", "小 xiǎo", "口 kǒu", "毛 máo",
"甘 gān", "禾 hé", "见 jiàn", "言 yán", "自 zì",
"§", // Radicals 2
"国 guó", "好 hâo", "两 liǎng", "舌 shé", "多 duō",
"东 dōng", "西 xī", "肉 ròu", "身 shēn", "非 fēi",
"百 bǎi", "鸟 niǎo", "耳 ěr", "豆 dòu", "鬼 guî",
"买 mǎi", "去 qù", "京 jīng", "革 gé", "鱼 yü",
"来 lái", "用 yòng", "小 xiâo", "面 miàn", "羽 yû",
"草 cǎo", "马 mǎ", "元 yuán", "丝 sī", "示 shì",
"黄 huáng", "黑 hēi", "血 xuè", "首 shôu", "无 wú",
"羊 yáng", "老 lǎo", "虫 chóng", "长 cháng", "美 mêi",
"瓜 guā", "金 jīn", "生 shēng", "皮 pí", "舟 zhōu",
"谷 gǔ", "豕 shǐ", "足 zú", "辛 xīn", "里 lǐ",
"§", // Basic words
"是 shì", "热 rè", "冷 lěng", "忙 máng", "爱 ài",
"狗 gôu", "要 yào", "想 xiǎng", "家 jiā", "笔 bǐ",
"茶 chá", "学 xué", "吃 chī", "树 shù", "喝 hē",
"钱 qián", "作 zuò", "谢谢 xièxie", "难 nán", "南 nán",
"母亲 mǔqin", "父亲 fùqin", "怕 pà", "龙 lóng", "猪 zhū",
"看 kàn", "对 duì", "英 yīng", "汉 hàn", "说 shuō",
"贵 guì", "种 zhǒng", "胖 pàng", "花 huā", "绿 lǜ",
"走 zǒu", "红 hóng", "酒 jiǔ", "行 xíng", "累 lèi",
"叫 jiào", "猫 māo", "瓶 píng", "铁 tiě", "虎 hū",
"党 dǎng", "道 dào", "军 jūn", "林 lín", "银 yín",
"象 xiàng", "岛 dǎo", "点 diǎn", "面 miàn", "丑 chǒu",
"抓 zhuā", "找 zhǎo", "碗 wǎn", "动 dòng", "分 fēn",
"之 zhī", "年 nián", "问 wèn", "盐 yán", "站 zhàn",
"够 gòu", "甜 tián", "里 li", "外 wài", "下 shang",
"前 qián", "后 hòu", "边 -bian", "从 cóng", "到 dào",
"出 chū", "脸 liǎn", "吻 wěn", "次 cì", "笑 xiào",
"省 shéng",
"§", // Pronouns and numbers
"我 wǒ", "你 nǐ", "您 nín", "他 tā", "她 tā",
"一 yī", "二 èr", "三 sān", "四 sì", "五 wǔ",
"六 liù", "七 qī", "八 bā", "九 jiǔ", "十 shí",
"们 -men", "零 líng", "半 bàn", "第 dì",
"§", // Grammatical and measure words
"了 le", "的 de", "过 guo", "着 zhe", "吗 ma?",
"那 nà", "几 jǐ", "都 dōu", "请 qǐng", "本 běn",
"不 bù", "谁 shéi", "很 hěn", "别 bié", "给 gěi",
"太 tài", "岁 suì", "会 huì", "能 néng", "张 zhāng",
"肯 kěn", "敢 gǎn", "得 děi", "跟 gēn", "就 jiù",
"纸 zhǐ", "这 zhè", "也 yě", "准 zhǔn", "在 zài",
"个 ge", "只 zhǐ", "自己 zìjǐ", "杯 bēi", "粒 lì",
"根 gēn", "条 tiáo", "钟 zhōng", "比 bǐ", "呢 ne",
"吧 ba",
"§", // Combos 1
"没有 méi yǒu", "平果 píngguǒ", "孩子 háizi", "词典 cídiǎn", "朋友 péngyou",
"毛衣 máoyī", "鸡蛋 jīdàn", "桌子 zhuōzi", "喜欢 xǐhuan", "什么 shénme",
"认识 rènshi", "今天 jīntian", "哥哥 gēge", "弟弟 dìdi", "姐姐 jiějie",
"妹妹 mèimei", "老师 lǎoshī", "点儿 diǎnr", "地方 dìfang", "地图 dìtú",
"便宜 piányi", "咖啡 kāfēi", "商店 shāngdiàn", "东西 dōngxi", "房子 fángzi",
"对不起 duìbuqî", "今天 jīntiān", "明天 míngtiān", "昨天 zuótiān", "可以 kěyǐ",
"天气 tiānqi", "应该 yīnggāi", "虽然 suīrán", "再见 zàijiàn", "同志 tóngzhì",
"名字 míngzi", "华侨 huáqiáo", "总是 zǒngshi", "可是 kěshì", "字典 zìdiǎn",
"先生 xiānsheng", "太太 tàitai", "吃饭 chī-fàn", "普通话 pǔtōnghuà", "为什么 wèishenme",
"孙子 sùnzi", "知道 zhīdao", "因为 yìnwei", "现在 xiànzài", "晚上 wǎnshang",
"§", // Combos 2
"客人 kèren", "青菜 qīngcài", "世界 shìjiè", "抽烟 chōu-yān", "生日 shēngrì",
"容易 róngyi", "收音机 shōuyīnjī", "事情 shìqing", "要是 yàoshi", "睡觉 shùi-jiào",
"城市 chéngshì", "还是 háishi", "银行 yínháng", "音乐 yīnyuè", "筷子 kuàizi",
"电影 diànyīng", "电视 diànshì", "抱纸 bàozhǐ", "多少 duōshao", "今年 jīnnián",
"女儿 nǚér", "早上 zǎoshang", "昨天 zuótiān", "电脑 diànnǎo", "老鼠 lǎoshǔ",
"火车 huǒchē", "飞机 fēijī", "炒饭 chǎofàn", "公斤 gōngjīn", "以前 yǐqián",
"乳房 rǔfáng", "橙子 chéngzi", "椅子 yǐzi", "照片 zhàopìan", "自行车 zìxíngchē",
"牛奶 niúnǎi", "星期 xīngqī", "葡萄 pútáo", "下午 xiàwǔ", "半夜 bànyè",
"漂亮 piàoliang", "鼻子 bízi", "拼音 pīnyīn", "身体 shēntǐ",
"§", // Dynasties and places
"中国 Zhōngguó", "美国 Měiguó", "英国 Yīngguó", "法国 fâguó", "德国 Déguó",
"上海 Shànghǎi", "广东 Guǎngdōng", "四川 Sīchuān", "台湾 Táiwān", "北京 Běijīng",
"日本 Rìběn", "朝鲜 Cháoxiǎn", "越南 Yuènán", "蒙古 Měnggǔ", "俄国 Éguó",
"秦 Qín", "汉 Hàn", "三国 Sān Guó", "晋 Jìn", "隋 Suí",
"唐 Táng","宋 Sòng", "金 Jīn", "元 Yuán", "明 Míng",
"清 Qīng", "天津 Tiānjīn", "新疆 Xīnjiāng", "西藏 Xīzàng", "印度 Yìndù",
"太平洋 Tàipíngyáng", "长江 Chángjiāng", "黃河 Huáng Hé", "芝加哥 Zhījiāgē",
"欧洲 ǒuzhǒu", "亚洲 Yàzhǒu", "香港 Xiānggǎng"
);
// E-Z Paste: āēīōū ǎěǐǒǔ
// Which set we're on
theset = 0;
nset = 0;
offset = 0;
setstart = new Array(20);
// The last card we were on
thiscard = 1;
// How many cards the user is still working with
ncard = 50;
// Initialize
function GetNset() {
nset = 0;
for (i = 0; i < cards.length; i++) {
if (cards[i] == "§") {
setstart[nset] = i + 1;
nset++;
}
}
theset = 0;
offset = 1;
ncard = setstart[1] - 21;
return nset;
}
// Return a character only
function Hanzi(cardno) {
s = cards[cardno + offset];
return " " + s.substr(0,s.indexOf(' ')) + " ";
}
function Label(cardno) {
s = cards[cardno + offset];
return s.substr(s.indexOf(' ') + 1, s.length);
}
// A function to generate random integers from 0 to (howMany - 1)
function makeRand(howMany)
{
theResult = Math.floor((Math.random()*howMany)%howMany)
return theResult
}
// Change sets
function newset() {
theset = document.getElementById("whichSet").selectedIndex;
offset = setstart[theset];
if (theset == nset - 1)
ncard = cards.length - offset;
else
ncard = setstart[theset + 1] - offset - 1;
}
// Display another card
function nextcard()
{
if (ncard == 1) {
alert("This is the only card left!");
return;
}
// Randomly choose a card. Don't choose the one we had.
i = makeRand(ncard);
while (i == thiscard)
i = makeRand(ncard);
// Display it.
thiscard = i;
document.getElementById("card").innerHTML = Hanzi(thiscard);
// Label it, if the user's cheating.
if (!hidden)
theform.key.value = Label(thiscard);
}
// Turn labelling on or off.
function label()
{
var theform = document.theform;
if (hidden)
{
theform.back.value = "Don't label";
theform.key.value = Label(thiscard);
hidden = 0;
}
else
{
theform.back.value = "Label";
theform.key.value = "";
hidden = 1;
}
}
// Stop displaying the present card.
function forgetme()
{
// Remove element thiscard.
// We don't modify the array. Instead, we flip the current and last cards,
// then decrement the usable size of the array.
if (ncard > 1)
{
i = offset + thiscard;
lasti = offset + ncard - 1;
temp = cards[i];
cards[i] = cards[lasti];
cards[lasti] = temp;
ncard = ncard - 1;
nextcard()
}
else
alert( "This is the last card!" );
}
// Forget what we forgot: start displaying all cards again.
function doall()
{
newset();
alert( "All cards will be shown now." );
}
// Following is the html for the page itself.
</script>
<h2>Hànzì Flashcards</h2>
<center>
<table border=1><tr><td bgcolor="white" height="80">
<center>
<script>
document.write( "<font size='7'><div id='card'>" + Hanzi(thiscard) + "</div></font>" );
</script>
</center>
</td></tr></table>
<br><input type="text" size=10 name="key">
<p>
<input type="button" name="next" value="Next card" onclick="nextcard()">
<input type="button" name="forget" value="Forget" onclick="forgetme()">
<input type="button" name="reset" value="Reset" onclick="doall()">
<input type="button" name="back" value="Label" onclick="label()">
<p>Which card set? <select id="whichSet" onclick="newset()">
<option value="1" selected="selected">Radicals 1</option>
<option value="2">Radicals 2</option>
<option value="3">Basic words</option>
<option value="4">Pronouns and numbers</option>
<option value="5">Grammatical and measure words</option>
<option value="6">Combos 1</option>
<option value="7">Combos 2</option>
<option value="8">Dynasties and places</option>
</select>
</center>
<hr>
<font color="#662222">
<h3>Instructions</h3>
This is a page for learning (simplified) hanzi. It currently has
<script>
document.write(cards.length);
</script>
hanzi.
<p>Press <b>Next card</b> to go through the deck randomly until you can recognize all the hanzi. The hanzi are divided into
<script>
document.write(GetNset());
</script>
sets; use the dropdown to change sets.
<p>Press the <b>Label</b> button to display the pinyin. Leave it on while you're
first learning; when you start to know the hanzi, turn it on only when you're stumped.
<p>Click <b>Forget</b> once you are sure you know a card. Then it won't be displayed
as you go through the deck, leaving you to concentrate on the ones you don't know yet.
Press <b>Reset</b> to go back to displaying all cards.
<p>The cards are biased toward the Mandarin textbooks on my shelf... you can always
grab the source and make your own sets.
</font>
<hr>
<center><a href="default.html"><img src="home.gif" border="0" alt="Back to Metaverse"></a></center>
</form>
</body>