離家不遠

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2022年7月3日

摘要: 1、可以使用组件的props给组件传值,例如: <Person name="张三" age={18} /> name、age称为Person组件的属性(注意传数值型时应有花括号包裹) 2、如果Person的属性多,或者后台返回的Json数据如何便利地传给Person组件,我们可以用展开运算符 ... 阅读全文
posted @ 2022-07-03 12:02 離家不遠 阅读(150) 评论(0) 推荐(0) 编辑

2020年10月23日

摘要: 函数通过数组作为参数 1、对于一维数组来说,数组作为函数参数传递,实际上传递了一个指向数组的指针,在c编译器中,当数组名作为函数参数时,在函数体内数组名自动退化为指针。此时调用函数时,相当于传址,而不是传值,函数中对于数组的操作将会改变数组元素的值。 void foo(int *arr){} //或 阅读全文
posted @ 2020-10-23 14:31 離家不遠 阅读(1163) 评论(0) 推荐(0) 编辑

2020年9月30日

摘要: 在一个用于下载apk的页面downloadApp.xhtml上使用了<a>标签进行实现 <a id="dwn" href="http://m.xxx.com/Apps/android/mobile/xxx.apk" target="_blank" /> 发现在手机chrome浏览器上无法进行下载,发 阅读全文
posted @ 2020-09-30 11:41 離家不遠 阅读(180) 评论(0) 推荐(0) 编辑

2020年9月28日

摘要: Given a list of non negative integers, arrange them such that they form the largest number. Example 1: Input: [10,2] Output: "210" Example 2: Input: [ 阅读全文
posted @ 2020-09-28 15:24 離家不遠 阅读(183) 评论(0) 推荐(1) 编辑

摘要: You are given equations in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating-point number). G 阅读全文
posted @ 2020-09-28 11:24 離家不遠 阅读(125) 评论(0) 推荐(0) 编辑

2020年9月27日

摘要: In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascend 阅读全文
posted @ 2020-09-27 11:02 離家不遠 阅读(143) 评论(0) 推荐(0) 编辑

2020年9月25日

摘要: 问题: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter 阅读全文
posted @ 2020-09-25 14:24 離家不遠 阅读(171) 评论(0) 推荐(0) 编辑

2020年9月24日

摘要: 问题如下: 有N个加油站组成一个环状头尾相接的路线,且每个下标为i的加油站总共能加gas[i]的汽油,当前加油站到下一加油站所花费的汽油为cost[i],请写出程序判断是否存在下标index使得当你从index加油站开始开车,在车的初始汽油为0的情况下按顺序走过所有其他加油站回到index加油站,如 阅读全文
posted @ 2020-09-24 15:59 離家不遠 阅读(155) 评论(0) 推荐(0) 编辑

2019年12月3日

摘要: 获取单选框的值: $("input[name='rdJdzt']:checked").val() 设置单选框的值: $("input[name='rdJdzt']").removeAttr("checked"); $("input[name='rdJdzt'][value='"+data.zt+"' 阅读全文
posted @ 2019-12-03 15:06 離家不遠 阅读(293) 评论(0) 推荐(0) 编辑

2019年11月13日

摘要: 刚网上搜索了一个小技巧,有时候在删除文件的时候,文件很多,直接用rm -rf * ,会报错误“rm 参数列表过长”。 这时候网上的办法一般都是通过类似的办法:find . -name "" | xargs rm -rf ,这样确实可以删,但是很慢。我们遇到这个一个目录下有将近40万个文件, 就尝试了 阅读全文
posted @ 2019-11-13 15:42 離家不遠 阅读(3055) 评论(0) 推荐(0) 编辑