2018年1月23日

[MySQL] Workbench 「Error Code: 1175」 的解決方法

 Edit→Preferences…→SQL Editor

[Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)]不要打勾

OK

要重啟一下Workbench!

[CSS] css 移除 點連結時 會預設有的框


a{
outline: none; /* for Firefox */
hlbr:expression(this.onFocus=this.blur()); /* for IE */
}


https://www.minwt.com/webdesign-dev/css/1144.html

[JQuery] 讓AJAX運作的時候,跳出loding的訊息

[程式][JQuery] 讓AJAX運作的時候,跳出loding的訊息。-Part 1 @ 四處流浪的阿基。I am Vagrant Walker :: 痞客邦 PIXNET ::
http://expect7.pixnet.net/blog/post/39829979-%5B%E7%A8%8B%E5%BC%8F%5D%5Bjquery%5D-%E8%AE%93ajax%E9%81%8B%E4%BD%9C%E7%9A%84%E6%99%82%E5%80%99%EF%BC%8C%E8%B7%B3%E5%87%BAloding%E7%9A%84%E8%A8%8A

[Eclipse] 讓程式碼看的出與git的差異 (不是按compare)

General → Editors → Text Editors → Quick Diff 

ref:

EGit/User Guide/State - Eclipsepedia
http://wiki.eclipse.org/EGit/User_Guide/State

Instead of using a compare editor you can enable quick diff support and see the changes within the text editor. This feature can be enabled via the General > Editors > Text Editors > Quick Diff preference page:

@QueryParam NULL but @RequestParam OK

Q:加了@QueryParam 明明有傳參數但 一直抓到null  why!!

A:改用@RequestParam

ref:
https://stackoverflow.com/questions/36392717/queryparam-always-showing-null

Because you are using Spring MVC, which has no connection whatsoever to JAX-RS, which @QueryParam is for. Spring using @RequestParam. If you are going to use Spring, I suggest you get rid of your JAX-RS Dependency, so you don't get confused on what you can and can't use.

[PowerShell] 看動態LOG

Get-Content myTestLog.log –Wait


https://stackify.com/13-ways-to-tail-a-log-file-on-windows-unix/

查詢被佔用的PORT

Windows如何查詢被佔用的PORT
C:\> netstat -nao |find "0.0.0.0:80"

TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4116

C:\> tasklist /fi "pid eq 4116"

映像名稱 PID 工作階段名稱 工作階段 # RAM使用量

========================= ======== ================

skype.exe 4116 Console 0 6,476 K

C:\> taskkill /pid 4116 /F

成功: 處理程序 PID 4116 已經終止了。



Linux如何查詢被佔用的PORT
# netstat -apn |grep 80

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8688/httpd

# lsof -i:80

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

httpd 8688 apache 3u IPv4 243301 TCP *:http (LISTEN)

httpd 8689 apache 3u IPv4 243301 TCP *:http (LISTEN)

# kill -9 8688


http://herolin.twbbs.org/entry/how-to-check-port-which-used-program-for-windows-and-linux/

[Quartz] 清空QUARTZ排程的mysql table


有時要對Trigger時間修改 或是其他有的沒的 想要先清空DB時

清除DB如下:

delete from QRTZ_SIMPLE_TRIGGERS;

delete from QRTZ_TRIGGERS;

delete from QRTZ_JOB_DETAILS;

delete from QRTZ_CRON_TRIGGERS;


(程式run起來後  排程會自動再寫入)




[Maven]把所有用到的jar 獨立在專案下的資料夾

1.在pom裡增加
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
</configuration>
</plugin>
</plugins>
</build>

2.執行mvn dependency:copy-dependencies

[Eclipse]安裝DECOMPILER 的PLUGIN

Step 1: Go to Help -> Install New Software -> click on 'Add'

Step 2: On pop-up fill these below details:

Name: JavaDecompiler

Location: http://jd.benow.ca/jd-eclipse/update/

Step 3: Click on checkbox - Java Decomplier Eclipse Plug-in.

Step 4: Click -> Next -> Next -> Accept The Agreement -> Finish

Step 5: Click on check-box -> Accept the trust certificate -> OK

Step 6: Restart the eclipse.



https://stackoverflow.com/questions/34368880/eclipse-mars-java-decompiler

[Eclipse]更改eclipse @author的預設名字

在eclipse的目錄下找到eclipse.ini檔,

在-vmargs後邊添加上啟動參數:-Duser.name=XXXX

重啟eclipse

done!