不管是windows还是mac想找个好用的看图软件还是比较难,用的都不怎么合手。以前一直用Picasa3,结果现在google早已经不维护这个项目了。
尝试安装acdsee,浏览功能也还ok,但是预览的时候不能跨目录导致图片较多的时候会出现需要来回切换目录的问题。
不管是windows还是mac想找个好用的看图软件还是比较难,用的都不怎么合手。以前一直用Picasa3,结果现在google早已经不维护这个项目了。
尝试安装acdsee,浏览功能也还ok,但是预览的时候不能跨目录导致图片较多的时候会出现需要来回切换目录的问题。
对于美女的热爱无法自拔 😆 ,经常会去搜索一些美女图片,下载下来,然后找时间慢慢欣赏。主要用途是用作电脑桌面手机桌面,通常会百度或者bing去搜索下找到图片下载。相对来说能够直接用作桌面的图片并不多,多数是尺寸问题,并不是十分合适。但是即使不能直接用,可以用ps修改下图片尺寸,或者欣赏也是好的啊。 🙂
以前曾经从一个网站mzitu.com 爬了一些图片,但是最近访问的时候却发现网站挂了~~
最近做了一个系统由于部分接口需要进行耗时操作,因而不希望用户进行频繁访问,需要进行访问频率限制。如果要自己实现一个访问限制功能相对来说也不会太复杂,并且网上有各种代码可以参考。如果自己不想实现这个代码可以使用 Django Ratelimit 。
Django Ratelimit is a ratelimiting decorator for Django views.
https://travis-ci.org/jsocol/django-ratelimit.png?branch=master
Code: https://github.com/jsocol/django-ratelimit
License: Apache Software License
Issues: https://github.com/jsocol/django-ratelimit/issues
Documentation: http://django-ratelimit.readthedocs.org/
使用方法也相对来说比较简单:
@ratelimit(key='ip', rate='5/m')
def myview(request):
# Will be true if the same IP makes more than 5 POST
# requests/minute.
was_limited = getattr(request, 'limited', False)
return HttpResponse()
@ratelimit(key='ip', rate='5/m', block=True)
def myview(request):
# If the same IP makes >5 reqs/min, will raise Ratelimited
return HttpResponse()
@ratelimit(key='post:username', rate='5/m', method=['GET', 'POST'])
def login(request):
# If the same username is used >5 times/min, this will be True.
# The `username` value will come from GET or POST, determined by the
# request method.
was_limited = getattr(request, 'limited', False)
return HttpResponse()
@ratelimit(key='post:username', rate='5/m')
@ratelimit(key='post:tenant', rate='5/m')
def login(request):
# Use multiple keys by stacking decorators.
return HttpResponse()
@ratelimit(key='get:q', rate='5/m')
@ratelimit(key='post:q', rate='5/m')
def search(request):
# These two decorators combine to form one rate limit: the same search
# query can only be tried 5 times a minute, regardless of the request
# method (GET or POST)
return HttpResponse()
VMProtect protects code by executing it on a virtual machine with non-standard architecture that makes it extremely difficult to analyze and crack the software. Besides that, VMProtect generates and verifies serial numbers, limits free upgrades and much more.
class Ghost(models.Model):
create = models.DateTimeField(default=timezone.now, help_text='创建时间')
update = models.DateTimeField(auto_now=True, help_text='修改时间')
speed = models.IntegerField(default=0, help_text='速度')
name = models.CharField(max_length=64, help_text='名称')
class InstanceTask(models.Model):
create = models.DateTimeField(default=timezone.now, help_text='创建时间')
update = models.DateTimeField(auto_now=True, help_text='修改时间')
name = models.CharField(max_length=64, help_text='副本名称')
class InstanceTaskMap(models.Model):
create = models.DateTimeField(default=timezone.now, help_text='创建时间')
update = models.DateTimeField(auto_now=True, help_text='修改时间')
name = models.CharField(max_length=64, help_text='地图名称')
ghosts = models.ManyToManyField(Ghost, help_text='Ghost')
instance_task = models.ForeignKey(InstanceTask, related_name='instancetask_instancetaskmap', blank=True, null=True,
help_text='副本任务', on_delete=models.SET_NULL)
对于上面的model,如果要在django admin中展示ghosts信息,那么在list_display中直接加入’ghosts’ 会报下面的错误:The value of ‘list_display[1]’ must not be a ManyToManyField.
如果要解决这个问题可以使用下面的代码来展示:
class InstanceTaskMapAdmin(admin.ModelAdmin):
list_display = ('name', 'instance_task', 'id', 'index', 'get_ghost_name', 'introduction')
# https://blog.csdn.net/weixin_42134789/article/details/83686664
def get_ghost_name(self, obj):
ghost_list = []
for g in obj.ghosts.all():
ghost_list.append(g.ghost.name)
return ','.join(ghost_list)
get_ghost_name.short_description = "Ghosts"
如果需要更丰富的信息可以参考上面代码注释中的链接。
群晖的系统其实已经用了好几年了,以前都是用投影仪看电影,但是自从有了小朋友之后投影仪不方便使用了。于是多数时候该用电视来投屏,虽然如此但是在使用的过程中多有不便。需要在电脑上打开网页然后选择投屏位置进行投屏。并且有的视频没有声音。这个貌似主要的原因是群晖的video station没有对应的解码器导致的,网上搜索这个问题的人貌似也蛮多的。
对于上面的状况,晚上也有解决方案,安装ffmpeg解码器,https://tieba.baidu.com/p/5606311062?red_tag=2162405148 但是在实际的时候效果并不是十分力量,依然有一些视频没有声音。
后来想到用DS file来解决问题,因为平时有时候用手机浏览视频都是用的DS file。所以果断安装DS file, 在电视上安装DS file还是比较容易的,但是在登陆界面就比较蛋疼,输入地址 用户名和密码之后,无法用遥控器定位到登陆按钮无法登陆,如果要解决这个问题可以选择记住密码。并且输入过程可以在电视上插个无线鼠标键盘解决,当然,没有无线插个有线的键盘鼠标也是ok的。