30 秒你可以做什么?

栏目: Python · 发布时间: 6年前

内容简介:30 秒你可以做什么?有没有一点像灵魂拷问?

【公众号回复 “ 1024 ”,免费领取30本经典编程书籍】

30 秒你可以做什么?

30 秒你可以做什么?有没有一点像灵魂拷问?

可以喝杯水、看看窗外、写一个 bug ?

今天要推荐的是 30秒代码片段学习的系列,有如下好多个,按需取用在碎片时间查看~

  • 30 Seconds of JavaScript

  • 30 Seconds of CSS

  • 30 Seconds of Interviews

  • 30 Seconds of Knowledge

列举几个里面涉及的知识点:

  • JavaScript 计算某一日期是一年中的第几天

const dayOfYear = date =>
  Math.floor((date - new Date(date.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24);
  • Python 的冒泡排序

def bubble_sort(lst):
    for passnum in range(len(lst) - 1, 0, -1):
        for i in range(passnum):
            if lst[i] > lst[i + 1]:
                temp = lst[i]
                lst[i] = lst[i + 1]
                lst[i + 1] = temp
  • PHP 的 endsWith

function endsWith($haystack, $needle)
{
    return strrpos($haystack, $needle) === (strlen($haystack) - strlen($needle));
}

今天的推荐不知道大家喜欢吗?如果你喜欢,请在文章底部留言和点赞,以表示对我的支持,你们的留言、点赞和转发关注是我持续更新的动力哦!

「GitHub精选」开始接受大家投稿啦

「GitHub精选」,每晚10:24准时为您推送

30 秒你可以做什么?


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Inside Larry's and Sergey's Brain

Inside Larry's and Sergey's Brain

Richard Brandt / Portfolio / 17 Sep 2009 / USD 24.95

You’ve used their products. You’ve heard about their skyrocketing wealth and “don’t be evil” business motto. But how much do you really know about Google’s founders, Larry Page and Sergey Brin? Inside......一起来看看 《Inside Larry's and Sergey's Brain》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具