The Dirac Sea

A Blackhole of Negative Energy


  • Home

  • Archives

  • Tags

A Forward Solution of LeetCode 991. Broken Calculator

Posted on 2021-02-21
A Forward Solution of LeetCode 991. Broken CalculatorProblem descriptionOn a broken calculator that has a number showing on its display, we can perform two operations: Double: Multiply the number on the display by 2, or; Decrement: Subtract 1 from the number on the display. Initially, the calculator ...
Read more »

Resolve `TypeError can't pickle thread.lock objects`

Posted on 2018-11-02
This article is for Python 2.7 only. May be incorrect for Python 3.x. 1. super() should not be referenced.Bad practice: 1234567class foo(object): passclass bar(foo): def __init__(self, a): self.p = super(bar, self) self.p.__init__(a) This will throw TypeError: can't pickle thread.lock objects ...
Read more »

Python Static 变量和方法

Posted on 2018-04-25
Python中并不像Java或者C++一样有原生支持的static关键字,那么我们要如何定义一个class的static variable或是static method呢? 我在Google上搜了一下,结合自己的一些理解,这里给出一些实现static关键字的方式,并且给出了一定的解释。下面的所有代码均在Python3.6中调试,2.7中的实现会略有不同。 0. Python的类变量Python类变量的行为类似于Java中的static变量,但是还是有一些小的区别。 12345class Foo(object): count = 1 def bar(self, x): count += x 在 ...
Read more »

Jump Over the Export Restriction of Google Docs

Posted on 2018-04-18
Disclaimer: This article is for technical exchanges only. The author is not responsible for any kind of misusage or copyright infringement. This is a simple step-by-step tutorial that helps you to generate PDF version of Google Docs that are set not to be exported. Prerequisites: Mac OS with Safari ...
Read more »

First

Posted on 2017-03-05
Mac hexo Where am I? ??? I give up. 强调一下 *和文字间不能有空格 这样也可以 斜体也可以强调,空一行才能换行! My blog is The Dirac Sea print "hello world!"
Read more »

Hello World

Posted on 2017-03-05
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More in ...
Read more »
F0rge1cE

F0rge1cE

做个法师,哪怕是最蹩脚的法师。

6 posts
2 tags
© 2021 F0rge1cE
Powered by Hexo
Theme - NexT.Mist