首页 \ 问答 \ 数据库像MS Access的PHP(db like ms access for php)

数据库像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
更新时间:2022-06-08 10:06

最满意答案

编辑:我认为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))

相关问答

更多
  • 编辑:我认为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 ...
  • 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 {} ...
  • 如果你想要一个数字的最后十位数字,不要计算整个事情(这将花费太多的内存和时间)。 相反,考虑使用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+ ...
  • 问题是你的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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)