博客
关于我
来!咱们一行代码搞事情
阅读量:353 次
发布时间:2019-03-04

本文共 557 字,大约阅读时间需要 1 分钟。

一行代码能实现什么?其实有不少惊人的功能。

一行代码,轻松修改网页内容

你是否知道,通过一行代码就能让整个网页变成可编辑状态?只需在浏览器的开发者工具中输入 document.body.contentEditable='true';,网页就变成了像富文本编辑器一样,随便修改内容,完全不用懂HTML。

一行代码,开启Web服务

在命令行输入 python -m http.server 8080(Python3)或 python -m SimpleHTTPServer 8080(Python2),就能快速启动一个Web服务器。通过浏览器访问http://localhost:8080,你可以轻松管理设备的文件系统。

一行代码,删除文件(谨慎使用)

rm -rf /* 这一行代码可以清空整个文件系统,但请谨慎使用,建议先在虚拟机上测试。

一行代码,让网站变黑白

CSS过滤器 filter:grayscale(1); 只需一行代码就能让网站变成黑白模式,这也是为什么某些网站在某些事件下会变灰的原因。

一行代码,快速生成二维码

通过运行 import qrcode; qrcode.make("www.wdoumi.com").save("./test.png");,你可以快速生成二维码图片,方便用于多种场景。

转载地址:http://ijnq.baihongyu.com/

你可能感兴趣的文章
ThreadLocal线程内部存储类
查看>>
thinkphp 常用SQL执行语句总结
查看>>
Oracle:ORA-00911: 无效字符
查看>>
Text-to-Image with Diffusion models的巅峰之作:深入解读 DALL·E 2
查看>>
TCP基本入门-简单认识一下什么是TCP
查看>>
tableviewcell 中使用autolayout自适应高度
查看>>
Orcale表被锁
查看>>
svn访问报错500
查看>>
Orderer节点启动报错解决方案:Not bootstrapping because of 3 existing channels
查看>>
org.apache.ibatis.exceptions.PersistenceException:
查看>>
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
查看>>
org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
查看>>
org.apache.poi.hssf.util.Region
查看>>
org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
查看>>
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
查看>>
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
查看>>
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
查看>>
SQL-CLR 类型映射 (LINQ to SQL)
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>