上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 138 下一页
摘要: wx.navigateBack({//返回 delta:1 }) 方法如下: 一. var pages = getCurrentPages(); var prevPage = pages[pages.length - 2]; //上一个页面 //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 prevPage.setData({ mydata: {a:... 阅读全文
posted @ 2018-06-25 18:35 刘俊涛的博客 阅读(11814) 评论(0) 推荐(0) 编辑
摘要: update words set `indexkey` = UPPER(left(word,1)) mysql 取字段内容的第一个字符并大写 用到两个mysql函数: 转换为大写:upper( ) 截取函数:left( str,length ) 文章来源:刘俊涛的博客 地址:http://www.cnblogs.com/lovebing 欢迎关注,有问题一起学习欢迎留言、评论。 阅读全文
posted @ 2018-06-22 15:07 刘俊涛的博客 阅读(4411) 评论(0) 推荐(0) 编辑
摘要: 微信小程序 JS判断一个字符串是否包含一个子串函数. //str 字符串,name子串 contains:function(str,name){ if(str.indexOf(name) > -1){ return 1; }else{ return 0; } } ... 阅读全文
posted @ 2018-06-21 16:48 刘俊涛的博客 阅读(5680) 评论(0) 推荐(1) 编辑
摘要: 小程序 (node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit. 11 小程序内存泄露 有时候可能是音频或者视频播放时候出现的这样的错误。 我这个是播放音频爆的错误。 可能是接口的问题吧 文章来源... 阅读全文
posted @ 2018-06-14 11:25 刘俊涛的博客 阅读(7123) 评论(1) 推荐(0) 编辑
摘要: 文字不需要用户复制的时候,就不要加 selectable(文本是否可选) API安全问题,一定要做接口安全验证,防止数据泄露,被别人调用 …. --待续— 欢迎关注,有问题一起学习欢迎留言、评论。 阅读全文
posted @ 2018-06-14 10:46 刘俊涛的博客 阅读(306) 评论(0) 推荐(0) 编辑
摘要: JS 字符串转数组: var words =' likely, likely, likely,economic, economic'; //字符串中间已特殊符号隔开 var words = words.split(",");//转成数组类似php的explode函数 JS 字符串去重: function unique (array){ return arr... 阅读全文
posted @ 2018-06-13 14:20 刘俊涛的博客 阅读(17273) 评论(0) 推荐(0) 编辑
摘要: voice:function(){ var word = this.data.word; var src = 'https://……/'+word['word']+'.mp3'; console.log(src); this.innerAudioContext.autoplay = true; this.innerAudioContext.obeyMu... 阅读全文
posted @ 2018-06-12 16:03 刘俊涛的博客 阅读(4026) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> void main() {int a,b,c,d; scanf("%d,%d,%d",&a,&b,&c); d=max(a,b,c); printf("max=%d",d); getch(); /*暂停看运行结果*/ } int max(int x,int y,i 阅读全文
posted @ 2018-06-08 22:18 刘俊涛的博客 阅读(1484) 评论(0) 推荐(0) 编辑
摘要: 1 //takePlace里的循环写错了,j循环应该是 2 //for (j=i;j 6 7 int Array[3][3]; 8 void takePlace( ) 9 { 10 int i,j,t; 11 for(i=0;i<3;i++) 12 for(j=i;j<3;j++) 13 { 14 t=Array[i][j]; 15 Array[i... 阅读全文
posted @ 2018-06-08 21:54 刘俊涛的博客 阅读(1810) 评论(0) 推荐(0) 编辑
摘要: 微信小程序 定义全局数据、函数复用、模版等 微信小程序定义全局数据、函数复用、模版等问题总结: 1.如何定义全局数据 在app.js的App({})中定义的数据或函数都是全局的,在页面中可以通过var app = getApp(); app.function/key的方式调用,不过我们没有必要再ap 阅读全文
posted @ 2018-06-06 11:44 刘俊涛的博客 阅读(4906) 评论(1) 推荐(0) 编辑
上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 138 下一页