大二下學期學習進度(十)

2022-08-18 19:45:13 字數 1522 閱讀 7023

編碼行數:850

編碼時長:13h

發表部落格數量:8

所學知識點:

class entity11

public string getdanci()

public int getcishu() }

public class dancicollect

} bf.close();

fr.close();

return flag;

} public static string tolowercase(string str)

stringbuffer sb = new stringbuffer();

for(int i = 0;i < stringarr.length;i++)

string str1 = sb.tostring();

return str1;

}public static void collect1() throws ioexception

breader1.close();

string text = sb1.tostring();

int i=0;

string array = ;

for (int j = 0; j < array.length; j++)

string textarray = text.split(" "); //根據空格將text分割並存放在textarray中

mapmap = new treemap();

integer count = 0;//每個字母的次數

integer total = 0;//總共多少個字母

while(i < textarray.length) else

map.put(str+"", count);

i++;

}else

}listresult = new arraylist<>();

entity11 e = null;

for (string str : map.keyset())

result.sort((entity11 e1,entity11 e2)->);

system.out.println("文章共計"+total+"個單詞");

for(int ii = 0 ; ii < result.size();ii++)

// for(entity11 ee : result)

// for (string str : map.keyset())

} catch (filenotfoundexception e)

} public static void main(string args) throws ioexception catch (filenotfoundexception e)

}}

且將其單詞本身字串和出現次數count賦值給map物件map.put();最後將其轉化成list集合,根據出現頻率排序輸出。源**如下:

大二下學期學習進度(九)

行數 約1200行 所學知識點 1 getelementsbyname 該方法與 getelementbyid 方法相似,但是它查詢元素的 name 屬性,而不是 id 屬性。另外,因為乙個文件中的 name 屬性可能不唯一 如 html 表單中的單選按鈕通常具有相同的 name 屬性 所有 get...

大二下學期學習進度(十二)

編碼時長 17h 編碼行數 760 發表部落格篇數 3 所學知識點 1.html中嵌入php語句 新建.php檔案,html檔案中嵌入php語句,其存在執行的順序,form表單先執行,然後是script語句,其次是php語句。jieguo 1 if empty post 2.利用php 講存進資料庫...

大二下學期開課部落格

一 介紹自己 目前是大二軟體工程系的一名學生。熱愛學習和玩遊戲。二 現狀 經驗和計畫 現狀 軟體工程系一名菜鳥中的菜鳥,感覺自己什麼都不會,其實是真的什麼都不會。經驗 剛開課一定要對本課程充滿信心,沒有也要培養出來。而且要養成對本課程的興趣,這樣才能在將來的學習中輕鬆地提公升自己。計畫 前期在自己目...