Skip to content

Instantly share code, notes, and snippets.

View magixsource's full-sized avatar
🏠
Working from home

LIN magixsource

🏠
Working from home
View GitHub Profile
@magixsource
magixsource / CreateEditS_User.xml
Last active December 21, 2015 18:39
XML is first class citizen in scala Here is a xml named createedits_user,and i need @name and @cnname as format output like @name:@cnname Plan A: copy @name and @cnname by myself (It's slowly,i don't like it) Plan B: let program help me do it.got @name and @cnname and format output them. I choose plan B,so what program language use? A: Java B: S…
<?xml version="1.0" encoding="gb2312"?>
<FormItems systemId="20049370122864" entryName="S_USER" tableName="用户" help="" isWorkFlow="" version="">
<item name="sYS_RESERVER1" cnname="登录名" inputType="text" dataType="string" dbType="string" maxLength="6" constrain="must" editable="false" wheneditable="load">
<value />
</item>
<item name="sYS_RESERVER2" cnname="确认密码" inputType="password" dataType="string" dbType="string" maxLength="30" constrain="must">
<value />
</item>
<item name="sYS_RESERVER3" cnname="所在部门中文名称" inputType="hidden" dataType="string" dbType="string" maxLength="30" editable="false">
<value />
@magixsource
magixsource / blocking-jquery
Created June 12, 2014 09:48
blocking function depend non-blocking function
// XHR lib use jquery
// jsonp url
var url = "http://www.google.com/jsonp/search.html"
// query keys
var array = new Array("google.com","baidu.com","yahoo.com","bing.com","soso.com");
//$.getJSON is a non-blocking function,load jsonp data here
function nonBlockingLoad(o){
@magixsource
magixsource / helper.js
Created June 12, 2014 14:13
This is a chrome extension named dongqiudi
var answers = new Array("巴蒂","贝克汉姆","菲戈","雷米特杯","魔兽","兵工厂","教授","欧文","小罗","里皮","保罗","托雷斯","罗马里奥","郑大世","贝尔","厄齐尔","比利亚","齐达内","罗纳尔多","尼日利亚","布斯克茨","巴洛特利","齐达内","电话门","大黄蜂","贝克汉姆","沃尔科特","兰帕德","巴拉圭","10巴特兹","克洛泽","卡卡","C罗","卡恩","舍普琴科","方丹","飞火流星","法兰克福","安切洛蒂","苏克","罗纳尔多","贝隆","贝贝托","利物浦","年轻人","克洛泽","卡西利亚斯","伊布","拉涅利","因扎吉","范尼","斯基拉奇","格罗索","里贝里","巴乔","哈维","伊涅斯塔","莫雷洛","苏格拉底","全攻全守","沙特","西蒙尼","杰拉德","拉姆","国际米兰","布里奇","弟媳","穆里尼奥","布雷默","兰帕德","马拉多纳","戴维斯","伊涅斯塔","英格兰","阿内尔卡","哥伦比亚","格罗索","利比里亚","内马尔","鲁尼","卡洛斯","梅西","翻译","萨基","哈吉","米拉","希勒","弗格森","巴拉克","克雷斯波","贝利","伊布","马特乌斯","济科","乌龙","鸭子","任意球","克洛泽","内斯塔","亨利","加斯科因","内德维德","图拉姆","多梅内克","贝肯鲍尔","伊瓜因","匈牙利","科隆","马修斯","土耳其","坎通纳","奥特加","谢亚龙","卡马乔","塞内加尔","塞萨尔","英格兰","朝鲜","切赫","诺伊尔","皮耶罗","尼日利亚","山东鲁能","李金羽","萨连科","洪明浦","博斯克","托雷斯","穆里尼奥","梅西","克林斯曼","米卢","贝肯鲍尔","佩鲁贾","容祖儿","意大利","雅辛","巴乔吗","特维斯","c罗","坎波斯","伊基塔","佐夫","莱茵克尔","墨索里尼","兰帕德","赫斯特","贝利","团队之星","布兰克","克鲁伊夫","埃托奥","菲戈","布冯","阿曼","挪威","郑智","马赛","帕勒莫","马特乌斯","托蒂","巴尔德拉马","皮耶罗","皮尔洛","扎卡尔多","墨西哥","扎加洛",
@magixsource
magixsource / Jsonable.java
Created July 2, 2014 13:09
datatables request and response by java
package com.lp.jackson;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
public class Jsonable {
linpeng@LINPENG /D/dev/jhipster2/guilin2
$ yo
? 'Allo magixsource! What would you like to do? Jhipster
Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo jhipster
██ ██ ██ ████████ ███████ ██████ ████████ ████████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
linpeng@LINPENG /D/dev/jhipster2/guilin3
$ yo jhipster
██ ██ ██ ████████ ███████ ██████ ████████ ████████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████████ ██ ███████ █████ ██ ██████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ████████ ██ ██████ ██ ████████ ██ ██
http://jhipster.github.io
D:\dev\jhipster2\guilin>yo
? 'Allo magixsource! What would you like to do? Jhipster
Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo jhipster
██ ██ ██ ████████ ███████ ██████ ████████ ████████ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████████ ██ ███████ █████ ██ ██████ ███████
// Generated on 2016-08-22 using generator-jhipster 3.6.1
'use strict';
var gulp = require('gulp'),
rev = require('gulp-rev'),
templateCache = require('gulp-angular-templatecache'),
htmlmin = require('gulp-htmlmin'),
imagemin = require('gulp-imagemin'),
ngConstant = require('gulp-ng-constant'),
rename = require('gulp-rename'),
@magixsource
magixsource / load_csv_data.R
Created January 9, 2018 14:11
poc data display in R language
#scan
library(readr)
path <- "~/桌面/r-sandbox/csv/"
loadCsvData <- function(path){
setwd(path)
csvDatas <- list()
files <- list.files(path = path,pattern = "*.csv")
for(i in 1:length(files)){