最近做app项目中遇到的问题 1.时间兼容问题 var date = "2019-12-18 18:03:45" //不兼容代码 var newDate = new Date(date); //解决 var newDate = new Date(date.replace(/-/g, '/')); ios和ie浏览器一般转换不了以'-'时间格式,所以把时间中的-用/替换就可以了 2. 输入框防抖 let timer = ""; debouce(func, wait){
sqlserver中 字段内容做in条件用到方法:CHARINDEX(value,situation) 列变行显示用到:stuff 详情自行查找. 例子: stuff((select ','+name from SYS_DICT where dictcode = 'SITUATION' and CHARINDEX(value,situation)>0 FOR xml path('')), 1, 1, '') as situationValue
开发过程中经常遇到定时触发的需求,如:TCP/IP连接中,使用心跳包保持连接或检测连接是否已经中断. WPF中有多种定时器: 1.using System.Windows.Threading; 代码如下: using System.Windows.Threading; public partial class MainWindow : Window { DispatcherTimer timerHeartBeat = new DispatcherTimer(); public MainWindo