This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://MiZhu@cpa-bitbucket.adaptavist.com/scm/proj/inprotechkaizen.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def find_max_circle(next_items): | |
| visited = {} | |
| max_circle = 0 | |
| for current in next_items: | |
| if current in visited: | |
| continue | |
| path = [] | |
| p = current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // npm install webpack react reactdom babel-preset-react babel-core babel-loader | |
| module.exports = { | |
| entry: './app.jsx', | |
| output: { | |
| path: './dist', | |
| filename: 'bundle.js' | |
| }, | |
| module: { | |
| loaders: [{ | |
| test: /\.jsx$/, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var map = require('map-stream'); | |
| var gulp = require('gulp'); | |
| var htmlsrc = require('./htmlsrc.js'); | |
| gulp.task('default', function() { | |
| //gulp.src('src/**/*.js') | |
| // .pipe(map(function(file, next) { | |
| // console.dir(file); | |
| // next(null, file); | |
| // })) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fs = require('fs'); | |
| var pathHelper = require('path'); | |
| // var files = fs.readdirSync(pathHelper.join(__dirname, 'root')); | |
| // files.forEach(function(a) { | |
| // console.log(a); | |
| // }); | |
| // console.log(readConfig('root/a')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MemoryCache : IObjectCache | |
| { | |
| public T Get<T>(CacheKey key, DateTime absoluteExpiration, Func<T> load) | |
| { | |
| var policy = new System.Runtime.Caching.CacheItemPolicy(); | |
| policy.AbsoluteExpiration = absoluteExpiration; | |
| return Get(key, policy, load); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git ls-remote origin | |
| git remote add qa git://qaserver/round1 | |
| git fetch qa | |
| git branch --track test origin/test | |
| git push origin <branch name> | |
| git pull origin <branch name> | |
| git push origin --delete v0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git daemon --reuseaddr --base-path=j:\git --export-all --verbose --enable=receive-pack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var type = typeof(T); | |
| var props = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.SetProperty); | |
| var dr = Expression.Parameter(typeof(IDataReader), "dr"); | |
| var result = Expression.Parameter(typeof(List<T>), "result"); | |
| var resultAdd = typeof(List<T>).GetMethod("Add"); | |
| var drRead = typeof(IDataReader).GetMethod("Read"); | |
| var getOrdinal = typeof(IDataRecord).GetMethod("GetOrdinal"); | |
| ParameterExpression[] ords = props.Select((prop, index) => Expression.Variable(typeof(int), "ord" + index)).ToArray(); | |
| var itm = Expression.Parameter(type, "itm"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re, urllib2, subprocess, zipfile, os, shutil | |
| #first install wkhtmltopdf | |
| tool_path = r'C:/Program Files/wkhtmltopdf/wkhtmltopdf.exe' | |
| data_source = r'D:\TFS\ETTfsApp\EnglishTown\Team_ELab\Development\Source\ELab\ELab\EFSchools.Englishtown.ELab.UI\_scripts\elab-ui\library\binddataelibresults.js' | |
| def process(urls): | |
| for url in urls: | |
| print 'processing', url | |
| try: |
NewerOlder