Time of Update: 2018-07-28
一、為什麼要用require.js。 最早的時候,所有Javascript代碼都寫在一個檔案裡面,只要載入這一個檔案就夠了。後來,代碼越來越多,一個檔案不夠了,必須分成多個檔案,依次載入。下面的網頁代碼,相信很多人都見過。 <script src="1.js"></script> <script src="2.js"></script> <script
Time of Update: 2018-07-28
問題: 網頁上面“5%”被分成了兩行,“10%”在一行內,需要把5%也保持在一行內。 Update:  在OS X的chrome中不起作用,需要換成‍或者‍ 解決方案: http://stackoverflow.com/a/11393767/2177408 There is no entity reference for ZWNBSP (zero-width no-break
Time of Update: 2018-07-28
請預先安裝jdk 建立新使用者(非root使用者) elasticsearch只能用非root啟動,這裡我建立了一個叫seven的使用者 [root@localhost ~]# useradd seven[root@localhost ~]# passwd seven 下載elasticsearch [root@localhost ~]# su seven[seven@localhost root]$ cd /home/seven[seven@localhost ~]$
Time of Update: 2018-07-28
在python2 中直接列印map,filter函數會直接輸出結果。但在python3中做了些修改,輸出前需要使用list()進行顯示轉換,而reduce函數則被放到了functools包中,代碼如下 from functools import reduceimport mathdef format_name(s): return s.upper()def is_odd(x): return x % 2 == 1def sqr_integer(x): r =
Time of Update: 2018-07-28
標題起的有點繞,舉個例子說明: <text text-anchor="middle"><textPath xlink:href="#textpath1" font-size="30" font-family="Brush Script MT" startOffset="50%">August 11.
Time of Update: 2018-07-28
錯誤碼: Description Resource Path Location Type Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.12.4 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the
Time of Update: 2018-07-28
問題描述 新裝的 SLURM 叢集在運行了一些作業並修改一些設定項目以後,用sinfo查看資訊的時候看到部分節點狀態總是 drained ,但是在這個節點上並沒有作業在運行,重啟 slurm 服務問題依舊,如下 $ sinfoPARTITION AVAIL TIMELIMIT NODES STATE NODELISTdebug* up infinite 1 drain mycentos6x 並且用 “scontrol show
Time of Update: 2018-07-28
CSS樣式的filter(濾鏡效果)對HTML的一些標記設定濾鏡效果。 黑白照片 filter: gray; X光照片 filter: Xray; 風動模糊 filter: blur(add=true,direction=45,strength=30); 正弦波紋 filter: Wave(Add=0, Freq=60, LightStrength=1, Phase=0, Strength=3); 半透明效果 filter: Alpha(Opacity=50); 線型透明 filter:
Time of Update: 2018-07-28
js頁面跳轉和js對iframe進行頁面跳轉、重新整理 一、js方式的頁面跳轉1.window.location.href方式 <script language="javascript" type="text/javascript">
Time of Update: 2018-07-28
背景 background css 說明 background-image:url("圖片的網址"); 背景圖 background: url(" 圖片的網址 "); 背景 background-color:#色碼; 背景色彩 Exp: background-image:url(背景圖案.jpg,gif,bmp); background-color:#FFFFFF;
Time of Update: 2018-07-28
先說一下什麼叫亂碼 不知道有沒有人這樣認為過,一個字串不僅僅包含字元,還有隱藏著它的編碼資訊。比如java中String str =
Time of Update: 2018-07-28
新升級系統記憶體,從原來的2G加到4G,但是在使用命令查看的時候只能看到3291M,如下: $ free -m total used free shared buffers cached Mem: 3291 801 2489 0 95 342 -/+ buffers/cache: 363 2927 Swap: 1906 0 1906 查了一下才知道,預設32bit的Linux系統只能識別出3291 (3G)
Time of Update: 2018-07-28
address:http://www.cnblogs.com/zhenhua/archive/2010/10/21/1857366.html 不可為空 <input onblur="if(this.value.replace(/^ +| +$/g,'')=='')alert('不可為空!')"> 只能輸入英文和數字<input
Time of Update: 2018-07-28
研究一下不用模板將頁面寫成靜態頁的方法,歸納以下3種。注意要引用2個命名空間: using System.Net; using System.IO; 1.在伺服器上指定aspx網頁,產生html靜態頁1。 System.IO.StreamWriter sw = new
Time of Update: 2018-07-28
html5中可以使用二維碼掃描,也可以從相簿中選擇二維碼識別,代碼如下 var ws = null, wo = null; var scan = null, domready = false; // H5 plus事件處理 function plusReady() { if (ws || !window.plus || !domready) { return;
Time of Update: 2018-07-28
題目描述 對於字串A,其中絕對不含有字元’.’和’*’。再給定字串B,其中可以含有’.’或’*’,’*’字元不能是B的首字元,並且任意兩個’*’字元不相鄰。exp中的’.’代表任何一個字元,B中的’*’表示’*’的前一個字元可以有0個或者多個。請寫一個函數,判斷A是否能被B匹配。 給定兩個字串A和B,同時給定兩個串的長度lena和lenb,請返回一個bool值代表能否匹配。保證兩串的長度均小於等於300。 測試範例:
Time of Update: 2018-07-28
htlm: <ion-view> <div class="bar bar-header bar-assertive item-input-inset"> <a class="button button-clear icon ion-ios-arrow-left" ng-click="$ionicGoBack()"></a> <label
Time of Update: 2018-07-28
xml檔案的讀取和寫入主要又兩種,一種是XMLDocument,另一種是XMLtextwriter/xmltextreader。 1、XMLtextwriter/xmltextreader 讀取程式: string
Time of Update: 2018-07-28
1. 開啟Evolution,選擇 Edit -> Preferences -> Mail Accounts -> Add Name: xxx@live.cn(或者是xxx@hotmail.com) Full Name:自己的名字 Email Address:xxx@live.cn(或者是xxx@hotmail.com) Optional Informaction: (可填可不填) 進入下一步 2.
Time of Update: 2018-07-28
為了方便以後查閱,本文轉自http://blog.csdn.net/jay_1989/article/details/52687934 一、問題描述 在Eclipse中建立了一個Maven工程, 然後更改JDK版本為1.7, 結果每次使用Maven > Update project的時候JDK版本都恢複成1.5。 二、原因分析 Maven官方文檔有如下描述: