Eliyar's Blog

大有空间,可容;强有余力,有度。弱无依仗,赖横。真有信奉的人,可以强到从容,大到由他。

0%

***2015年2月23更新***

问题还是重现了,而且越来越严重,最终放弃了nginx,换用了LAMP,具体方法参见DigitalOcean VPS配置多站点LAMP

***2015年2月23更新***

这两天真是被这个这个错误折磨的死去活来。千辛万苦把阿里云的胡杨树官网搞好,在digitalocean上还是这个问题。实在没法搞定,想用LNAMP最终终于选了WDCP。在DigitalOcean试了以后速度很赞。就把博客换成WDCP平台+七牛+WP SUPER CACHE,经过测速博客能在大部分区域秒开。

胡杨树官博也通过WDCP平台+七牛+WP SUPER CACHE配置以后,就算是THE7这么庞大的主题,也能国内都实现秒开。官网几乎没有502错误,博客偶尔偶尔出现,不过基本没问题,我也懒得折腾了,就这样吧。

又弃更了一段时间了。说来惭愧,这次回去得开始加把劲了。昨天看到了一个评论很开心,自己的第一个技术贴有评论。啦啦啦我会继续努力地

本文是通过SSH反向隧道方式实现外网访问内网中的树莓派服务器。不需要设置端口映射。一条命令即可完成。

需求分析

现有一个树莓派提供服务,需要通过外网访问。树莓派(A)能与外网通讯,但没有公网IP。手中还有一个服务器(B)有公网IP,可以与树莓派通讯。现需要外网中访问树莓派(A)提供的服务。

阅读全文 »

上次设计系统没有删除功能,用过一段时间后照片很多,很不方便。所以这次决定加上删除功能,研究半个来小时写出了这个模块。

模块功能

  • 要删除的文件名作为传递参数传给函数
  • 通过一个文件名,删除这个时间点拍摄的四张照片
  • 从数据库删除相应的记录
    阅读全文 »

想不去学习数据库支持,边试了Flask-SQLALchemy等工具,但发现那样根本不是解决办法,最后还是狠下心学数据库支持。我选择的是比较轻量级的数据库SQLite作为入门。

SQLite是一个进程内的库,实现了自给自足的、无服务器的、零配置的、事务性的 SQL 数据库引擎。它是一个零配置的数据库,这意味着与其他数据库一样,您不需要在系统中配置。

按照w3cschool提供的教程研究了一番,基本顺利。但等研究python接口的时候出现了点问题。

阅读全文 »

由于对于数据库完全不懂,我选择了用比较简单的Flask-SQLALchemy

官网介绍

Flask-SQLALchemy 是一个给你的应用添加 SQLALchemy 支持的 Flask 扩展。 它需要 SQLAlchemy 0.6 或更高的版本。它致力于简化在 Flask 中 SQLAlchemy 的 使用,提供了有用的默认值和额外的助手来更简单地完成日常任务

阅读全文 »

TPO29 综合 - new

The reading passage focuses on the topic that edmontosaurus’ migration to south during cold winter seasons. The speaker deals with the same issue. However, she thinks that edmontosaurus had not migrated to south. In the lecture, she makes three specific points to support her idea.

First, even though the reading passage suggests that lack of food forces them to migrate, the lecture argues that edmontosaurus had abundant food in their habitat. This is because their habitat was wormer at that time and the favorable weather condition makes it perfect for plants to grow, which were food source of edmontosaurus. Even winter, there still have enough dead plants to feed.

阅读全文 »

The past is never simply the past. It always has something to say to us; it tells us the paths to take and the paths not to take. - Pope Benedict
A child miseducated is a child lose - John F. Kennedy
Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important - Bill Gates
Every child is an artist. The problem is how to remain an artist once he grows up. - Margaret Mead
The greatest danger in modern technology is not that machines begin to think like people, but the people will begin think like machines. - Albert Einstein
The world has changed far more in the past 100 years than in any other century in the history. The reason is not political or economical but technological - technologies that flowed directly from advances in basic science. - Stephen Hawking

阅读全文 »

感谢百度知道网友晚报小记者lu的答案,来自:百度百科

举些栗子:

一般现在时:I make love with her everyday.
一般过去时:I made love with her yesterday.
一般将来时:I will make love with her tomorrow.
现在进行时:I am making love with her
过去进行时:I was making love with her at this time yesterday
将来进行时:I will be making love with her at this time tomorrow
现在完成时:I have made love with her by now.
过去完成时:I had made love with her before yesterday.
将来完成时:I will have made love with her by tomorrow.
现在完成进行时:I have been making love with her for two hours.
过去完成进行时:I had been making love with her for two hours when her husband came in.
将来完成进行时:I will have been making love with her for two hours when her husband wakes up tomorrow morning.

阅读全文 »