- 微信小程序----获取定位,并自定义气泡框customCallout,查看轨迹
cccc☜
微信小程序微信小程序小程序
微信小程序获取定位,并自定义气泡框customCallout,查看轨迹获取经纬度,并在地图上显示markerlatitudelongitudemarkers:标记点polyline:路线show-location:显示带有方向的当前定位点enable-satellite:是否开启卫星图bindcallouttap:点击标记点对应的气泡时触发e.detail={markerId}bindmarker
- 自定义事件
卡农me
//创建自定义事件varevt=newwindow.CustomEvent('haha',{bubbles:true,//是否可冒泡cancelable:true,//是否可取消detail:'msg'//传递的参数});document.querySelector('.s').addEventListener('haha',function(e){alert('s'+e.detail);});d
- 微信小程序获取手机号
飞不起来的飞机耶耶耶
微信小程序小程序
1、先新建vue页面打开看到页面是下图在method定义方法源码:登录{{phone}}exportdefault{data(){return{phone:""}},methods:{getPhoneNumberFn(e){//console.log(e.detail);//console.log(e.detail.encryptedData);//加密之后得用户隐私信息letencryptedD
- 判断滚轮滚动方向
Otherthing
js判断:varscrollFunc=function(e){e=e||window.event;if(e.wheelDelta){//判断浏览器IE,谷歌滑轮事件if(e.wheelDelta>0){//当滑轮向上滚动时//事件}if(e.wheelDelta0){//当滑轮向上滚动时//事件}if(e.detail<0){//当滑轮向下滚动时//事件}}}//给页面绑定滑轮滚动事件if(doc
- UNI-APP_使用swiper轮播以及解决自动,手动切换页面抖动问题
小歪 | 前端
#UNI-APPuni-app
swiperChange(e){let{current,source}=e.detail//只有页面自动切换,手动切换时才轮播,其他不允许if(source==='autoplay'||source==='touch'){this.current=current;}},
- 小程序支付流程详解
安安DE爸爸
javascript
一、小程序需要是企业级开发,并且将开发者加入开发者白名单二、支付实现1、获取用户信息获取授权`handleGetUserInfo(e){//1获取用户信息const{encryptedData,rawData,iv,signature}=e.detail;}2、调用wx.login()获取小程序登录成功后的codeexportconstlogin=()=>{returnnewPromise((re
- uniapp的H5网页版添加uni-AD广告代码以及方法,以“想发APP”网页版为例
爱最可爱最活泼的你
笔记uni-app前端vue.js
直接在主页面或其他需要展现的页面插入如下代码:exportdefault{data(){return{title:'ad'}},methods:{onload(e){console.log("onload");},onclose(e){console.log("onclose:"+e.detail);},onerror(e){console.log("onerror:"+e.detail.errC
- Uniapp 解决组件在官方文档不支持的事件上,接收小程序原生组件事件
卡尔特斯
UniAppuni-app小程序前端
现在需要在抖音小程序上使用加粉丝群功能,官方button有自带这个功能,但是Uniapp官网并没有支持,一个是open-type类型,一个是回调事件bindjoingroup:page{(data:{},handleJoinGroup(e){console.log(e.detail)})}在原生中是这么使用,如果在不通过小程序原生自定义uniapp组件的情况下,能不能直接使用呢,答案是可以的。在u
- TDesign 学习const{ trigger } = e.detail
素心如月桠
前端javascript开发语言
代码理解//pages/maintenance/index.jsPage({/***页面的初始数据*/data:{},/***生命周期函数--监听页面加载*/onLoad(options){},/***生命周期函数--监听页面初次渲染完成*/onReady(){},/***生命周期函数--监听页面显示*/onShow(){},/***生命周期函数--监听页面隐藏*/onHide(){},/***生
- 微信小程序内联h5页面,实现分享
听风在笑
在小程序内直联h5的页面(pages/webview/webview.js),该页面为的容器,使用组件需要bindmessage事件和postMessage方法bindmessage:网页向小程序postMessage时,会在特定时机(小程序后退、组件销毁、分享)触发并收到消息。e.detail={data}也就是说,该事件的触发时机只有三种,是延迟的。可以将分享的数据通过该事件获取。1、如何分享
- uni-app input 实时监听input 值
淚迷
vue
*onInput(e){console.log(e.detail)}
- 完美解决微信小程序使用复选框van-checkbox无法选中
船长在船上
小程序微信小程序前端javascript
由于小程序使用了vant-ui框架,导致checkbox点击无法选中问题我已阅读并同意>《用户协议》《隐私政策》记得定义checked默认值解决办法:添加onChange事件,给checked做赋值操作。我已阅读并同意《用户协议》《隐私政策》onChange(e){this.setData({checked:e.detail})},可以打印看看console.log(e)选中效果:取消选中效果:
- js判断手指的上滑,下滑,左滑,右滑,事件监听 和 判断鼠标滚轮向上滚动滑轮向下滚动
夜空孤狼啸
Vue前端技巧方法JavaScript性能优化javascript前端
js判断手指的上滑,下滑,左滑,右滑,事件监听和判断鼠标滚轮向上滚动滑轮向下滚动pc端判断鼠标滚轮向上滚动滑轮向下滚动constscrollFunc=(e)=>{e=e||window.event;letwheelDelta=e.wheelDelta?e.wheelDelta:-e.detail*50;if(wheelDelta>0){console.log(wheelDelta+‘滑轮向上滚动’
- 微信小程序中pdf的上传和下载
joan_85
微信小程序pdf小程序
微信小程序中pdf的上传和下载上传两种方法:上传1:1.用vantweapp组件://pdf上传--vantweapp组件page({data:{fileList:[],//pdf上传}})afterReadFile:function(e){letthat=this;const{file}=e.detail;letmyId=that.data.myId;//console.log(file,100
- 小程序data数据 双向绑定封装
Best_Program
1、数据类型name:"",//////////////inputonChange(e){this.setData({[e.currentTarget.dataset.value]:e.detail,})},2、数据类型hjall:[{text:"",},{text:"",},{text:"",}],给数据赋值//////////////hjChange(e){letnewhjall=this.d
- 【微信小程序+Vant】DatetimePicker组件切换日期时跳来跳去的解决办法
Komorebi゛
微信小程序自定义组件前端微信小程序vant
问题描述原本的写法是添加了bind:input="onInput"事件,并在js文件中加入了如下代码:onInput(e){this.setData({currentDate:e.detail,})}结果:在手机上预览时发现滑动日期时它会自己跳来跳去,使用感很不好。
- 微信小程序-抖音/字节小程序
abandon̸
微信小程序微信小程序
微信小程序是小程序的鼻祖所以小程序几乎是和微信小程序技术通用的微信小程序项目转成抖音/字节小程序一把wx替换成tt二手机号授权api改成手机号授权必须上线项目才可以使用获取手机号//绑定手机号getPhoneNumber(e){console.log(e.detail)tt.showLoading({title:'手机号授权中',mask:true})//给后台解析获取手机号}三支付api改为tt
- 微信小程序内嵌webview实现微信登录
他亲爱的爸爸
javascriptreact.jshtml前端
一、调研场景1,微信小程序内嵌webview实现微信登录二、技术实现1.web-view标签实现链接内嵌小程序里嵌套web-view页面(1)src属性:webview指向网页的链接。可打开关联的公众号的文章,其它网页需登录小程序管理后台配置业务域名。(2)bindmessage属性:网页向小程序postMessage时,会在特定时机(小程序后退、组件销毁、分享)触发并收到消息。e.detail=
- 小程序父子组件通信-传值
ddr66288
父组件中default-value为传递给子组件的值父组件jsshowPickerDate(e){this.setData({showPicker:true})//调用子组件中methods的onshow方法this.selectComponent('#picker-date').onshow()},//获取子组件信息toggleToast(e){console.log(e.detail)}子组件
- Picker 地区选择器
逸笛
图片.png注意:一定要按格式初始化region,否则会报错图片.pngimport{View,Text,Picker}from"@tarojs/components";state={region:['北京市','北京市','东城区'],};所在地区当前选择:{this.state.region}//地区选择器onChange=e=>{this.setState({region:[e.detail
- 阿里IOT播放器 uniapp iOS端插件说明
reyzhang
插件名称:AliIotPlayer.nvue中导入播放停止播放视频截图直播状态js脚本:console.log("it'sme");exportdefault{data(){return{title:'Hello'}},onLoad(){},methods:{/***监听viewDidLoad是否被执行*/onPlayerViewDidLoad(e){console.log(e.detail);}
- element this.$confirm确认框,确认按钮阻止键盘回车事件
nengzhuan_zhang
beforeClose(action,instance,done){if(action==="confirm"){instance.$refs["confirm"].$el.onclick=(function(e){e=e||window.event;if(e.detail!=0){done();}})();}else{done();}},参考文献:https://blog.csdn.net/zo
- 小程序表单中 多个循环input 如何取每个input的值
#面向百度编程
笔记
具体思路:e.detail.value会取到表单中所有input的值,据此得到每一个input的值再对data进行赋值实例:提交js:Page({data:{model:[{id:0,name:null,sex:null},{id:1,name:null,sex:null}]},submit:function(e){letmodel=this.data.model;letname=e.detail
- 小程序获取用户信息
奥利给~YY
小程序
小程序获取用户信息(1)基本信息获取.wxml获取手机号码2.js文件//新版获取用户信息getUserInfo(){wx.getUserProfile({desc:'desc',success:res=>{console.log(res,"用户信息")}})},getPhoneNumber(e){console.log(e.detail)},(2)关于手机号码(2.21.2版本以上且不支持个人开
- 微信小程序登录授权流程
爱吃薄荷味的口香糖
随手笔记java
文章目录小程序授权登陆流程1、当用户进入微信小程序时,首先我们先判断用户是否授权过此小程序2、如果没有授权,我们通过一个按钮来实现授权登录3、通过bindgetuserinfo事件,我们可以获取到个人的信息、加密偏移数据、加密用户信息(e.detail获取)4.用户可以授权登录,也可以取消授权5、根据登录接口返回的code码,判断用户是否时新用户6、当用户注册成功后,在调登录接口,保存token。
- 微信小程序获取用户手机号前后台流程(附代码)
Y_Hungry
微信小程序微信小程序小程序
前置条件1.首先获取手机号需要认证企业资质的小程序2.获取手机号需要一台服务器编写解密代码正文1.首先理一下流程,下面是微信开发文档中的一张图下面是我自己写的流程注意微信官方文档-手机号获取按照例程打印不出来code,看看答应e.detail的结果{errMsg:"getPhoneNumber:ok",encryptedData:"/7uD9+GJ7qd0YBVX30Fg0Fj8W/2IXHbUh
- 微信小程序获取用户手机号
为了记笔记注册的账号
1.用户主动点击(只能主动点击,否则审核过不了)登录或者任意按钮。弹出来如下截图。//小程序按钮微信授权一键登录Page({getPhoneNumber(e){console.log(e.detail)}})//vue微信授权一键登录//functionmethods:{getPhoneNumber(e){console.log(e.detail)}},image.png2.用户点击允许之后,获取
- 微信小程序实现登录注册功能
本文实例为大家分享了微信小程序实现登录注册的具体代码,供大家参考,具体内容如下html:用户名:密码:手机号:注册用户名:密码:登录js://pages/login/login.jsPage({/***页面的初始数据*/data:{onoff:false},handleSubmit(e){const{value}=e.detail;//console.log(value)constthat=thi
- 智一面gtalent微信小程序获取微信的手机号
千年板蓝根
技术积累
重要的核心代码文件(请注意红色的文件)1、wxml配置自定义的按钮确认2、js里面添加getPhoneNumber的方法getPhoneNumber(e){if(e.detail.encryptedData){console.log(e.detail);//自己提交到后台解析然后获取手机号的信息}}打印参数如下:bindgetphonenumber函数调用成功会返回三个值:encryptedDat
- 微信小程序转uniapp
ioido
@绑定的方法直接传递的就是item而不需要e.detail取值App.vue中this指向不同,原来mp示例中的回调方法可用改为uni后不可用,得用app=this.$mp.app不用用getApp()可能没值替换回调方法:app.userInfoReadyCallback取代this.userInfoReadyCallback云数据库更新update({})unicloud比wxcloud少包了
- Java 并发包之线程池和原子计数
lijingyao8206
Java计数ThreadPool并发包java线程池
对于大数据量关联的业务处理逻辑,比较直接的想法就是用JDK提供的并发包去解决多线程情况下的业务数据处理。线程池可以提供很好的管理线程的方式,并且可以提高线程利用率,并发包中的原子计数在多线程的情况下可以让我们避免去写一些同步代码。
这里就先把jdk并发包中的线程池处理器ThreadPoolExecutor 以原子计数类AomicInteger 和倒数计时锁C
- java编程思想 抽象类和接口
百合不是茶
java抽象类接口
接口c++对接口和内部类只有简介的支持,但在java中有队这些类的直接支持
1 ,抽象类 : 如果一个类包含一个或多个抽象方法,该类必须限定为抽象类(否者编译器报错)
抽象方法 : 在方法中仅有声明而没有方法体
package com.wj.Interface;
- [房地产与大数据]房地产数据挖掘系统
comsci
数据挖掘
随着一个关键核心技术的突破,我们已经是独立自主的开发某些先进模块,但是要完全实现,还需要一定的时间...
所以,除了代码工作以外,我们还需要关心一下非技术领域的事件..比如说房地产
&nb
- 数组队列总结
沐刃青蛟
数组队列
数组队列是一种大小可以改变,类型没有定死的类似数组的工具。不过与数组相比,它更具有灵活性。因为它不但不用担心越界问题,而且因为泛型(类似c++中模板的东西)的存在而支持各种类型。
以下是数组队列的功能实现代码:
import List.Student;
public class
- Oracle存储过程无法编译的解决方法
IT独行者
oracle存储过程
今天同事修改Oracle存储过程又导致2个过程无法被编译,流程规范上的东西,Dave 这里不多说,看看怎么解决问题。
1. 查看无效对象
XEZF@xezf(qs-xezf-db1)> select object_name,object_type,status from all_objects where status='IN
- 重装系统之后oracle恢复
文强chu
oracle
前几天正在使用电脑,没有暂停oracle的各种服务。
突然win8.1系统奔溃,无法修复,开机时系统 提示正在搜集错误信息,然后再开机,再提示的无限循环中。
无耐我拿出系统u盘 准备重装系统,没想到竟然无法从u盘引导成功。
晚上到外面早了一家修电脑店,让人家给装了个系统,并且那哥们在我没反应过来的时候,
直接把我的c盘给格式化了 并且清理了注册表,再装系统。
然后的结果就是我的oracl
- python学习二( 一些基础语法)
小桔子
pthon基础语法
紧接着把!昨天没看继续看django 官方教程,学了下python的基本语法 与c类语言还是有些小差别:
1.ptyhon的源文件以UTF-8编码格式
2.
/ 除 结果浮点型
// 除 结果整形
% 除 取余数
* 乘
** 乘方 eg 5**2 结果是5的2次方25
_&
- svn 常用命令
aichenglong
SVN版本回退
1 svn回退版本
1)在window中选择log,根据想要回退的内容,选择revert this version或revert chanages from this version
两者的区别:
revert this version:表示回退到当前版本(该版本后的版本全部作废)
revert chanages from this versio
- 某小公司面试归来
alafqq
面试
先填单子,还要写笔试题,我以时间为急,拒绝了它。。时间宝贵。
老拿这些对付毕业生的东东来吓唬我。。
面试官很刁难,问了几个问题,记录下;
1,包的范围。。。public,private,protect. --悲剧了
2,hashcode方法和equals方法的区别。谁覆盖谁.结果,他说我说反了。
3,最恶心的一道题,抽象类继承抽象类吗?(察,一般它都是被继承的啊)
4,stru
- 动态数组的存储速度比较 集合框架
百合不是茶
集合框架
集合框架:
自定义数据结构(增删改查等)
package 数组;
/**
* 创建动态数组
* @author 百合
*
*/
public class ArrayDemo{
//定义一个数组来存放数据
String[] src = new String[0];
/**
* 增加元素加入容器
* @param s要加入容器
- 用JS实现一个JS对象,对象里有两个属性一个方法
bijian1013
js对象
<html>
<head>
</head>
<body>
用js代码实现一个js对象,对象里有两个属性,一个方法
</body>
<script>
var obj={a:'1234567',b:'bbbbbbbbbb',c:function(x){
- 探索JUnit4扩展:使用Rule
bijian1013
java单元测试JUnitRule
在上一篇文章中,讨论了使用Runner扩展JUnit4的方式,即直接修改Test Runner的实现(BlockJUnit4ClassRunner)。但这种方法显然不便于灵活地添加或删除扩展功能。下面将使用JUnit4.7才开始引入的扩展方式——Rule来实现相同的扩展功能。
1. Rule
&n
- [Gson一]非泛型POJO对象的反序列化
bit1129
POJO
当要将JSON数据串反序列化自身为非泛型的POJO时,使用Gson.fromJson(String, Class)方法。自身为非泛型的POJO的包括两种:
1. POJO对象不包含任何泛型的字段
2. POJO对象包含泛型字段,例如泛型集合或者泛型类
Data类 a.不是泛型类, b.Data中的集合List和Map都是泛型的 c.Data中不包含其它的POJO
 
- 【Kakfa五】Kafka Producer和Consumer基本使用
bit1129
kafka
0.Kafka服务器的配置
一个Broker,
一个Topic
Topic中只有一个Partition() 1. Producer:
package kafka.examples.producers;
import kafka.producer.KeyedMessage;
import kafka.javaapi.producer.Producer;
impor
- lsyncd实时同步搭建指南——取代rsync+inotify
ronin47
1. 几大实时同步工具比较 1.1 inotify + rsync
最近一直在寻求生产服务服务器上的同步替代方案,原先使用的是 inotify + rsync,但随着文件数量的增大到100W+,目录下的文件列表就达20M,在网络状况不佳或者限速的情况下,变更的文件可能10来个才几M,却因此要发送的文件列表就达20M,严重减低的带宽的使用效率以及同步效率;更为要紧的是,加入inotify
- java-9. 判断整数序列是不是二元查找树的后序遍历结果
bylijinnan
java
public class IsBinTreePostTraverse{
static boolean isBSTPostOrder(int[] a){
if(a==null){
return false;
}
/*1.只有一个结点时,肯定是查找树
*2.只有两个结点时,肯定是查找树。例如{5,6}对应的BST是 6 {6,5}对应的BST是
- MySQL的sum函数返回的类型
bylijinnan
javaspringsqlmysqljdbc
今天项目切换数据库时,出错
访问数据库的代码大概是这样:
String sql = "select sum(number) as sumNumberOfOneDay from tableName";
List<Map> rows = getJdbcTemplate().queryForList(sql);
for (Map row : rows
- java设计模式之单例模式
chicony
java设计模式
在阎宏博士的《JAVA与模式》一书中开头是这样描述单例模式的:
作为对象的创建模式,单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。这个类称为单例类。 单例模式的结构
单例模式的特点:
单例类只能有一个实例。
单例类必须自己创建自己的唯一实例。
单例类必须给所有其他对象提供这一实例。
饿汉式单例类
publ
- javascript取当月最后一天
ctrain
JavaScript
<!--javascript取当月最后一天-->
<script language=javascript>
var current = new Date();
var year = current.getYear();
var month = current.getMonth();
showMonthLastDay(year, mont
- linux tune2fs命令详解
daizj
linuxtune2fs查看系统文件块信息
一.简介:
tune2fs是调整和查看ext2/ext3文件系统的文件系统参数,Windows下面如果出现意外断电死机情况,下次开机一般都会出现系统自检。Linux系统下面也有文件系统自检,而且是可以通过tune2fs命令,自行定义自检周期及方式。
二.用法:
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g grou
- 做有中国特色的程序员
dcj3sjt126com
程序员
从出版业说起 网络作品排到靠前的,都不会太难看,一般人不爱看某部作品也是因为不喜欢这个类型,而此人也不会全不喜欢这些网络作品。究其原因,是因为网络作品都是让人先白看的,看的好了才出了头。而纸质作品就不一定了,排行榜靠前的,有好作品,也有垃圾。 许多大牛都是写了博客,后来出了书。这些书也都不次,可能有人让为不好,是因为技术书不像小说,小说在读故事,技术书是在学知识或温习知识,有
- Android:TextView属性大全
dcj3sjt126com
textview
android:autoLink 设置是否当文本为URL链接/email/电话号码/map时,文本显示为可点击的链接。可选值(none/web/email/phone/map/all) android:autoText 如果设置,将自动执行输入值的拼写纠正。此处无效果,在显示输入法并输
- tomcat虚拟目录安装及其配置
eksliang
tomcat配置说明tomca部署web应用tomcat虚拟目录安装
转载请出自出处:http://eksliang.iteye.com/blog/2097184
1.-------------------------------------------tomcat 目录结构
config:存放tomcat的配置文件
temp :存放tomcat跑起来后存放临时文件用的
work : 当第一次访问应用中的jsp
- 浅谈:APP有哪些常被黑客利用的安全漏洞
gg163
APP
首先,说到APP的安全漏洞,身为程序猿的大家应该不陌生;如果抛开安卓自身开源的问题的话,其主要产生的原因就是开发过程中疏忽或者代码不严谨引起的。但这些责任也不能怪在程序猿头上,有时会因为BOSS时间催得紧等很多可观原因。由国内移动应用安全检测团队爱内测(ineice.com)的CTO给我们浅谈关于Android 系统的开源设计以及生态环境。
1. 应用反编译漏洞:APK 包非常容易被反编译成可读
- C#根据网址生成静态页面
hvt
Web.netC#asp.nethovertree
HoverTree开源项目中HoverTreeWeb.HVTPanel的Index.aspx文件是后台管理的首页。包含生成留言板首页,以及显示用户名,退出等功能。根据网址生成页面的方法:
bool CreateHtmlFile(string url, string path)
{
//http://keleyi.com/a/bjae/3d10wfax.htm
stri
- SVG 教程 (一)
天梯梦
svg
SVG 简介
SVG 是使用 XML 来描述二维图形和绘图程序的语言。 学习之前应具备的基础知识:
继续学习之前,你应该对以下内容有基本的了解:
HTML
XML 基础
如果希望首先学习这些内容,请在本站的首页选择相应的教程。 什么是SVG?
SVG 指可伸缩矢量图形 (Scalable Vector Graphics)
SVG 用来定义用于网络的基于矢量
- 一个简单的java栈
luyulong
java数据结构栈
public class MyStack {
private long[] arr;
private int top;
public MyStack() {
arr = new long[10];
top = -1;
}
public MyStack(int maxsize) {
arr = new long[maxsize];
top
- 基础数据结构和算法八:Binary search
sunwinner
AlgorithmBinary search
Binary search needs an ordered array so that it can use array indexing to dramatically reduce the number of compares required for each search, using the classic and venerable binary search algori
- 12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
刘星宇
c面试
12个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
1.gets()函数
问:请找出下面代码里的问题:
#include<stdio.h>
int main(void)
{
char buff[10];
memset(buff,0,sizeof(buff));
- ITeye 7月技术图书有奖试读获奖名单公布
ITeye管理员
活动ITeye试读
ITeye携手人民邮电出版社图灵教育共同举办的7月技术图书有奖试读活动已圆满结束,非常感谢广大用户对本次活动的关注与参与。
7月试读活动回顾:
http://webmaster.iteye.com/blog/2092746
本次技术图书试读活动的优秀奖获奖名单及相应作品如下(优秀文章有很多,但名额有限,没获奖并不代表不优秀):
《Java性能优化权威指南》