热门 在个别场景中实现小行星

时间:2017-9-19   作者:lininn   分类: 随笔   热度:2149°    
时间:2017-9-19   分类: 随笔    热度:2149  
然后在tour.xml的scene标签外面书写: <events name="littleplanetintro_control" keep="true" onnewpano=" if(scene[get(xml.scene)].index == 0 OR scene[get(xml.scene)].index == 4, skin_setup_littleplanetintro() )" /> 第0个场景或者第4个场景实现小行星; 或者littleplanetintro="true" ...

阅读全文>>

热门 node创建流

时间:2017-9-8   作者:lininn   分类: node   热度:2054°    
时间:2017-9-8   分类: node    热度:2054  
var fs = require("fs"); var data = ''; // 创建可读流 var readerStream = fs.createReadStream('input.txt'); // 设置编码为 utf8。 readerStream.setEncoding('UTF8'); // 处理流事件 --> data, end, and error readerStream.on('data', function(chunk) { data += chunk; }); readerStream.on('end',function(...

阅读全文>>

热门 node 写入流

时间:2017-9-8   作者:lininn   分类: node   热度:2047°    
时间:2017-9-8   分类: node    热度:2047  
var fs = require("fs"); var data = '12121'; // 创建一个可以写入的流,写入到文件 output.txt 中 var writerStream = fs.createWriteStream('output.txt'); // 使用 utf8 编码写入数据 writerStream.write(data,'UTF8'); // 标记文件末尾 writerStream.end(); // 处理流事件 --> data, end, and error writerStream.on('finish', functio...

阅读全文>>

热门 node 压缩解压缩

时间:2017-9-8   作者:lininn   分类: node   热度:2105°    
时间:2017-9-8   分类: node    热度:2105  
var fs=require("fs"); var zlib=require("zlib"); // fs.createReadStream("1.txt").pipe(zlib.createGzip()).pipe(fs.createWriteStream("1.txt.gz"));//压缩 fs.createReadStream("1.txt.gz").pipe(zlib.createGunzip()).pipe(fs.createWriteStream("1.txt"));//解压 console.log("ok");

阅读全文>>

热门 跨静态页面传递json数据

时间:2017-9-5   作者:lininn   分类: Html   热度:3017°    
时间:2017-9-5   分类: Html    热度:3017  
今天又遇到了需要跨静态页面间传递json数据的方法,总结总结,都有其优缺点, 1.利用cookie传值的方法:(注意有缺点,当存储数据比较多的时候就可能出现丢失,取得的cookie为空,所以提前估量数据量) function setCookie(c_name, value, expiredays) { var exdate = new Date() ; exdate.setDate(exdate.getDate() + expiredays); document.cookie = c_name + "=" + escape(value) ...

阅读全文>>

热门 使用iframe完整嵌入外链页面

时间:2017-8-31   作者:lininn   分类: Html   热度:3712°    
时间:2017-8-31   分类: Html    热度:3712  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>iframe tag test</title> <style type="text/css"> html, body ...

阅读全文>>

热门 mui封装点击位置出现按钮

时间:2017-8-25   作者:lininn   分类: mui   热度:2414°    
时间:2017-8-25   分类: mui    热度:2414  
html内容: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <title></title> <script src="js/mui.min.js"...

阅读全文>>

热门 vue路由变化监听

时间:2017-8-15   作者:lininn   分类: Vue   热度:2975°    
时间:2017-8-15   分类: Vue    热度:2975  
watch:{ $route(to,from){     // to.path这个为路径     if(to.path=="home"){     this.$store.dispatch("aa");//aa为方法名     } alert("路由change"); } }

阅读全文>>

热门 vue 使用vuex

时间:2017-8-14   作者:lininn   分类: Vue   热度:2599°    
时间:2017-8-14   分类: Vue    热度:2599  
app.vue: <template> <div id="app"> <input type="button" value="增加" @click="add"> <h1>{{count}}</h1> </div> </template> <script> import {mapGetters,mapActions} from "vuex" export default { name: 'app', computed:mapGe...

阅读全文>>

返回顶部    首页    手机版本    后花园   会员注册   
版权所有:覆手为雨    站长: lininn