see https://cli.vuejs.org/zh/guide/prototyping.html
# install
npm install -g @vue/cli-service-global
# run
vue serve TodoApp.vuesee https://cli.vuejs.org/zh/guide/prototyping.html
# install
npm install -g @vue/cli-service-global
# run
vue serve TodoApp.vue| /** | |
| * 导出csv文件 | |
| * @see https://gist.github.com/dannypule/48418b4cd8223104c6c92e3016fc0f61 | |
| */ | |
| class json2csv { | |
| exportCSVFile(headers, items, fileTitle) { | |
| if (headers) { | |
| items.unshift(headers); | |
| } |
| /* | |
| 用途:检查输入的Email信箱格式是否正确 | |
| 输入:strEmail:字符串 | |
| 返回:如果通过验证返回true,否则返回false | |
| */ | |
| function checkEmail(strEmail) | |
| { | |
| //var emailReg = /^[_a-z0-9]+@([_a-z0-9]+\.)+[a-z0-9]{2,3}$/; | |
| var emailReg = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/; | |
| if ( emailReg.test(strEmail) ) { |
| (function (modules) { | |
| // The module cache | |
| var installedModules = {}; | |
| // The require function | |
| function __webpack_require__(moduleId) { | |
| // Check if module is in cache | |
| if (installedModules[moduleId]) { | |
| return installedModules[moduleId].exports; | |
| } | |
| // Create a new module (and put it into the cache) |
| ```javascript | |
| (function{ | |
| if(window.DeviceMotionEvent) { | |
| alert('you'); | |
| window.addEventListener('devicemotion', deviceMotionHandler, false); | |
| }else{ | |
| alert('no'); | |
| } | |
| internal void MergeTable(DataTable src) | |
| { | |
| bool enforceConstraints = false; | |
| if (!this.isStandAlonetable) | |
| { | |
| if (src.DataSet == this.dataSet) | |
| { | |
| return; | |
| } | |
| enforceConstraints = this.dataSet.EnforceConstraints; |
| static void Main(string[] args) | |
| { | |
| Console.WriteLine(DateTime.Now.ToString("yyyyMMdd")); | |
| Console.WriteLine(DateTime.Now.ToString("yyyy-MM-dd")); | |
| Console.WriteLine(DateTime.Now.ToString("yyyy/MM/dd")); | |
| Console.WriteLine(DateTime.Now.ToString("yyyy年MM月dd日")); | |
| Console.WriteLine(DateTime.Now.ToString("yyyy~MM~dd")); | |
| /* 输出: |
| //十进制转二进制 | |
| Console.WriteLine(Convert.ToString(69, 2)); | |
| //十进制转八进制 | |
| Console.WriteLine(Convert.ToString(69, 8)); | |
| //十进制转十六进制 | |
| Console.WriteLine(Convert.ToString(69, 16)); | |
| //二进制转十进制 | |
| Console.WriteLine(Convert.ToInt32("100111101", 2)); | |
| //八进制转十进制 |
| staic void Main() | |
| { | |
| Consolw.WriteLine("Hello World."); | |
| } |
| <!DOCTYPE html> | |
| <html lang="zh-cn"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="author" content="EdieLei" /> | |
| <title>HTML5 图片上传预览</title> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| $('#img').change(function(){ |