数据库像MS Access的PHP(db like ms access for php)
正如你所知道的ASP可以使用MS Access。 这对于小型网站很有用。 它减少了时间和金钱。
有没有替代MySQL,我可以使用像PHP访问ms访问? 我想要的是使用db作为ms访问的文件。
有什么意见?
As you know ASP can use MS Access. It is useful for small websites. It reduces time and money.
Is there an alternative to MySQL that I can use like ms access for PHP? What I want is to use db as a file as ms access do.
Any opinion?
原文:https://stackoverflow.com/questions/9278738
最满意答案
编辑:我认为
grouper
在这个解决方案中是过度的,请看@Haidro的解决方案https://stackoverflow.com/a/16078696/1219006
使用
itertools
的石斑鱼配方我假设
b
是一个开头的字符串,因为将数字设置得那么大会浪费内存。from itertools import izip_longest from operator import mul def grouper(n, iterable, fillvalue=None): "Collect data into fixed-length chunks or blocks" # grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx args = [iter(iterable)] * n return izip_longest(fillvalue=fillvalue, *args) for g in grouper(5, b, fillvalue=''): # And to work out the product of the digits num = ''.join(g) prod = reduce(mul, map(int, num))
Edit: I believe that
grouper
is overkill in this solution, look at the solution by @Haidro https://stackoverflow.com/a/16078696/1219006
Using the grouper recipe from
itertools
I'm assuming
b
is a string to begin with because it would be a crazy waste of memory to make a number that big.from itertools import izip_longest from operator import mul def grouper(n, iterable, fillvalue=None): "Collect data into fixed-length chunks or blocks" # grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx args = [iter(iterable)] * n return izip_longest(fillvalue=fillvalue, *args) for g in grouper(5, b, fillvalue=''): # And to work out the product of the digits num = ''.join(g) prod = reduce(mul, map(int, num))
相关问答
更多-
使用python将较大的数字子集化为较小的数字序列(Subset a large number into smaller series of numbers using python)[2022-11-15]
编辑:我认为grouper在这个解决方案中是过度的,请看@Haidro的解决方案https://stackoverflow.com/a/16078696/1219006 使用itertools的石斑鱼配方 我假设b是一个开头的字符串,因为将数字设置得那么大会浪费内存。 from itertools import izip_longest from operator import mul def grouper(n, iterable, fillvalue=None): "Collect data ... -
1 == 2表示大量的1(1 == 2 for large numbers of 1)[2023-10-28]
Python使用浮点表示 浮点实际上是一个固定宽度的二进制数(称为“有效数字”)加上一个小整数来告诉你将该值移位的两个幂(“指数”)。 加一个标志位。 就像科学记谱法一样,但在2号而不是10号。 最接近的64位浮点值为1.9999999999999999是2.0 ,因为64位浮点值(所谓的“双精度”)使用52位有效数,相当于大约15位小数。 文字1.9999999999999999只是编写2.0另一种方式。 但是,最接近1.999999999999999值小于2.0 (我认为它确实是1.9999999999 ... -
-(NSString*) suffixNumber:(NSNumber*)number { if (!number) return @""; long long num = [number longLongValue]; int s = ( (num < 0) ? -1 : (num > 0) ? 1 : 0 ); NSString* sign = (s == -1 ? @"-" : @"" ); num = llabs(num); i ...
-
你最后会重新使用x和y ,但只能替换100以上的索引。所以最后这样做,它的工作原理: for i in range(10000): # Or use xrange in Python 2.7 y[i] = MLf(x[i], 1) plt.plot(x,y) plt.show() 或者为这部分制作不同的阵列。 You are re-using x and y at the end, but only replacing indices up to 100. So do this at the ...
-
这应该让你开始: DIR=$1 BATCH_SIZE=$2 SUBFOLDER_NAME=$3 COUNTER=1 while [ `find $DIR -maxdepth 1 -type f| wc -l` -gt $BATCH_SIZE ] ; do NEW_DIR=$DIR/${SUBFOLDER_NAME}${COUNTER} mkdir $NEW_DIR find $DIR -maxdepth 1 -type f | head -n $BATCH_SIZE | xargs -I {} ...
-
非常大的数字Python(Very Very Large Number Python)[2023-02-11]
如果你想要一个数字的最后十位数字,不要计算整个事情(这将花费太多的内存和时间)。 相反,考虑使用pow的“三参数”形式来计算特定基地的权力,并且您会发现问题要容易得多。 If you want the last ten digits of a number, don't compute the whole thing (it will take too much memory and time). Instead, consider using the "three-argument" form of po ... -
考虑使用OEIS 。 它是一个巨大的序列数据库,您可以检查。 我会说,因为它可能没有所有可能的算术级数等,你可以通过编写一个检查基本序列的程序(试图找到常见的差异或二次差异等)得到最好的覆盖率,如果没有任何效果,检查数据库。 我不确定OEIS是否有任何api,但你可能会觉得这很有帮助。 Wolfram还有一个小部件可以尝试这个,但它的用途非常有限。 如果您设法完成,则应在评论中发布指向您的代码的链接。 这听起来像一个很酷的程序; 我很想看到它:) Consider using the OEIS. It is ...
-
单个/在Python 3中进行浮点除法。 11111111111111111111/10给你1.1111111111111112e+18 。 这大约等于您将起始数字除以10时得到的非整数值。 当这被转换为int时,你得到111111111111111168 。 如果你想要做整数除法(除法余数),你应该使用//运算符。 Single / in Python 3 does float division. 11111111111111111111/10 gives you 1.1111111111111112e+ ...
-
如何在智能表中将较小的数字排序为较大的数字?(How to sort by smaller Numbers to Larger Numbers in smart table?)[2023-04-24]
问题是你的ID是一个字符串,所以它是排序alpha而不是数字。 将所有ID更改为数字,或者如果您不想执行此操作,请在分配数组后插入: $scope.data.forEach(o=>o.ID=+o.ID) https://jsfiddle.net/qwc5s6qt/6/ 否则,请更新数据或Angular getter以获取自定义排序功能。 The problem is your ID is a string so it's sorting alpha and not numerically. Change ... -
我可能是错的,但是当我运行你的代码时,我得到的值很小。 难道你会看到像-3.53107108e-310这样的东西,并将它们混淆为大数字? 那是: -0.0 ... <307 '0's> ... 0353107108 请参阅下面的完整输出: [[[ 1.27490729e+000 2.48048100e+000 3.07058432e+000 7.30862963e-001 3.61289051e-002 0.00000000e+000] [ 1.29285884e+000 ...