PouchDB无法在HTC设备上运行(PouchDB Not Working on HTC Device)
我正在使用PouchDB创建一个phonegap android应用程序。
以下是我测试的设备列表: - HTC One Mini - 没有用 - HTC Desire X - 没有用 - 联想A690 - 工作正常 - LG G2 - 运行良好 - Emulator Android(4.0.0 - 4.2.2) - 工作得很好
我发现只有HTC设备不能像其他设备一样好用。 我已经在我的HTC上测试了一个迷你默认浏览器,但它没有用完。 但是当我在我的HTC One mini谷歌Chrome浏览器上进行测试时,它运行良好。
你可以看到我的代码: Phonegap上的PouchDB(Android)
解决这个问题的任何方法?
真的需要有人来帮助我,谢谢!
I've creating an phonegap android app using PouchDB.
Here is list of devices that i've tested: - HTC One Mini - not worked - HTC Desire X - not worked - Lenovo A690 - worked fine - LG G2 - worked fine - Emulator Android (4.0.0 - 4.2.2) - worked fine
I figured out only HTC Device not worked as well as other device. I've tested on my HTC one mini default browser, and it didn't work out. But it worked fine when i test on my HTC One mini Google Chrome browser.
You can see my code on : PouchDB on Phonegap (Android)
Any solution for this issue?
Really need someone to help me out, Thanks!
原文:https://stackoverflow.com/questions/20559605
最满意答案
批处理文件解决方案并不是很有趣,因为批处理无法真正计算或处理数组和索引,它需要像以下一样工作:设置计数器,列出文件,计算它们,当计数与您想要的数字匹配时, 做一点事。
@echo off setlocal enabledelayedexpansion set i=0 for %%f in (*) do ( set /A i=!i!+1 if !i! EQU 45 ( echo overwriting %%f rem echo. > %%f ) )
rem
使该行成为注释(注释),删除rem
以使其实际覆盖文件。请注意,这不能优雅地处理子目录。
A batch file solution isn't much fun, because batch can't really count or deal with arrays and indexes, it needs to work like: setup a counter, list the files, count through them, when the count matches the number you want, do something.
@echo off setlocal enabledelayedexpansion set i=0 for %%f in (*) do ( set /A i=!i!+1 if !i! EQU 45 ( echo overwriting %%f rem echo. > %%f ) )
rem
makes the line a comment (remark), removerem
to make it actually overwrite files.NB that this doesn't handle subdirectories gracefully.
相关问答
更多-
看来你的问题是如何创建从Folder10 (这是你当前的目录)到Folder5的相应路径,并将其复制到Folder11下面的新Folder10 。 在这种情况下,您可以这样做: SET Source="..\..\Folder4\Folder5" ..\将从当前目录备份一个级别,因此该命令的移动方式如下: Folder10(当前)> Folder9(.. \)> Folder3(.. \)> Folder4> Folder5 看来你已经有了将Source复制到Destination的代码,所以上面的路径应 ...
-
使用批处理文件从指定的文件夹中删除零大小的文件(Delete zero sized files from a specified folder using batch file)[2023-01-15]
如果您知道当前目录是批处理文件的位置: for %F in (logs\*) do if %~zF equ 0 del "%F" 如果当前目录可以在任何位置,则%~dp0生成执行批处理脚本的路径: for %F in ("%~dp0logs\*") do if %~zF equ 0 del "%F" 当我认为OP想要从整个树中删除时,这是最初的答案: 这将删除以当前目录为根的整个树中的所有0个长度文件。 for /r %F in (*) do if %~zF equ 0 del "%F" 您可以通过在 ... -
@ECHO OFF SETLOCAL FOR /f %%x IN ( 'dir /ad /b * ^|FINDSTR "^[0-9]*$" ' ) DO ECHO %%x FOR /F从文件/命令输出到元变量读取行。 for /d只是将dirnames应用于元变量。 @ECHO OFF SETLOCAL FOR /f %%x IN ( 'dir /ad /b * ^|FINDSTR "^[0-9]*$" ' ) DO ECHO %%x FOR /F reads lines from a file ...
-
del *.pdf /q 说明: del -- Dos command to delete files *.pdf -- all files with the .PDF extension in the current directory /q -- Don't ask for confirmation. del *.pdf /q Explanation: del -- Dos command to delete files *.pdf -- all files with the ...
-
你可以把它放在你的批处理文件中: type C:\folder\test.txt 这将回显test.txt的内容。 You can put this in your batch file: type C:\folder\test.txt This will echo out the contents of test.txt.
-
for /d /r "c:\" %%a in (temp\) do if exist "%%a" echo rmdir /s /q "%%a" 对于每个文件夹( /d ),递归地( /r )在c:\ test下存在temp文件夹,如果存在,将其删除 目录删除命令仅回应到控制台。 如果输出正确,请删除echo命令 for /d /r "c:\" %%a in (temp\) do if exist "%%a" echo rmdir /s /q "%%a" For each folder (/d), rec ...
-
批处理文件解决方案并不是很有趣,因为批处理无法真正计算或处理数组和索引,它需要像以下一样工作:设置计数器,列出文件,计算它们,当计数与您想要的数字匹配时, 做一点事。 @echo off setlocal enabledelayedexpansion set i=0 for %%f in (*) do ( set /A i=!i!+1 if !i! EQU 45 ( echo overwriting %%f rem echo. > %%f ) ) rem使该行成为 ...
-
尝试使用通配符和del上的/s开关: del /q /s /f "%userprofile%\My Documents\Downloads\*" 但这可能会使目录保持原样,但是空的。 另一种选择是非常明确的: for /d /r "%userprofile%\My Documents\Downloads" %%x in (*) do rd /s /q "%%x" for /r "%userprofile%\My Documents\Downloads" %%x in (*) do del /f "%%x" ...
-
删除批处理脚本,窗口中的文件夹内容,无需提示(Delete folder contents within a batch script, windows, without prompt)[2022-03-06]
del /q "." / q:安静模式,不要问在全局通配符上是否可以删除 与大多数命令一样,您可以使用del /? 看到这样的选择。 del /q "." /q: Quiet mode, do not ask if ok to delete on global wildcard As with most commands, you can use del /? to see such options. -
批处理文件,如果超过10,将删除最新的文件夹(A batch file that will delete the newest folder if there's more than 10)[2023-10-21]
dir有很多有用的开关: /ad仅显示文件夹(无文件) /od按日期排序(最早的) /tc取“创建”日期时间(默认值:“最后更改”) /b只显示名称。 放一个for循环,跳过前10行,你就完成了: @echo off cd "My Folders" for /f "skip=10 delims=" %%a in ('dir /ad /od /tc /b') do ECHO rd /s /q "%%a" 如果输出是您想要的,则删除ECHO 。 dir has a lot of useful switches ...