Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
一個企業級的人 都置頂了 中國軟件網
中國軟件網 為你帶來最新鮮的行業干貨
編譯│周潤智
谷歌的安卓版Chrome瀏覽器提供了一個值得贊美的瀏覽體驗,但是如果你知道如何解鎖這些更多的功能,Chrome會變得更加高效。
你的手機瀏覽器是你通向網站的途徑。在做重要的工作相關的研究時,你會想要盡可能的高效率。下面的這四個設置都是關于如何提高你的工作效率的。
1.一個讓你的地址欄節省時間的小技巧
你大概已經知道在安卓版Chrome瀏覽器中,你可以立即從地址欄中得到不管是問題還是概念的答案。Chrome瀏覽器提供了另外一個有用的地址欄使用技巧。如果你像我一樣,這會是一個十分便捷的捷徑。每次你要從其他地方復制一個URL 到瀏覽器的時候,你必須要粘貼到你的瀏覽器中。如果你使用了這個便捷的功能,Chrome瀏覽器會自動將剪貼板的任何地址呈現到你面前。
要使用這個功能,你首先需要使用Chrome的Beta測試版本。打開應用,在地址欄中輸入"chrome://flags"。然后點擊在屏幕右上方的三點菜單按鈕,選擇"Find in page",在文本框內輸入"clipboard"。之后,一個叫做"Omnibox clipboard URL suggestions."的頁面就會立即彈跳出來。在選項框中將”Default”改為”Enabled”。最后,瀏覽器會提示你重啟瀏覽器以啟動應用,設置就完成了。
2.使手機網頁更適合眼睛閱讀
在手機上閱讀通常不是一個令人愉快的體驗。雜亂的頁面,不一致的字體等等都影響了我們的注意力。下一次遇到這樣雜亂的頁面,試試Chrome清掃頁面的隱形工具——閱讀模式。
這種模式清除了所有超鏈接元素,比如說按鈕,鏈接甚至是廣告,并且將文章統一成了標準風格的格式。
要激活這個選項,先打開應用,在地址欄中輸入"chrome://flags"。然后點擊在屏幕右上方的三點菜單按鈕,選擇"Find in page",在文本框內輸入“reader”。你會看到一個“Reader Mode triggering”,點擊下面的選項,選擇"With article structured markup." 就設定好了。
3 隨心所欲地放大縮小頁面
當我在看一個手機版網頁的時候,禁止縮放這一點讓我很抓狂。幸運的是,Chrome瀏覽器能夠讓你自由操控縮放。 打開瀏覽器的主設置,然后點擊"Accessibility" ,最后選擇"Force enable zoom."的選項就設置完成了。
4.將你的加載時間轉換到超速擋
每個人都希望網頁能夠更加快速地加載, Chorme瀏覽器有一個選項可以滿足人們的需求。
這個服務叫做Data Saver。它能在加載時輕微地壓縮和優化內容,這樣,網頁加載的速度就會加快,數據的使用也會降低。
要進行這樣的設置,點擊Chrome的設置,找到"Data Saver"的選項。點擊它,然后窗口上方的按鈕開啟它。
你已經解鎖了一些谷歌Chrome最有意思的隱藏設置,相信你的手機瀏覽體驗會比以前更加的舒適完美。
▼
「原文連接」
http://www.computerworld.com/article/2474114/android/android-4-hidden-settings-to-make-chrome-for-android-even-better.html?idg_eid=98f7c462af288a3ed31af16ab852f1ea&email_SHA1_lc=a890e8105d99a940f507a3bcd1a937c7882f8ca6&cid=cw_nlt_computerworld_enterprise_apps_2017-06-13&utm_source=Sailthru&utm_medium=email&utm_campaign=Computerworld%20Enterprise%20Apps%202017-06-13&utm_term=computerworld_enterprise_apps
們常說,“你永遠不知道,明天和意外哪個先到來”。這個世界本就充滿危險,有的人前一刻還在河水中自在地游泳,下一刻可能就被一股暗流卷走。但這并不意味著我們要生活在擔驚受怕之中。相反,我們應該注意學習安全知識,做好防范,規避風險。
TikTok用戶Knowledgesaurus一直致力于安全知識科普,他制作了“可以救命的事實”系列視頻,其中提到了面對地震、海嘯、失溫等不同危險情況的求生方法,視頻點擊量超過百萬。一起來看看他的求生法則吧。
[Photo/Agencies]
If you ever find yourself buried in rubble and can't get out, don't yell. You'll end up just wasting energy and losing your voice. What you should do is grab something and start tapping in intervals of three. Humans are great at noticing patterns and the rescuers will start to move towards that. Once you hear them, then you can start yelling.如果你發現自己被埋在瓦礫中出不來,不要大喊大叫。這樣最終只會讓你的精力耗盡,發不出聲來。你應該做的是抓住某樣東西,三次一間隔的開始敲擊。人類非常善于發現有規律的聲音,救援人員會開始朝著你的方向搜救。一旦你聽到他們的聲音,就可以大聲呼救了。
Note: rubble (n.) 碎石;瓦礫
If a tornado looks like it's not moving, that means it's heading towards you.如果龍卷風看起來沒有移動,那就意味著它正向你襲來。
[Photo/Boredpanda]
A lot of backpacks have a hidden built-in whistle. The actual clip on many modern day backpacks that are meant for hiking or camping have that built-in whistle.很多背包都帶有一個隱藏的內置哨子。如今,不少遠足或露營專用的雙肩包的卡扣都有這種設計。
Photo by Daniel Jurin from Pexels
If you're ever at the beach and you see the water receding or far away from where it normally is, run. This normally means a tsunami is coming. And someone who paid attention in school in 2004 used this and saved their own life by getting out of there.如果你在海灘上看到海水逐漸后退或遠離平常的位置,快跑!這通常意味著海嘯即將來臨。2004年,在學校認真聽講的人憑借這個知識點逃脫,挽救了自己的生命。
If you ever see square waves in the water, get out immediately. These waves have powerful currents under the water that can sweep you out and take you away.如果你在水中看到方波,立刻離開。這些波浪下隱藏著強大的水流,可以把你卷走。
If your car ever goes into water, open a window or door immediately. If you don't do this, the pressure differential is too great and it will keep everything shut and you have to wait until your car is completely filled with water in order to get out.如果你的車進水了,應該立即打開車窗或車門。如果不這樣做,巨大的壓差會將門窗都關死。到那時你只能等到車里完全充滿了水才能逃出來。
If you're somewhere and you don't have the right size battery, you can use a smaller battery and put aluminum foil in that extra space and it will still work. The aluminum foil will transfer the electricity and get the job done.如果你在某個地方,沒有合適尺寸的電池,可以使用更小號的電池,用鋁箔填充空余的空間,這樣也行得通。鋁箔將傳輸電力并完成工作。
If someone falls in cold water and is close to hypothermia, don't put them next to a fire. They need to be warmed up slowly. Otherwise it could be potentially fatal and they could experience something called afterdrop. And this is due to the fact that your blood flow cannot adapt quick enough to that change from extreme cold to extreme hot.如果有人落入冷水中,接近失溫,不要把他們安置在火旁邊。需要慢慢讓他們熱起來。否則可能帶來致命后果,使他們在復溫時核心體溫進一步下降。這是因為血液流動沒那么快,能夠讓身體很快地適應從極冷到極熱的變化。
Before natural disasters make sure to fill your tub up and your sink with water that is clean. According to the FDA, after major disasters, water's either cut off or heavily contaminated. So it's important to make sure you have enough supply of clean water.在自然災害發生之前,一定要把你的浴缸和水槽裝滿干凈的水。美國食品和藥物管理局表示,在發生重大災難后,水源要么被切斷,要么被嚴重污染。所以確保你有充足的干凈水很重要。
編輯:董靜
來源:Boredpanda
來源:chinadaily.com.cn
.引用相關頭文件
引入CSS:
<link href="Scripts/jquery-ui-1.8.1.custom.css" rel="stylesheet" type="text/css" />
<link href="Scripts/ui.jqgrid.css" rel="stylesheet" type="text/css" />
引入JS:
<script src="Scripts/jquery-1.5.1.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui.min.js" type="text/javascript"></script>
<script src="Scripts/grid.locale-en.js" type="text/javascript"></script>
<script src="Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>
因為jqGrid3.6及以后的版本集成了jQuery UI,所以,此處需要導入UI相關js和css。另外grid.locale-en.js這個語言文件必須在jquery.jqGrid.min.js之前加載,否則會出問題。
2.將jqgrid加入頁面中
根據jqGrid的文檔,要想生成一個jqGrid,最直接的方法就是:
$("#list").jqGrid(options);
其中list是頁面上的一個table:<table id="list"></table>
下面是一個簡單的例子:
<script type="text/javascript">
$(document).ready(function () {
jQuery("#list").jqGrid({
url: 'Handler.ashx',
datatype: "json",
mtype: 'GET',
colNames: ['SalesReasonID', 'Name', 'ReasonType', 'ModifiedDate'],
colModel: [
{ name: 'SalesReasonID', index: 'SalesReasonID', width: 40, align: "left", editable: true },
{ name: 'Name', index: 'Name', width: 100, align: "center" },
{ name: 'ReasonType', index: 'ReasonType', width: 100, align: "center" },
{ name: 'ModifiedDate', index: 'ModifiedDate', width: 150, align: "center", search: false }
],
rowList: [10, 20, 30],
sortname: 'SalesReasonID',
viewrecords: true,
sortorder: "desc",
jsonReader: {
root: "griddata",
total: "totalpages",
page: "currpage",
records: "totalrecords",
repeatitems: false
},
pager: jQuery('#pager'),
rowNum: 5,
altclass: 'altRowsColour',
//width: 'auto',
width: '500',
height: 'auto',
caption: "DemoGrid"
}).navGrid('#pager', { add: true, edit: true, del: true,search:false,refresh:false }); ;
})
二、 jqgrid的重要選項
具體的options參考,可以訪問jqGrid文檔關于option的章節(http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options)。其中有幾個是比較常用的,重點介紹一下:
2.1 prmNames選項
prmNames是jqGrid的一個重要選項,用于設置jqGrid將要向Server傳遞的參數名稱。其默認值為:
prmNames : {
page:"page", // 表示請求頁碼的參數名稱
rows:"rows", // 表示請求行數的參數名稱
sort: "sidx", // 表示用于排序的列名的參數名稱
order: "sord", // 表示采用的排序方式的參數名稱
search:"_search", // 表示是否是搜索請求的參數名稱
nd:"nd", // 表示已經發送請求的次數的參數名稱
id:"id", // 表示當在編輯數據模塊中發送數據時,使用的id的名稱
oper:"oper", // operation參數名稱
editoper:"edit", // 當在edit模式中提交數據時,操作的名稱
addoper:"add", // 當在add模式中提交數據時,操作的名稱
deloper:"del", // 當在delete模式中提交數據時,操作的名稱
subgridid:"id", // 當點擊以載入數據到子表時,傳遞的數據名稱
npage: null,
totalrows:"totalrows" // 表示需從Server得到總共多少行數據的參數名稱,參見jqGrid選項中的rowTotal
}
2.2 jsonReader選項
jsonReader是jqGrid的一個重要選項,用于設置如何解析從Server端發回來的json數據,如果Server返回的是xml數據,則對應的使用xmlReader來解析。jsonReader的默認值為:
jsonReader : {
root: "rows", // json中代表實際模型數據的入口
page: "page", // json中代表當前頁碼的數據
total: "total", // json中代表頁碼總數的數據
records: "records", // json中代表數據行總數的數據
repeatitems: true, // 如果設為false,則jqGrid在解析json時,會根據name來搜索對應的數據元素(即可以json中元素可以不按順序);而所使用的name是來自于colModel中的name設定。
cell: "cell",
id: "id",
userdata: "userdata",
subgrid: {
root:"rows",
repeatitems: true,
cell:"cell"
}
}
假如有下面一個json字符串:
{"totalpages":"3","currpage":"1","totalrecords":"11","griddata":[{"SalesReasonID":"1","Name":"Price","ReasonType":"Other","ModifiedDate":"1998年6月1日"},{"SalesReasonID":"2","Name":"On Promotion","ReasonType":"Promotion","ModifiedDate":"1998年6月1日"},{"SalesReasonID":"3","Name":"Magazine Advertisement","ReasonType":"Marketing","ModifiedDate":"1998年6月1日"},{"SalesReasonID":"4","Name":"Television Advertisement","ReasonType":"Marketing","ModifiedDate":"1998年6月1日"},{"SalesReasonID":"5","Name":"Manufacturer","ReasonType":"Other","ModifiedDate":"1998年6月1日"}]}
其對應的jsonReader為:jsonReader: {
root: "griddata",
total: "totalpages",
page: "currpage",
records: "totalrecords",
repeatitems: false
}
注:cell、id在repeatitems為true時可以用到,即每一個記錄是由一對id和cell組合而成,即可以適用另一種json結構。援引文檔中的例子:
repeatitems為true時:
jQuery("#gridid").jqGrid({
...
jsonReader : {
root:"invdata",
page: "currpage",
total: "totalpages",
records: "totalrecords"
},
...
});
json結構為:
{
"totalpages": "xxx",
"currpage": "yyy",
"totalrecords": "zzz",
"invdata" : [
{"id" :"1", "cell" :["cell11", "cell12", "cell13"]}, // cell中不需要各列的name,只要值就OK了,但是需要保持對應
{"id" :"2", "cell" :["cell21", "cell22", "cell23"]},
...
]
}
repeatitems為false時:
jQuery("#gridid").jqGrid({
...
jsonReader : {
root:"invdata",
page: "currpage",
total: "totalpages",
records: "totalrecords",
repeatitems: false,
id: "0"
},
...
});
json結構為:
{
"totalpages" : "xxx",
"currpage" : "yyy",
"totalrecords" : "zzz",
"invdata" : [
{"invid" : "1","invdate":"cell11", "amount" :"cell12", "tax" :"cell13", "total" :"1234", "note" :"somenote"}, // 數據中需要各列的name,但是可以不按列的順序
{"invid" : "2","invdate":"cell21", "amount" :"cell22", "tax" :"cell23", "total" :"2345", "note" :"some note"},
...
]
}
2.3 colModel的重要選項
colModel也有許多非常重要的選項,在使用搜索、排序等方面都會用到。這里先只說說最基本的。
三、 注意事項
1. 動態改變Add Form或者Edit Form中的select的內容,如:改變下圖中的Comparator下拉中的內容。
$("#list_d").navGrid('#pager_d',{add:true,edit:true,del:true,search:false,refresh:false},
{
checkOnSubmit:false, closeAfterEdit: true,recreateForm:true,
beforeInitData:function(formid){
initComparator();
},
beforeShowForm: function(formid){
$("#list_d").jqGrid('setColProp', 'Name', { editrules:{required:false},});
$('#tr_Name', formid).hide();
}
},//edit
{},//add
{}//del
)
beforeInitData, beforeShowForm在每次點擊編輯的時候都會執行。initComparator的作用是通過ajax獲取數據,然后利用$("#list_d").jqGrid('setColProp', 'Comparator', { editoptions: { value: valueString} });來設置Comparator下拉中的內容。其中valueString的格式如下’ equal to: equal to; not equal to: not equal to’。鍵值之間用冒號隔開,2項之間用分號隔開。注意:把recreateForm設為true,否則'setColProp'只在第一次調用時有效。
2. var rowNum=parseInt($(this).getGridParam("records"), 10); 得到數據條數。
3. jQuery("#list_d").clearGridData();清空數據。
4. jQuery("#list").getCell(ids,"Key");獲取第ids行的key列。
5. $("#list").jqGrid('setSelection', "1");選中第一行。放在loadComplete:中在gird加載完成的時候自動選中第一行。loadComplete:function(data){$("#list").jqGrid('setSelection', "1");
}
6. 對于像1中的可編輯的字段,可以設定rule,參見http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#editrules
7. 修改Option,以URL為例
jQuery("#list_d").jqGrid('setGridParam',{url:"xxx.aspx",page:1}).trigger('reloadGrid');
*請認真填寫需求信息,我們會在24小時內與您取得聯系。