Skip to content

Instantly share code, notes, and snippets.

Avatar
Never stop

ruan4261 ruan4261

Never stop
View GitHub Profile
View ec_checkCustomize.js
jQuery(document).ready(function () {
window._check_customize_ = []
window._check_customize_.push(window.checkCustomize)
window._check_customize_.push(function () {
// custom
})
window.checkCustomize = function () {
var res = true
window._check_customize_.forEach(function (checkCustomize) {
View oracle_query_with_timestamp_rollback.sql
SELECT columns FROM table AS OF TIMESTAMP TO_TIMESTAMP('rollback time','YYYY-MM-DD HH24:MI:SS')
View oracle_structure_compare.sql
select v1.table_name,v2.table_name, v1.column_name,v2.column_name,
v1.data_type,v2.data_type,v1.data_length,v2.data_length ,v1.data_precision,v2.data_precision,v1.data_scale,v2.data_scale
from
(select * from user_tab_columns where table_name='table_A') v1 left join
(select * from user_tab_columns where table_name='table_B') v2 on v1.column_name=v2.column_name
-- Pay attention to the case of the table name
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;
  /** 保存最终的方法信息, 每一个元素会生成一个实例方法 */
View the-fastest-way-to-exchange-binary-values.js
/**
* better
*/
function(a, b) {
a = a ^ b
b = a ^ b
a = a ^ b
}
/**
View binaryPow.java
// 不能输入负数参数
long binaryPow(long base, long exponent) {
long res = 1;
while (exponent > 0) {
if ((exponent & 1) == 1) res *= base;
base *= base;
exponent >>= 1;
}
return res;
}