tip

获取验证码

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 09:51:57
获取验证码之前,先检测有没有手机号 之前做的时候用的vue, 里面存在的变量大都是取义的,相信各位童鞋都会懂的 getCode: function () { let self = this; // if(!this.getCode) return ; // this.getCode = false; //验证手机号 let telReg = /^1(3|4|5|6|7|8|9)\d{9}$/; let phone = self.form.phone; if('' == phone) { tip('请输入手机号码'); return ;} //tip为一个提示消息函数(做的时候在移动端) if(!telReg.test(phone)) { tip('请输入正确手机号'); return ;} //正则验证 let time = self.form.countdown; if(self.form.countdown != 60){ tip('验证码已发送,请稍等...'); return ;} //发送验证码 axios({ method:"POST", url: this.path+'sms/'+phone, headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, transformRequest:

pandas 之 groupby 聚合函数

ε祈祈猫儿з 提交于 2019-12-07 17:58:38
import numpy as np import pandas as pd 聚合函数 Aggregations refer to any data transformation that produces scalar values from arrays(输入是数组, 输出是标量值). The preceding examples have used several of them, including mean, count, min, and sum You may wonder what is going on when you invoke mean() on a GroupBy object, Many common aggregations such as those found in Table 10-1, have optimized implementations. However, you are not limited to only this set of methods. count sum mean median std, var min, max prod first, last You can use aggregations of your own devising and additionally call any method that

亚马逊写作文档tip

浪子不回头ぞ 提交于 2019-12-06 05:16:46
亚马逊的文档要求任何一份开会备忘录/要点备忘录都需要控制在4页左右,Jeff 自己也强调过,4页的备忘录比20页的备忘录要求的更高,它不仅需要更好的思考,也需要对开会讨论各个重点之间关系的理解。ppt式的pre忽视了想法之间的关系,也丧失了重点之间的相互联系。 每一个开会时的memo都需要回答四个问题 将要讨论什么 面对这个问题之前是怎么做的 我们现在做的和之前相比的有什么区别 这对公司而言 有什么关系 这四个问题可以用到任何的汇报中,他从四个维度反映了开会者对这个会议的贡献和这个project具体的作用(第四点) 那么我们如何写出这样一份文档呢,作者给了几点需要注意的要素,下面给出一个总结。 使用真正的句子和段落组成文章,不要使用任何类似于子弹笔记或者快速笔记的简写,保证别人也能看懂。 使用正确的语法和合适的用词,不能有错别字。尽管这不是要点或者非常重要的东西,但是从细微的细节可以反应这个人的态度。 理解这份文档的用途,不要让这个文档看起来模棱两可,让这个文档有明确的目的。 尽可能少的忽略无关项。不要让文档掺杂太多的和目的无关的内容。如果无关项太多,那么就更容易跑题。 对于你的工作要非常的确定。如果在文档中对于某些需要选择的方案没有一个非常确定的结果,那么对这几个选择都要进行分析,然后给出自己认为的最好的,并且给出自己选择的理由。 要从顾客的地位着想,每一次与顾客有关的讨论

react中登录注册 使用验证码验证

浪尽此生 提交于 2019-12-05 07:42:22
后端接口 var express = require('express'); var router = express.Router(); var User = require('./../sql/collection/users'); var sql = require('./../sql'); var utils = require('./../utils') var uuid = require('node-uuid'); var bcrypt = require('bcryptjs'); var jwt = require('jsonwebtoken'); var salt = bcrypt.genSaltSync(10); // 加密级别 var code = require('./../utils/code'); // 快速登陆 router.post('/quicklogin', (req, res, next) => { let { tel } = req.body; sql.find(User, { tel }, { _id: 0 }).then(data => { if (data.length === 0) { res.send({ code: '10086', msg: '该用户未注册' }) } else { let userid = data[0]

机器人 已知关节位置的位置、速度、加速度求力矩

大城市里の小女人 提交于 2019-12-05 06:47:56
机器人已知关节位置的位置、速度、加速度求力矩 flyfish 力矩的wiki解释: 在物理学里,作用力促使物体绕着转动轴或支点转动的趋向,称为力矩(torque),也就是扭转的力。转动力矩又称为转矩。力矩能够使物体改变其旋转运动。推挤或拖拉涉及到作用力 ,而扭转则涉及到力矩。 简略地说,力矩是一种施加于好像螺栓或飞轮一类的物体的扭转力。例如,用扳手的开口箝紧螺栓或螺帽,然后转动扳手,这动作会产生力矩来转动螺栓或螺帽。 根据国际单位制,力矩的单位是牛顿.米。 KDL 使用的是KDL(The Kinematics and Dynamics Library ) Orocos Kinematics and Dynamics Smarter in motion! 主要用到里面的运动学和动力学求解:各种通用的正逆运动学算法(Kinematic and Dynamic Solvers: various generic forward and inverse kinematic algorithms) KDL首先要加载URDF文件 URDF URDF(Unified Robot Description Format,统一机器人描述格式)是ROS中一个非常重要的机器人模型描述格式,ROS同时也提供URDF文件的C++解析器,可以解析URDF文件中使用XML格式描述的机器人模型。

Intellisense tip and XML returns comment (VS2008)

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've found tooltips displayed by Intellisense when keying method name as very usefull but I can see only summary and params info - no returns comments Eg - I can not see below comment: Enriched object Is it a way to make it visible? EDIT Maybe you know the tool replacing standard Intellisense and displaying returns section 回答1: Intellisense cannot display RETURNS statement indeed. I have found ReSharper can do that! 回答2: You can only see this in the compiled xml help. Intellisense only displays the method description. So it's a best practice

Python 3.2.3 programming…Almost had it working [closed]

匿名 (未验证) 提交于 2019-12-03 02:42:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: x = float(input("What is/was the cost of the meal?")) y = float(input("What is/was the sales tax?")) z = float(input("What percentage tip would you like to leave?")) print ("Original Food Charge: ${}" .format(x*1))) print ("Sales Tax: ${}" .format((y/100)*x))) print ("Tip: ${}" .format(x*(z/100))) print ("Total Charge For Food: ${}" .format(x+((y/100)*x)+((z/100)*x))) error output: line 10, in Syntax Error: .format(x*1))):, line 1017 I have been told that this works in 2.6 but it does not work STILL in 3.2.3 I'm attempting to write a program

how to create a heatmap with a fixed external hierarchical cluster

匿名 (未验证) 提交于 2019-12-03 02:19:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a matrix data, and want to visualize it with heatmap. The rows are species, so I want visualize the phylogenetic tree aside the rows and reorder the rows of the heatmap according the tree. I know the heatmap function in R can create the hierarchical clustering heatmap, but how can I use my phylogenetic clustering instead of the default created distance clustering in the plot? 回答1: First you need to use package ape to read in your data as a phylo object. library(ape) dat <- read.tree(file="your/newick/file") #or dat <- read.tree(text="

Range as dictionary key in Python

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So, I had an idea that I could use a range of numbers as a key for a single value in a dictionary. I wrote the code bellow, but I cannot get it to work. Is it even possible? stealth_roll = randint(1, 20) # select from a dictionary of 4 responses using one of four ranges. ## not working. stealth_check = { range(1, 6) : 'You are about as stealthy as thunderstorm.', range(6, 11) : 'You tip-toe through the crowd of walkers, while loudly calling them names.', range(11, 16) : 'You are quiet, and deliberate, but still you smell.', range(16, 20) :

使用vue的extend自定义组件开发

匿名 (未验证) 提交于 2019-12-02 23:43:01
index.js import Vue from 'vue' import tip from './tip.vue' const Constructor = Vue.extend(tip); const Tip = (options={})=>{ options.showAlert = options.fn//传来的fn给options,赋值data const vm = new Constructor({ data:options }) vm.$mount() document.body.appendChild(vm.$el) vm.visible = true return vm } export default Tip   tip.vue <template> <div class="tip-0"> <div class="tip" v-show="visible" @click="tipHide()">{{message}}</div> </div> </template> <script> export default { data(){ return{ visible:true, message:9999, showAlert:null//接收传来的fn } }, methods:{ tipHide(){ this.showAlert() this.visible =