Skip to content

Instantly share code, notes, and snippets.

Avatar
Never stop

ruan4261 ruan4261

Never stop
View GitHub Profile
View the_easy_implementation_for_your_ideas.md

The easy implementation for your ideas.

Drawing

  1. Nvidia Canvas

    Desc


    Nvidia 公司推出的一个人工智能照片编辑软件,可以免费下载。用户只要选择要添加的对象(比如云彩),在对应的位置上涂抹几笔,就能够自动生成照片。

View is_empty.js
/**
* Only for String and ArrayLike.
* Return false if parameter is an object.
*
* @return {boolean}
*/
function isEmpty(obj) {
return (
obj === undefined ||
obj === null ||
View bind_detail_field_change_event.js
/**
* 对指定明细表指定字段(列)绑定变化事件, 绑定的数据行包括已存在的数据行及未来新建的数据行(该方法只需执行一次)
*
* @param detailIndex 明细表索引是对于当前流程而言的, 与模板无关(同一个明细表在不同节点模板内拥有相同的索引)
* @param fieldId 单个字段的id
* @param func 可用参数列表[rowIdx, changedElement]
*/
function bindDetailFieldChangeEvent(detailIndex, fieldId, func) {
var bindEvent = function (idx) {
var jq = jQuery("#field" + fieldId + "_" + idx);
View getUrlParams.js
function getUrlParams() {
var query = location.search// from ? to #
var params = {}
if (query.length > 1) {
var queryStr = query.substr(1)
var entry = queryStr.split('&')
for (var i = 0; i < entry.length; i++) {
var kv = entry[i].split('=')
var key = kv[0]
var value = kv[1]// maybe undefined
View words.md

Words

Reference

欧路词典, 沪江小D辞典, 谷歌翻译, 剑桥辞典, 百度翻译等

Template

英文(缩写) 中文 词性 美音 英音

2021

May

View PermutationAndCombination.java
// Arrangement or Permutation
int P(int n, int m) {
int res = 1;
int limit = n - m;
while (n > limit) {
res *= n--;
}
return res;
}
View reverse_int.java
public int rev(int x) {
int res = 0;
while (x > 0) {
int mod = x % 10;
x /= 10;
res = res * 10 + mod;
}
return res;
}
View dynamic_import_javascript.js
window.dynamic_import_javascript = function(url, text, type, frameWindow){
frameWindow = frameWindow || window
var doc = frameWindow.document
var container = frameWindow.document.head || frameWindow.document.body
var newEle = doc.createElement('script')
if (url)
newEle.src = url
if (text)
newEle.appendChild(document.createTextNode(text))
newEle.type = type || 'text/javascript'
View linux_cmd_mean.md

常用

  • ls: list
  • cd: change directory
  • su: switch user
  • pwd: print work directory
  • ps: process status
  • lsof: list open file
  • df: disk free
  • du: disk usage
  • rm: remove
View ProxyGenerator_important_method.md

一个ProxyGenerator实例代表一个代理类

ProxyGenerator实例中重要的属性

  /** 保存所有接口的方法, key为方法签名, value中位不同返回值的同签名方法 */
  Map<String, List<ProxyMethod>> proxyMethods;
  
  /** 保存最终的字段信息, 每一个元素会生成一个实例字段 */
  List<FieldInfo> fields;
  /** 保存最终的方法信息, 每一个元素会生成一个实例方法 */