上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 用c++也写了分支定界算法,解决背包问题。 参考:https://www.geeksforgeeks.org/implementation-of-0-1-knapsack-using-branch-and-bound/ 阅读全文
posted @ 2018-09-27 09:11 卷积 阅读(1201) 评论(0) 推荐(0) 编辑
摘要: 背包问题,一般可以用动态规划解决。当涉及到的物体数目比较多,填表法所需要的存储空间很大$O(nW)$,每次都以内存不足告终。 参考: https://www.geeksforgeeks.org/implementation-of-0-1-knapsack-using-branch-and-bound 阅读全文
posted @ 2018-09-27 08:59 卷积 阅读(4204) 评论(0) 推荐(0) 编辑
摘要: 介绍MYSQL中的逻辑表达式。 1.IF表达式 嵌入IF(nested IF ): 2.CASE 语句 或者可以写成如下形式: 3. 逻辑表达式 NOT, AND, OR 阅读全文
posted @ 2018-09-21 15:43 卷积 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1. 去掉字符串末尾的数字。 2. 删除字符串末尾的字符,参考:http://www.runoob.com/python/att-string-rstrip.html 3.删除括号以及括号中的内容 阅读全文
posted @ 2018-09-21 15:34 卷积 阅读(153) 评论(0) 推荐(0) 编辑
摘要: from collections import namedtuple # Each kind of nametuple is represented by its own class, # created by using the nametuple() factory function # The arguments are the name of the new class and a s... 阅读全文
posted @ 2018-09-20 08:57 卷积 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1.subquery特性(必须有括号包围) (1) ORDER BY 不能在subquery中使用 (2) 返回多行的SELECT或WHERE子句中的子查询必须与显式设计用于处理多个值的运算符结合使用,例如IN运算符。 否则,SELECT或WHERE语句中的子查询可以输出不超过1行。 Example 阅读全文
posted @ 2018-09-18 15:35 卷积 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 计算pow函数出现溢出错误 解决方法: 用numpy.power代替 阅读全文
posted @ 2018-09-17 10:59 卷积 阅读(1022) 评论(0) 推荐(0) 编辑
摘要: 1.Left and Right joins Example2 Example3: 2.关于 COUNT DISTINCT 的注意点。 阅读全文
posted @ 2018-09-09 18:05 卷积 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1. Inner Joints 表示链接两个表格共有部分。(Inner Joints) 当两个表格的列名相同时,为避免歧义,需指定从哪个表格进行引用的说明。 2.从多个表进行结合。 阅读全文
posted @ 2018-09-09 16:27 卷积 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1. GROUP BY GROUP BY 一般在WHERE之后,在 ORDER BY 和 LIMIT之前。 Q1: 去掉ORDER。 数字简写。 2. HAVING用法。 Q3: Q6: 阅读全文
posted @ 2018-09-07 17:47 卷积 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页