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 秒你可以做什么?


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

查看所有标签

猜你喜欢:

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

TED Talks Storytelling: 23 Storytelling Techniques from the Best

TED Talks Storytelling: 23 Storytelling Techniques from the Best

Akash Karia / CreateSpace Independent Publishing Platform / 2015-1-11 / USD 6.99

"Every speaker can put these ideas into practice immediately -- and they should!" ~ Dr. Richard C. Harris, Certified World Class Speaking Coach "An insightful read" ~Dennis Waller, Top 500 Revie......一起来看看 《TED Talks Storytelling: 23 Storytelling Techniques from the Best》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

随机密码生成器
随机密码生成器

多种字符组合密码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码