V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  aijam  ›  全部回复第 7 页 / 共 19 页
回复总数  377
1 ... 3  4  5  6  7  8  9  10  11  12 ... 19  
2020-07-18 13:10:04 +08:00
回复了 vcfghtyjc 创建的主题 Linux Linux 下如何关闭 CPU cache?
2020-07-10 08:52:15 +08:00
回复了 L4Liiyooooo 创建的主题 Python 大佬们求问一下 我有一个需求 Python 能实现吗?
窃以为,考虑这个问题的满足(satisfaction)问题版本:判断是否存在任意一个行的组合,满足所有列的约束条件。可以很容易的 reduce 成 SAT 问题,所以可以肯定是一个 NP 问题。如此一来,基本只能靠一些 heuristics 来剪枝搜索空间了。
也说不上是错误,更多是自然语言的局限性。如果从逻辑学来看,and 满足交换律,A and B = B and A ;从计算角度看,A and B 是先判断 A 在判断 B 。如果不比较几个版本,你也看不出作者到底想说什么语义。
所以我说这书语序有问题,ppt 就是你说的语序。
如果 Tk 还没有写完,Ti 的 validation 无法判断“Tk 所写的数据项集与 Ti 所读数据项集不相交”。
第 2 点其实就是说两个事务如果运行时间有重合的时候怎么办。
你看看第七版原版说得是不是合理。ppt 第 50 页: https://www.db-book.com/db7/slides-dir/PDF-dir/ch18.pdf
(你会发现这书说得颠三倒四,ppt 和第 6 版说得好像是同一件事情,但是语序换了一下可以让读者理解成完全不同的事情。)
2020-06-10 09:25:33 +08:00
回复了 Visitor233 创建的主题 程序员 你在程序中用过那些数学公式?
最常用的就是η-reduction,λ x. f x = f
select * from world where continent = "Asia" order by population desc limit 3 offset 2;
2020-05-28 15:25:39 +08:00
回复了 johnnyleaf 创建的主题 Python 关于 Python3 重载运算符 与 引用
2020-05-28 14:58:19 +08:00
回复了 johnnyleaf 创建的主题 Python 关于 Python3 重载运算符 与 引用
C 里存 A, B 的 reference
>>> s = 'babble'
>>> re.sub('(?<!^)' + s[0], '*', s)
'ba**le'
2020-04-15 11:14:33 +08:00
回复了 abcbuzhiming 创建的主题 程序员 似乎计算机数据结构中存在一个明显的“技术断层”?
估计 lz 没有发现 linked list 和 tree 的联系。
2020-02-14 17:22:56 +08:00
回复了 AntiGameZ 创建的主题 程序员 如何有效的管理较少使用的 shell command
@aijam 把这一行加入.bashrc。忘 alias 了,就输入 alias 查询下。
2020-02-14 17:21:42 +08:00
回复了 AntiGameZ 创建的主题 程序员 如何有效的管理较少使用的 shell command
alias alias='alias | less'
2020-02-07 14:46:26 +08:00
回复了 pythonee 创建的主题 程序员 type 和 class 的区别是什么
In Assembly or C, type determines the interpretation of a sequence of memory and the operations that can be performed on it. For example, if you interpret 4 bytes of data as int, you can perform arithmetic operations with it; but if you interpret the same 4 bytes as char[4], you will be able to iterate over it with some indices.
Such idea can be found in many other languages. Another example is when you do "type casting", you are basically indicating the compiler to treat the same sequence of bytes with a different interpretation, such that a different set of operations can be applied.
So, how can you create your own type, i.e. define your own interpretation and the set of operations on a piece of data? That's where classes come into the picture. In general, you can consider a class as a recipe of a user-defined type, in contrast to the built-in types which are already predefined for you.
Surely, types and classes are much more profound concepts, especially when putting in the context of different languages. If you want to dive deeper on this topic, I think you should learn a little more about types and "type class" in Haskell, and maybe try to find the connection between "type class" in Haskell and "abstract class"/"interface" in the OO world. Also, compare them with "struct" in C/C++ and see how those languages provide their own mechanisms for abstraction.
觉得不值就卖给别人呗
@wutiantong 其实我也这么觉得,只是看看 greedy 分组啥效果 :D
@aijam 只能蒙着眼瞎写猜测 greedy 了。。。
1 ... 3  4  5  6  7  8  9  10  11  12 ... 19  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2819 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 80ms · UTC 15:25 · PVG 23:25 · LAX 08:25 · JFK 11:25
Developed with CodeLauncher
♥ Do have faith in what you're doing.