2018年5月31日 星期四
2018年5月29日 星期二
TinyMCE
https://www.tinymce.com/
TinyMCE
http://blog.pulipuli.info/2017/08/htmltinymce-online-html-editor.html
https://ckeditor.com/ckeditor-4/
(html5)
http://xing.github.io/wysihtml5/
(html5)
https://archive.codeplex.com/?p=jhtmlarea
https://github.com/crpietschmann/jHtmlArea
(html5)
http://www.nicedit.com/
https://kevinroth.com/rte/
https://kevinroth.com/rte/demo.htm
http://www.freetextbox.com
http://www.unverse.net
http://markitup.jaysalvat.com/home/
http://www.themaninblue.com/experiment/widgEditor/
http://www.freetextbox.com
http://www.wymeditor.org/demo/
http://www.openwebware.com
http://www.xstandard.com
http://www.nicedit.com/index.php
2018年5月25日 星期五
sprintf.js
https://github.com/alexei/sprintf.js
netbeans 8.0.1 修改行间距
https://svenspruijt.nl/themebuilder/
C:\Users\{Administrator}\AppData\Roaming\NetBeans\8.0\config\Editors\Preferences 目录下
C:\Users\allen\AppData\Roaming\NetBeans\12.0\config\Editors\Preferences\org-netbeans-modules-editor-settings-CustomPreferences.xml
-------------------------------------------------------
org-netbeans-modules-editor-settings-CustomPreferences.xml 文件
<editor-preferences>
//原来的代码
/** 添加的代码 -- 开始 */
<entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve">
<value><![CDATA[1.20]]></value> //间距数值
</entry>
/** 添加的代码 -- 结束*/
</editor-preferences>
重启netbeans 查看效果
-------------------------------------------------------
更改系統字型大小 >>
....Netbeans/etc/netbeans.conf
netbeans_default_options="....... --fontsize 17"
-------------------------------------------------------
Open netbeans.conf file (etc folder) and add "--fontsize 28" to netbeans_default_options value.
Example:
netbeans_default_options="--fontsize 28 -J-XX:+UseStringDeduplication -J-Xss2m -J-
NetBeans 深色背景主題更改教學
NetBeans 深色背景主題更改教學

請張開眼睛,不要忘記自己把檔案存到哪裡了嘿!



清除匿名函式監聽事件
清除匿名函式監聽事件
button.addEventListener('click', function () {//執行一次
console.log('only once');
this.removeEventListener('click', arguments.callee);
});
baidutemplate
<% for(var i = 0; i < 5; i++){ %>\
<% if(i<3){ %>\
<p>111111</p>\
<% _template_fun_array.push(x()); %>\
<% }else{ %>\
<p>222222</p>\
<% } %>\
<% } %>'
紅色的地方可化為 echo (x());
2018年5月22日 星期二
java.json
public static String[] getNames(JSONObject jo)
public Iterator<String> keys()
public JSONArray names()
public Iterator<String> keys()
public Set<String> keySet()
protected Set<Entry<String, Object>> entrySet()
public int length()
2018年5月19日 星期六
java.ajax
public interface Job<T> {
public void callback(T res);
}
-----------------------------------------------------------
// 發出 ajax需求
public class T_1 {
public StringBuilder res = new StringBuilder("hi");
public Inner job = new Inner();
public void setRes(StringBuilder res) {
this.res = res;
}
//=======================
// 相當於 js callback
class Inner implements Job<StringBuilder> {
public void callback(StringBuilder _res) {
setRes(_res);
System.out.println(res);
}
}
//=================================
public static void main(String[] args) {
// TODO Auto-generated method stub
Runnable db = null;
T_1 t = new T_1();
try {
db = new Mysql_1("xd702g3", "SELECT * FROM paris_roomtype", t.job);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Thread th_1 = new Thread(db);
th_1.start();
}
}
-----------------------------------------------------------
// ajax 處理
public class Mysql_1 implements Runnable {
private String db_path;
private String db_host = "jdbc:mysql://localhost/";
private String db_arg = "useUnicode=true&characterEncoding=Utf8";
private String username = "xd702g3";
private String password = "xd702g3";
private Connection con = null;
private Statement stat = null;
private ResultSet rs = null;
private String sql = null;
public StringBuilder res = new StringBuilder();
public Job<StringBuilder> job = null;
// ==========================================================================
public Mysql_1(String table, String sql,Job<StringBuilder> job) throws Exception {
// TODO Auto-generated constructor stub
db_path = db_host + table + "?" + db_arg;
this.sql = sql;
this.job = job;
connect();
}
// ==========================================================================
private void connect() throws Exception {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection(db_path, username, password);
stat = con.createStatement();
}
// ==========================================================================
private StringBuilder query() throws Exception {
rs = stat.executeQuery(sql);
while (rs.next()) {
var a = rs.getInt(1);
var b = rs.getString(2);
// System.out.println(a + "\t" + b);
res.append(b);
}
return res;
}
// ==========================================================================
@Override
public void run() {
try {
var res = query();
job.callback(res);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
// ==========================================================================
}
2018年5月16日 星期三
矩陣相乘
a(11)......a(1n)
.
.
a(m1)......a(mn)
--------------------------------------
B(n*p) =
b(11)......b(1p)
.
.
b(n1)......b(np)
--------------------------------------
C(n*p) =
c(11)......c(1p)
.
.
c(n1)......c(np)
--------------------------------------
A*B = C
--------------------------------------
c(11) = a(11)*b(11) + ........+ a(1n)b(n1)
.....
c(1p) = a(11)*b(1p) + ........+ a(1n)b(np)
.....
c(mp) = a(m1)*b(1p) + ........+ a(mn)b(np)
2018年5月11日 星期五
php 另一種引入其他 php檔的方法(處理模板,標籤命令的起手)
<?php
$d = 'hi.........';
$content = sprintf('?>%s', file_get_contents('b.php'));
// 解析,並執行 b.php 裡的內容
$s = eval($content);
// 備用,萬一執行裡面沒有 <?php ?>標籤
echo $s;
-----------------------------------------------------------------------------
b.php>>
printf('<h1>d = %s</h1>', @$d);