写一段代码,用于识别姓名(first_name,last_name) 结合使用函数get_formatted_name()和while循环,以更正规的方式问候用户 面尝试使用名和姓跟用户打招呼 def get_formarted_name(first_name,last_name,middle_na ...
分类:
编程语言 时间:
2020-03-06 23:47:51
阅读次数:
99
先说怎么用吧~ 1.安装 2.import creactSagaMiddleWare from 'redux-saga' 3.引入store,将saga中间件注入 const store = createStore( reducer , creactSagaMiddleWare ) 4.创建一个专门 ...
分类:
其他好文 时间:
2020-03-06 19:06:01
阅读次数:
56
function sends(info ) { var arr=info.split("@"); var userid=+arr[4]; var prefix = ctx+ "cw/integralInfo"; var index = layer.open({ //打开layer弹出框 type: ...
文本垂直居中的方式:line-height设置成height值 将父元素显示方式设置为表格,display:table-cell,同时设置vertical-align:middle 使用flex布局,设置为align-item:center 绝对位置中bottom:0,top:0,并设置margin ...
分类:
其他好文 时间:
2020-03-02 00:51:03
阅读次数:
66
很多时候, 文字和 input和button它们的 顶端是在同一条先上, 但是并不是 垂直居中对齐, 这个 就不好看. 其时有很多理论, 讲的也很复杂, 说什么文本 的top, middle ,baseline , bottom 四根线, 等等 那些我们都不管, 可以这样简单的理解: 1. 把文本/ ...
分类:
其他好文 时间:
2020-02-29 20:51:52
阅读次数:
92
题意:获得链表中心结点。当有两个中心结点时,返回第二个。 分析:快慢指针。 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : va ...
分类:
其他好文 时间:
2020-02-28 14:16:34
阅读次数:
66
1.在form表单中,添加{% csrf_token %}会解决通过让render返回页面时报错问题<input type="hidden" name="csrfmiddlewaretoken" value="lyETYYictPlfgqmUt3GpLuXu1yIyFFfFgH2imWUDgesgC ...
分类:
其他好文 时间:
2020-02-27 16:06:07
阅读次数:
62
numpy广播机制,取特定行、特定列的元素 的高级索引取法enter description hereenter description here ...
分类:
其他好文 时间:
2020-02-25 14:35:48
阅读次数:
48
现在,前端与后端分处不同的域名,我们需要为后端添加跨域访问的支持 否则前端无法使用axios无法请求后端提供的api数据,我们使用CORS来解决后端对跨域访问的支持。 使用django-cors-headers扩展 在 Response(headers={"Access-Control-Allow- ...
分类:
其他好文 时间:
2020-02-24 17:09:52
阅读次数:
61
1 """ 2 Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of ...
分类:
其他好文 时间:
2020-02-24 16:59:06
阅读次数:
82