之前做记账app的时候,需要根据当前日期去查询当前所在的时间段,以方便统计这段时间内的支出总额,这里写一个工具类,方便下次需要的时候直接来拿,下面开始介绍:
Calender类是一个方便用于日期计算的类,比如计算一年以后的时间,直接cal.add(Calendar.YEAR, 1);,或是计算2个月后的时间,直接cal.add(Calendar.MONTH, 2);,而不用像Date类一样去计算毫秒,但是Calender类也有一个坑,就是他的月份都是从0开始的,如果当前月份为3月,cal.get(Calendar.MONTH);得到的是2(这点不足在JDK1.8后的LocalDate类中有改善),这是平时使用的时候需要注意的一点 ### 二、对时间段的处理: 1. 时分秒的处理: 每一段时间的开始都是用某日的 00:00:00 开始的,以最后一天的 23:59:59 结束的,所以我们直接设置开始时间的Calender的时分秒为0,结束时间的Calender的时分秒为 23:59:59
//开始时间 calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); //结束时间 calendar.set(Calendar.HOUR_OF_DAY, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); 本周的开始时间和结束时间: 本周的开始,通过设置Calendar.DAY_OF_WEEK为Calendar.MONDAY。 本周的结束,通过把Calendar.DAY_OF_WEEK加6,就能得到星期日的日期。 cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); cal.add(Calendar.DAY_OF_WEEK, 6); 本月的开始时间和结束时间: 本月的开始:将Calendar.DAY_OF_MONTH属性设置为1,就得到了当前月份的第一天。 本月的结束:先通过calendar.getActualMaximum(Calendar.DAY_OF_MONTH)得到当前月的最后一天,再赋值给Calendar.DAY_OF_MONTH属性即可。 calendar.setTimeInMillis(new Date().getTime()); calendar.set(Calendar.DAY_OF_MONTH, 1);// 设置为1号,当前日期既为本月第一天 calendar.setTimeInMillis(new Date().getTime()); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));// 获取当前月最后一天 本季度的开始时间和结束时间: 本季度的开始:通过获取c.get(Calendar.MONTH)加1后的结果,得到当前的月份(加1是因为Calender中每个月都是从0开始的),然后判断当前月是哪个季度的,得到当前季度得时间。 本季度的结束:在得到本季度开始的时间后,将月份加2个月cal.add(Calendar.MONTH, 2);,并按照之前得到本月最后一天那样处理一次即可。 int currentMonth = c.get(Calendar.MONTH) + 1; if (currentMonth >= 1 && currentMonth <= 3) c.set(Calendar.MONTH, 0); else if (currentMonth >= 4 && currentMonth <= 6) c.set(Calendar.MONTH, 3); else if (currentMonth >= 7 && currentMonth <= 9) c.set(Calendar.MONTH, 6); else if (currentMonth >= 10 && currentMonth <= 12) c.set(Calendar.MONTH, 9); cal.add(Calendar.MONTH, 2); cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));// 获取当前月最后一天 本年的开始时间和结束时间: 本年的开始:通过将Calendar.DAY_OF_YEAR的值设为1,就得到了本年的第一天。 本年的结束:先将Calendar.DAY_OF_YEAR的值设为1,得到本年的第一天,然后通过调用Calender的roll函数,并传递一个-1进去,最终就得到了本年的最后一天。 calendar.setTimeInMillis(new Date().getTime()); calendar.set(Calendar.DAY_OF_YEAR, 1); calendar.setTimeInMillis(new Date().getTime()); int year = calendar.get(Calendar.YEAR); calendar.clear(); calendar.set(Calendar.YEAR, year); calendar.roll(Calendar.DAY_OF_YEAR, -1); roll函数:当传进去一个负数,就将最大值和最小值形成一个环,最小值-1=最大值 Adds the specified (signed) amount to the specified calendar field without changing larger fields. A negative amount means to roll down. 三、效果: 四、源码: import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class DateUtils { public static String dateToString(Date date) { return new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date); * 根据当前日期获得所在周的日期区间(周一和周日日期) * 任意一时间的当前周的时间段 public static String getTimeInterval(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date); // 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了 int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天 if (1 == dayWeek) { cal.add(Calendar.DAY_OF_MONTH, -1); // 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一 cal.setFirstDayOfWeek(Calendar.MONDAY); // 获得当前日期是一个星期的第几天 int day = cal.get(Calendar.DAY_OF_WEEK); // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); String imptimeBegin = sdf.format(cal.getTime()); // System.out.println("所在周星期一的日期:" + imptimeBegin); cal.add(Calendar.DATE, 6); String imptimeEnd = sdf.format(cal.getTime()); // System.out.println("所在周星期日的日期:" + imptimeEnd); return imptimeBegin + "," + imptimeEnd; * 获取今天开始时间 public static Date getTodayStartTime() { Calendar todayStart = Calendar.getInstance(); //注:这里不能用Calendar.HOUR,因为他是12小时制,而Calendar.HOUR_OF_DAY才是24小时制 todayStart.set(Calendar.HOUR_OF_DAY, 0); todayStart.set(Calendar.MINUTE, 0); todayStart.set(Calendar.SECOND, 0); todayStart.set(Calendar.MILLISECOND, 0); return todayStart.getTime(); * 获取今天结束时间 public static Date getTodayEndTime() { Calendar todayEnd = Calendar.getInstance(); todayEnd.set(Calendar.HOUR_OF_DAY, 23); todayEnd.set(Calendar.MINUTE, 59); todayEnd.set(Calendar.SECOND, 59); todayEnd.set(Calendar.MILLISECOND, 999); return todayEnd.getTime(); // 获得本周一0点时间 public static Date getCurrentWeekStartTimes() { Calendar cal = Calendar.getInstance(); cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); return cal.getTime(); // 获得本周日24点时间 public static Date getCurrentWeekEndTimes() { Calendar cal = Calendar.getInstance(); cal.setTime(getCurrentWeekStartTimes()); cal.add(Calendar.DAY_OF_WEEK, 6); cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); return cal.getTime(); * 获取当月开始时间戳 * @return public static Date getCurrentMonthStartTimes() { Calendar calendar = Calendar.getInstance();// 获取当前日期 calendar.setTimeInMillis(new Date().getTime()); calendar.add(Calendar.YEAR, 0); calendar.add(Calendar.MONTH, 0); calendar.add(Calendar.DATE, 0); calendar.set(Calendar.DAY_OF_MONTH, 1);// 设置为1号,当前日期既为本月第一天 calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); * 获取当月的结束时间戳 * @return public static Date getCurrentMonthEndTimes() { Calendar calendar = Calendar.getInstance();// 获取当前日期 calendar.setTimeInMillis(new Date().getTime()); calendar.add(Calendar.YEAR, 0); calendar.add(Calendar.MONTH, 0); calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));// 获取当前月最后一天 calendar.set(Calendar.HOUR_OF_DAY, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); calendar.set(Calendar.MILLISECOND, 999); return calendar.getTime(); public static Date getCurrentQuarterStartTime() { Calendar c = Calendar.getInstance(); int currentMonth = c.get(Calendar.MONTH) + 1; SimpleDateFormat longSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat shortSdf = new SimpleDateFormat("yyyy-MM-dd"); Date now = null; try { if (currentMonth >= 1 && currentMonth <= 3) c.set(Calendar.MONTH, 0); else if (currentMonth >= 4 && currentMonth <= 6) c.set(Calendar.MONTH, 3); else if (currentMonth >= 7 && currentMonth <= 9) c.set(Calendar.MONTH, 6); else if (currentMonth >= 10 && currentMonth <= 12) c.set(Calendar.MONTH, 9); c.set(Calendar.DATE, 1); now = longSdf.parse(shortSdf.format(c.getTime()) + " 00:00:00"); } catch (Exception e) { e.printStackTrace(); return now; * 当前季度的结束时间,即2012-03-31 23:59:59 public static Date getCurrentQuarterEndTime() { Calendar cal = Calendar.getInstance(); cal.setTime(getCurrentQuarterStartTime()); cal.add(Calendar.MONTH, 2); cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));// 获取当前月最后一天 cal.set(Calendar.HOUR_OF_DAY, 23); cal.set(Calendar.MINUTE, 59); cal.set(Calendar.SECOND, 59); cal.set(Calendar.MILLISECOND, 999); return cal.getTime(); * 获取当年的开始时间戳 * @return public static Date getCurrentYearStartTime() { Calendar calendar = Calendar.getInstance();// 获取当前日期 calendar.setTimeInMillis(new Date().getTime()); calendar.add(Calendar.YEAR, 0); calendar.add(Calendar.MONTH, 0); calendar.set(Calendar.DAY_OF_YEAR, 1); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); * 获取当年的最后时间戳 * @return public static Date getCurrentYearEndTime() { Calendar calendar = Calendar.getInstance();// 获取当前日期 calendar.setTimeInMillis(new Date().getTime()); int year = calendar.get(Calendar.YEAR); calendar.clear(); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.HOUR_OF_DAY, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); calendar.set(Calendar.MILLISECOND, 999); calendar.roll(Calendar.DAY_OF_YEAR, -1); return calendar.getTime(); public static void main(String[] args) { System.out.println("今日: " + dateToString(getTodayStartTime()) + "---> " + dateToString(getTodayEndTime())); System.out.println("本周: " + dateToString(getCurrentWeekStartTimes()) + "---> " + dateToString(getCurrentWeekEndTimes())); System.out.println("本月: " + dateToString(getCurrentMonthStartTimes()) + "---> " + dateToString(getCurrentMonthEndTimes())); System.out.println("本季: " + dateToString(getCurrentQuarterStartTime()) + "---> " + dateToString(getCurrentQuarterEndTime())); System.out.println("本年: " + dateToString(getCurrentYearStartTime()) + "---> " + dateToString(getCurrentYearEndTime())); 原创发布于 ,未经作者授权,禁止转载
0 人觉得牛逼
评论 <span class="el-input__count">0/240</span></div></div></div> <div class="article-comment-button clear-fix"><div class="float-right"><button type="button" class="el-button el-button--primary"><!----><!----><span>发表评论</span></button></div></div></div> <div class="article-comment-list"><ul><li id="1291961548163592192" class="comment-item border-radius-default"><div class="clear-fix"><a href="/u/1139423796017500160" target="_blank"><div class="comment-avatar" style="float: left"><span class="el-avatar el-avatar--icon el-avatar--circle"><img src="https://imgs.sunofbeaches.com/group1/M00/00/04/rBsADV2YuTKABc4DAABfJHgYqP8031.png" style="object-fit:cover;"/></span></div></a> <div class="comment-content" style="float: left"><a href="/u/1139423796017500160" target="_blank" title="VIP会员"><div class="comment-nick vip-red-name">断点-含光君</div></a> <div class="comment">nice</div> <div class="info"><span>2020-08-08 12:56</span> <span data-nickname="断点-含光君" title="1291961548163592192" style="cursor: pointer"> 回复</span> <div style="display: none;">1139423796017500160</div></div> <div class="sub-comment"><ul/></div> <div class="sub-input-box clear-fix" style=";"><div class="reply-avatar" style="float: left"><span class="el-avatar el-avatar--icon el-avatar--circle"><i class="el-icon-user-solid"/></span></div> <div class="el-textarea" style="width:470px;float:left;"><textarea autocomplete="off" id="subInputBox" rows="4" placeholder="作为有经验的开发人员,当然友善评论啦!" maxlength="256" class="el-textarea__inner"/><span class="el-input__count">0/256</span></div> <button type="button" class="el-button reply-btn el-button--primary el-button--medium"><!----><!----><span>发表评论 </span></button></div></div></div></li><li id="1289145503153430528" class="comment-item border-radius-default"><div class="clear-fix"><a href="/u/1153952789488054272" target="_blank"><div class="comment-avatar" style="float: left"><span class="el-avatar el-avatar--icon el-avatar--circle"><img src="https://imgs.sunofbeaches.com/group1/M00/00/07/rBsADV22ZymAV8BwAABVL9XtNSU926.png" style="object-fit:cover;"/></span></div></a> <div class="comment-content" style="float: left"><a href="/u/1153952789488054272" target="_blank" title=""><div class="comment-nick">拉大锯</div></a> <div class="comment">图片没能显示哦。</div> <div class="info"><span>2020-07-31 18:26</span> <span data-nickname="拉大锯" title="1289145503153430528" style="cursor: pointer"> 回复</span> <div style="display: none;">1153952789488054272</div></div> <div class="sub-comment"><ul><li><div class="sub-content"><a href="/u/1231473582161268736" target="_blank" title=""><span class="el-avatar el-avatar--small el-avatar--icon el-avatar--circle"><img src="https://imgs.sunofbeaches.com/group1/M00/00/27/rBsADV8fCVWAD6Q1AAALDTAEzR0088.png" style="object-fit:cover;"/></span> <span style="height: 40px;line-height: 40px;color: #666666">感同身受</span></a> <span> 回复</span> <a href="/u/1153952789488054272" target="_blank"><span style="color: #0084ff">@拉大锯</span></a> <br/> <div class="sub-comment-content">我这边可以看到</div></div> <div class="article-comment-sub-info"><span>2020-07-31 18:57</span> <span title="1289145503153430528" data-your-nickname="感同身受" style="cursor: pointer"> 回复</span> <span style="display: none;">1231473582161268736</span></div></li><li><div class="sub-content"><a href="/u/1153952789488054272" target="_blank" title=""><span class="el-avatar el-avatar--small el-avatar--icon el-avatar--circle"><img src="https://imgs.sunofbeaches.com/group1/M00/00/07/rBsADV22ZymAV8BwAABVL9XtNSU926.png" style="object-fit:cover;"/></span> <span style="height: 40px;line-height: 40px;color: #666666">拉大锯</span></a> <span> 回复</span> <a href="/u/1231473582161268736" target="_blank"><span style="color: #0084ff">@感同身受</span></a> <br/> <div class="sub-comment-content">你的是简书的呢。写博客还是用点心吧,别复制粘贴。下次不让过了。</div></div> <div class="article-comment-sub-info"><span>2020-07-31 19:45</span> <span title="1289145503153430528" data-your-nickname="拉大锯" style="cursor: pointer"> 回复</span> <span style="display: none;">1153952789488054272</span></div></li></ul></div> <div class="sub-input-box clear-fix" style=";"><div class="reply-avatar" style="float: left"><span class="el-avatar el-avatar--icon el-avatar--circle"><i class="el-icon-user-solid"/></span></div> <div class="el-textarea" style="width:470px;float:left;"><textarea autocomplete="off" id="subInputBox" rows="4" placeholder="作为有经验的开发人员,当然友善评论啦!" maxlength="256" class="el-textarea__inner"/><span class="el-input__count">0/256</span></div> <button type="button" class="el-button reply-btn el-button--primary el-button--medium"><!----><!----><span>发表评论 </span></button></div></div></div></li></ul></div> <div class="recommend-article-list-container border-radius-default"><div class="part-title">推荐文章</div> <div class="recommend-article-list"><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1846752465391845378" target="_blank">Android打开Activity时不自动弹出键盘</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-17 11:19</span> <span class="el-icon-view"> 27</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com/content/2021_06_11/853010652577398784.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1846447093196128258" target="_blank">Android启动第三方App的服务</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> Android service </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-16 15:05</span> <span class="el-icon-view"> 49</span> <span class="iconfont iconiconfontdianzan11"> 2</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2023_12_01/1730488661317967874.png"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1846029132794822658" target="_blank">Android largeHeap配置申请更大的堆内存</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-15 11:32</span> <span class="el-icon-view"> 33</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com/content/2021_06_03/850120720443768832.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1845819838921048065" target="_blank">今日份分享:Mysql、mongodb CPU占用过多调优</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> mysql mongodb </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-14 21:46</span> <span class="el-icon-view"> 31</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_10_14/1845822488198643713.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1845753425174855682" target="_blank">Android Studio Ladybug指定ndk版本</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> Androidstudio </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-14 17:08</span> <span class="el-icon-view"> 33</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_04_25/1783307956095475714.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1844914831304556546" target="_blank">Android Studio Ladybug使用经典主题UI</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> AndroidStudio Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-12 09:37</span> <span class="el-icon-view"> 29</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com/content/2021_06_11/853010652577398784.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1844005949908582402" target="_blank">咸鱼的面试记录录</a></div> <div class="recommend-article-labels-user"><a href="/u/1283676283397545984" target="_blank">Atago</a> Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-10-09 21:58</span> <span class="el-icon-view"> 42</span> <span class="iconfont iconiconfontdianzan11"> 0</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com/content/2022_06_22/989136215414407168.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1839614609640783873" target="_blank">Docker安装的MySQL数据库备份脚本</a></div> <div class="recommend-article-labels-user"><a href="/u/1353014317951348736" target="_blank">程序员soulmate</a> 数据库备份 MySQL shell </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-27 18:53</span> <span class="el-icon-view"> 111</span> <span class="iconfont iconiconfontdianzan11"> 2</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_27/1839619178840064001.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1838196114348703746" target="_blank">我配置都是一样的,怎么就不行呢?</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> nacos </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-23 20:43</span> <span class="el-icon-view"> 166</span> <span class="iconfont iconiconfontdianzan11"> 5</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_23/1838197269292253185.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1836981864674492417" target="_blank">Android打包,由于jks问题报错记录</a></div> <div class="recommend-article-labels-user"><a href="/u/1353014317951348736" target="_blank">程序员soulmate</a> </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-20 12:33</span> <span class="el-icon-view"> 133</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_20/1836986957226442754.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1833021973190541314" target="_blank">今日遇到问题,我安装了Anaconda3,然用pip install frida 报错没有ssl</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> install </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-09 14:00</span> <span class="el-icon-view"> 168</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_09/1833022304452476929.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1830893145177587714" target="_blank">maven构建应用时候Failed to execute goal org.apache.maven.plugin</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> lombok maven </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-03 17:00</span> <span class="el-icon-view"> 191</span> <span class="iconfont iconiconfontdianzan11"> 0</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_03/1830893528180457473.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1830842862607138818" target="_blank">Docker 仓库下载不了,可以加以下配置</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> docker </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-03 13:39</span> <span class="el-icon-view"> 176</span> <span class="iconfont iconiconfontdianzan11"> 0</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_03/1830839298044329986.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1830838970636959745" target="_blank">构建带字体的java环境基础镜像</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> docker </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-03 13:24</span> <span class="el-icon-view"> 192</span> <span class="iconfont iconiconfontdianzan11"> 0</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_03/1830839298044329986.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1830832505247367170" target="_blank">工蜂 git 配置了ssh 但是访问不了,其他同理</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-03 13:02</span> <span class="el-icon-view"> 202</span> <span class="iconfont iconiconfontdianzan11"> 2</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_03/1830833664955645954.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1830483316466384897" target="_blank">今天用IDEA打开gradle构建遇到的问题</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> gradle </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-09-02 13:54</span> <span class="el-icon-view"> 192</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_09_02/1830484225011351554.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1827737195868454913" target="_blank">免费SSL证书全自动申请部署工具</a></div> <div class="recommend-article-labels-user"><a href="/u/1353014317951348736" target="_blank">程序员soulmate</a> https </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-26 00:10</span> <span class="el-icon-view"> 311</span> <span class="iconfont iconiconfontdianzan11"> 4</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_08_25/1827739774425890817.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1826823731696238594" target="_blank">快速部署一个属于你的ChatGPT,写首诗</a></div> <div class="recommend-article-labels-user"><a href="/u/1272797637732495360" target="_blank">xujun20200616</a> 大语言模型 ChatGPT LLama3 Ollama </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-23 12:01</span> <span class="el-icon-view"> 182</span> <span class="iconfont iconiconfontdianzan11"> 6</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_08_23/1826831588722343938.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1826188623842770946" target="_blank">docker 拉取不下来 解决方案 亲测可用</a></div> <div class="recommend-article-labels-user"><a href="/u/1272797637732495360" target="_blank">xujun20200616</a> docker拉取镜像失败 docker images </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-21 17:37</span> <span class="el-icon-view"> 410</span> <span class="iconfont iconiconfontdianzan11"> 2</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_08_21/1826191581506568194.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1824372738027028482" target="_blank">开发中存在的玄学,如何排查问题</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-16 17:18</span> <span class="el-icon-view"> 208</span> <span class="iconfont iconiconfontdianzan11"> 0</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com/content/2021_10_10/896787500977094656.png"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1824113413928910850" target="_blank">根据在群里提问过的公司Maven仓库没有aarch架构文件的解决办法</a></div> <div class="recommend-article-labels-user"><a href="/u/1740399029389549570" target="_blank">雅澤yaduo</a> Maven </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-16 00:01</span> <span class="el-icon-view"> 201</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_03_13/1767957832997724162.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1823555330525757442" target="_blank">K8s startupProbe ReadinessProbe 和 LivenessProbe 三种探针</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-14 11:12</span> <span class="el-icon-view"> 634</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_08_14/1823558140239675393.png"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1823273178106036226" target="_blank">Android startActivityForResult代替品</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-13 16:20</span> <span class="el-icon-view"> 264</span> <span class="iconfont iconiconfontdianzan11"> 4</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_04_25/1783307956095475714.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1821941943249272833" target="_blank">根据之前提问过的换肤框架的解决方法</a></div> <div class="recommend-article-labels-user"><a href="/u/1740399029389549570" target="_blank">雅澤yaduo</a> Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-10 00:29</span> <span class="el-icon-view"> 247</span> <span class="iconfont iconiconfontdianzan11"> 3</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_03_13/1767957832997724162.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1821728705190428673" target="_blank">JEB如何修改内存大小呢?</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-09 10:05</span> <span class="el-icon-view"> 288</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_08_09/1821729252802953217.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1820992596546289666" target="_blank">由电子围栏引发的经纬度计算</a></div> <div class="recommend-article-labels-user"><a href="/u/1153952789488054272" target="_blank">拉大锯</a> redis </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-08-07 09:47</span> <span class="el-icon-view"> 263</span> <span class="iconfont iconiconfontdianzan11"> 2</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_08_07/1820993998584676354.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1816313299290161154" target="_blank">Zipaligh对apk进行对其为大于4G就提示失败</a></div> <div class="recommend-article-labels-user"><a href="/u/1676483124629004289" target="_blank">杰克杰克</a> Android ZipAlign </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-07-25 11:25</span> <span class="el-icon-view"> 238</span> <span class="iconfont iconiconfontdianzan11"> 0</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2023_07_05/1676483409883619329.png"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1813768034603630594" target="_blank">Android studio智能代码补全快捷键配置</a></div> <div class="recommend-article-labels-user"><a href="/u/1139423796017500160" target="_blank">断点</a> AndroidStudio Android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-07-18 11:01</span> <span class="el-icon-view"> 408</span> <span class="iconfont iconiconfontdianzan11"> 2</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_04_25/1783307956095475714.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1812411985686560770" target="_blank">问大型复杂的项目如何进行学习</a></div> <div class="recommend-article-labels-user"><a href="/u/1283676283397545984" target="_blank">Atago</a> android </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-07-14 17:05</span> <span class="el-icon-view"> 301</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com/content/2022_06_22/989136215414407168.jpg"/></div></div><div class="recommend-article-item clear-fix"><div class="float-left recommend-article-item-right"><div class="recommend-article-title"><a href="/a/1810843647583846401" target="_blank">如何使用EventBus?</a></div> <div class="recommend-article-labels-user"><a href="/u/1593141965622534146" target="_blank">Aridvian</a> Android EventBus Jetpack </a> <span/></span></div> <div class="recommend-article-info"><span class="iconfont iconriqi2"> 2024-07-10 09:56</span> <span class="el-icon-view"> 320</span> <span class="iconfont iconiconfontdianzan11"> 1</span></div></div> <div class="recommend-article-cover float-right"><img src="https://images.sunofbeaches.com//images/2024_07_10/1810855426393243650.png"/></div></div></div></div></div> <div id="article-detail-right-part" class="float-left"><!----> <!----> <!----> <div id="article-right-google-ad" class="article-right-google-ad border-radius-default"/> <div id="article-shop-ad" class="border-radius-default"><a href="https://item.taobao.com/item.htm?id=673527744707" target="_blank"><img src="https://cdn.sunofbeaches.com/images/ad/shop-ad.png" width="100%"/></a></div> <div id="article-category-list" class="border-radius-default"><div class="card-item-header"> </div> <div id="article-header-title"/></div></div> <div id="collection-dialog"><div class="el-dialog__wrapper" style=";"><div role="dialog" aria-modal="true" aria-label="收藏夹" class="el-dialog" style="margin-top:15vh;width:500px;"><div class="el-dialog__header"><span class="el-dialog__title">收藏夹</span><button type="button" aria-label="Close" class="el-dialog__headerbtn"><i class="el-dialog__close el-icon el-icon-close"/></button></div><!----><div class="el-dialog__footer"><span class="dialog-footer"><a href="https://mp.sunofbeach.net/#/index/content/collectionContent" target="_blank" class="el-button el-button--primary el-button--mini">新创建收藏夹</a> <button type="button" class="el-button el-button--default el-button--mini"><!----><!----><span>取 消</span></button></span></div></div></div> <div class="el-dialog__wrapper" style=";"><div role="dialog" aria-modal="true" aria-label="dialog" class="el-dialog article-image-preview" style="margin-top:15vh;"><div class="el-dialog__header"><span class="el-dialog__title"/><button type="button" aria-label="Close" class="el-dialog__headerbtn"><i class="el-dialog__close el-icon el-icon-close"/></button></div><!----><!----></div></div> <div class="el-dialog__wrapper" style=";"><div role="dialog" aria-modal="true" aria-label="打赏作者" class="el-dialog el-dialog--center" style="margin-top:15vh;width:350px;"><div class="el-dialog__header"><span class="el-dialog__title">打赏作者</span><button type="button" aria-label="Close" class="el-dialog__headerbtn"><i class="el-dialog__close el-icon el-icon-close"/></button></div><!----><div class="el-dialog__footer"><span class="prise-dialog-footer"><button type="button" class="el-button el-button--primary el-button--medium"><!----><!----><span>赏</span></button></span></div></div></div></div></div></div> <div id="footer-container"><div class="sob-footer"><div class="foot-content"><p class="foot-copy-right"> 本网站由程序猿(媛)用爱驱动