只需透過window.open 設定即可

Ex:

function printScreen(block){ ==> block 為預列印的div 區塊id
               var value = block.innerHTML;
                var printPage = window.open("","printPagebbbb",""); ==> 這裡我隨便取

JoshS 發表在 痞客邦 留言(0) 人氣()

git checkout branch  一般的 branch切換

git pull origin develop  也就是讓當前branch 去 pull develop的版本

git reset --soft HEAD^    假設commit了但還有資料忘了要修改則可使用此指令移除早先commit狀態

參考: https://blog.wu-boy.com/2010/08/git-%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6%EF%BC%9A%E5%88%A9%E7%94%A8-git-reset-%E6%81%A2%E5%BE%A9%E6%AA%94%E6%A1%88%E3%80%81%E6%9A%AB%E5%AD%98%E7%8B%80%E6%85%8B%E3%80%81commit-%E8%A8%8A%E6%81%AF/

JoshS 發表在 痞客邦 留言(4) 人氣()

在工作中有時會看見同事這麼用:

public static Map<String,List<String>> gatherCode ;
    static{
        gatherCode = new HashMap<String,List<String>>();
        List<String> A1E = new ArrayList<String>(){

JoshS 發表在 痞客邦 留言(0) 人氣()

有時要組Json 做加解密時常常會因為物件轉Json時的String 其物件內的屬性排序會亂排

則這時再透過ObjectMapper轉換前其Object物件內需加入@JsonPropertyOrder注入

Ex:

@JsonPropertyOrder({ "aa1", "aa2", "aa3"})
public class WxMicroPayRq {

JoshS 發表在 痞客邦 留言(0) 人氣()

ArrayList 是非同步 故執行起來比Vector快

而Vector 是同步 的其好處是在處理多執行序時會等待先到的一方執行完後才執行下一個 

用在處理資料庫等方面是挺安全的

JoshS 發表在 痞客邦 留言(0) 人氣()

import com.fasterxml.jackson.databind.ObjectMapper;

String response = null;
 response = HttpsUtil.connectionHttpsPostJsonDataAndReturnStringWx(URL, data); // httpPost 方法

ObjectMapper mapper = new ObjectMapper();

JoshS 發表在 痞客邦 留言(0) 人氣()

        String encryptSha256Data = this.eccrypt(JsonUtil.objectToSting(data));
        RSAPrivateKey rsaPrivateKey = this.getPrivateKey(wxPublicKey);
        String encryptRSAData = this.encrypt(rsaPrivateKey, encryptSha256Data.getBytes());

JoshS 發表在 痞客邦 留言(0) 人氣()

import org.codehaus.jackson.map.ObjectMapper;

string json ={ name:王曉明,age:30,birthday:1999/01/01 }

 JsonNode jsonNode = objectMapper.readTree(json);

 String name =  jsonNode.path("name ").asText()

以上通常會被做成function

JoshS 發表在 痞客邦 留言(0) 人氣()

我po問了

China is a country known for its censorship of the internet.
請教一下這句的文法! known這裡應該是被動式 為何可以直接省略be動詞?

得到了許多網友熱心的回複,我這趕緊記下

JoshS 發表在 痞客邦 留言(0) 人氣()

指令的部分可查詢 鳥哥linux網站: http://linux.vbird.org/linux_basic/redhat6.1/linux_06command.php

開啟putty後 在左上方有個session選項>>點選後右方出現資訊>>這時可以建入需要進入的電腦Port >>建立結束後點選進入

history : 可觀看之前人的輸入歷史記錄

cd : 進入資料夾  ps: 資料夾大小寫都要分得很清楚,key一個單字後可用Tab建自動補齊(若有相同會無法動做)

ls : 目前在哪一層有哪些資料可進入

JoshS 發表在 痞客邦 留言(0) 人氣()

mvn clean install -Dmaven.test.skip=true

在管按總管的文件專案上  >> 押SHIT+右建 >> 選在此處開啟命令式窗 >> 輸入mvn clean install -Dmaven.test.skip=true 

這方式可以略過test去build pom擋

JoshS 發表在 痞客邦 留言(0) 人氣()

load(url,data,function(response,status,xhr)) 

參考網站:http://www.w3school.com.cn/jquery/ajax_load.asp

它機乎與 $.get(url, data, success) 相等,不同的是它不是全局函数,并且它拥有隐式的回调函数。当侦测到成功的响应时(比如,当 textStatus 为 "success" 或 "notmodified" 时),.load() 将匹配元素的 HTML 内容设置为返回的数据。这意味着该方法的大多数使用会非常简单:

JoshS 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。