locate

Delphi ADO : Locate with dataset filter on bug

牧云@^-^@ 提交于 2019-12-01 08:20:24
I have as simple query, which returns following rows: Name Value Peter 1 Peter 2 Peter 3 John 1 John 2 Applying filter: ADO.Filter := 'Name="John"'; ADO.Filtered := True; // Now, its only 2 rows in dataset ADO.Locate('Value', 2); Cursor should point to "John 2", but it points to "Peter 2" (which being filtered out by filter). And locate returns True. Tried on Delphi 7, Rad studio XE 6. It seems that this error is living there for the last 15 years Any solution ? kobik The problem with TCustomADODataSet.Locate is that it's internally using Recordset.Clone and trying to locate a record in the

Delphi ADO : Locate with dataset filter on bug

时光怂恿深爱的人放手 提交于 2019-12-01 06:51:58
问题 I have as simple query, which returns following rows: Name Value Peter 1 Peter 2 Peter 3 John 1 John 2 Applying filter: ADO.Filter := 'Name="John"'; ADO.Filtered := True; // Now, its only 2 rows in dataset ADO.Locate('Value', 2); Cursor should point to "John 2", but it points to "Peter 2" (which being filtered out by filter). And locate returns True. Tried on Delphi 7, Rad studio XE 6. It seems that this error is living there for the last 15 years Any solution ? 回答1: The problem with

Linux下搜索文件、文件名后缀

不想你离开。 提交于 2019-12-01 03:26:12
Linux下搜索文件 Linux系统是由文件组成的,所以搜索文件的功能也十分强大。 which查找命令可执行文件的绝对路径 1、which xx查看命令路径 用#which查看#rm命令可见,rm命令实际上是alias命令设置的带有-i选项的别名,#rm的绝对路径是/usr/bin/rm。 如果没有加选项,命令和绝对路径效果是一样的。 命令其实就是绝对路径的可执行文件,不过是命令加上了一些选项(可执行文件执行时会执行的一些参数)。想要执行命令,就要找到命令在什么路径,而系统会在环境变量的几个目录中寻找有没有输入的命令; 2、which查找的原理 which查找的原理是查环境变量中的文件是否有所查找的命令; 随便输入一个没有的命令,因为环境变量的路径中没有找到这个命令,所以会显示未找到命令; 我们把/usr/bin/ls文件复制一份到/tmp/ls2,然后执行/tmp/ls2,结果和/usr/bin/ls效果一样,但是如果我们直接用ls2命令,会告诉我们没有找到命令,用which查看会显示 /usr/bin/which: no ls2 in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin) 意思是/usr/bin/which查询结果是在 (/usr/local/sbin:/usr/local/bin:/usr

which命令、whereis命令、 find命令 、locate命令、文件名后缀

北城以北 提交于 2019-12-01 03:25:43
which命令 which命令只能用来查找PATH环境变量中出现的路径下的可执行文件。有时我们不知道某个命令的绝对路径时可以使用which命令来查找 [root@localhost ~]# which ls alias ls='ls --color=auto' /usr/bin/ls whereis 命令 whereis命令通过预生成的一个文件列表库查找与给出的文件名相关的文件,使用格式为:whereis 参数 文件名 其参数如下 b:只查找二进制文件 m:只查找帮助文件(在man目录下的文件) s:只查找源代码文件 whereis命令类似于模糊查找,只要文件中包含要查找的字符,都会显示出来。 [root@localhost ~]# whereis ls ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz locate命令 locate命令类似于whereis,也是通过查找预生成的文件列表库来告诉用户要查找的文件在哪里,后面直接跟文件名。一般机器上没有安装这个软件包,使用yum install -y mlocate 安装。在安装完毕之后第一次使用会报错,因为系统上没有生成文件列表库,可以通过使用updatedb命令立即生成这个库,但是如果机器上正运行着重要业务最好不要运行这个命令,因为一旦执行,服务器的压力会增加。 [root@localhost

How should I use getResource() in Java?

点点圈 提交于 2019-11-30 18:15:48
问题 This question is asked in numerous places, with myriad small variations. (Such as Java - getClassLoader().getResource() driving me bonkers among others.) I still can't make it work. Here's a code snippet: String clipName = "Chook.wav"; ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); // URL url = classLoader.getResource(clipName); URL url = new URL("file:///Users/chap/Documents/workspace/the1620/bin/ibm1620/" + clipName); ais = AudioSystem.getAudioInputStream(url);

Delphi - restore actual row in DBGrid

醉酒当歌 提交于 2019-11-30 15:37:27
问题 D6 prof. Formerly we used DBISAM and DBISAMTable. That handle the RecNo, and it is working good with modifications (Delete, edit, etc). Now we replaced with ElevateDB, that don't handle RecNo, and many times we use Queries, not Tables. Query must reopen to see the modifications. But if we Reopen the Query, we need to repositioning to the last record. Locate isn't enough, because Grid is show it in another Row. This is very disturbing thing, because after the modification record is moving into

Delphi - restore actual row in DBGrid

爷,独闯天下 提交于 2019-11-30 15:05:44
D6 prof. Formerly we used DBISAM and DBISAMTable. That handle the RecNo, and it is working good with modifications (Delete, edit, etc). Now we replaced with ElevateDB, that don't handle RecNo, and many times we use Queries, not Tables. Query must reopen to see the modifications. But if we Reopen the Query, we need to repositioning to the last record. Locate isn't enough, because Grid is show it in another Row. This is very disturbing thing, because after the modification record is moving into another row, you hard to follow it, and users hate this. We found this code: function TBaseDBGrid

Linux(八)—— Linux 指令(文件目录类、时间日期类、搜索查找类、压缩和解压类)

对着背影说爱祢 提交于 2019-11-30 09:36:27
文章目录 一、Linux 常用指令 1、Linux 文件目录类指令 (1)pwd 指令 (2)ls 指令 (3)cd 指令 (4)mkdir 指令 (5)rmdir 指令 (6)touch 指令 (7)cp 指令 (8)rm 指令 (9)mv 指令 (10)cat指令 (11)more 指令 (12)less 指令 (13)> 和 >> 指令 (14)echo/head/tail 指令 (15)ln 指令 (16)history 指令 2、Linux 时间日期类指令 (1)date 指令 (2)cal 指令 3、Linux 搜索查找类指令 (1)find 指令 (2)locate 指令 (3)grep 指令和管道符号| 4、Linux 压缩和解压类指令 (1)gzip/gunzip 指令 (2)zip/unzip 指令 (2)tar 指令 一、Linux 常用指令 1、Linux 文件目录类指令 (1)pwd 指令 语法: pwd 解释:显示当前工作路径的相对路径 (2)ls 指令 语法: ls [选项] [文件或目录] 常用选项: -a :显示当前目录所有的文件和目录,包括隐藏的 -l :以列表的形式显示所有信息,不含隐藏文件 -al :以列表的形式显示所有信息,包含隐藏文件 解释:显示目录下所有的文件和目录 (3)cd 指令 语法: ls [参数] 解释:切换到指定的目录

linux中查找命令find、locate、whereis、which、type的区别

久未见 提交于 2019-11-29 19:06:51
find find是最常见和最强大的查找命令,你可以用它找到任何你想找的文件。与查询数据库(/var/lib/locatedb)文件不同,find查找的是磁盘空间。 locate locate命令其实是“find -name”的另一种写法,但是要比后者快得多,原因在于它不搜索具体目录,而是搜索一个数据库(/var/lib/locatedb或者/var/lib/mlocate/mlocate.db),这个数据库中含有本地所有文件信息。Linux系统自动创建这个数据库,并且每天自动更新一次,所以直接使用locate命令查不到最新变动过的文件。为了避免这种情况,可以在使用locate之前,先使用updatedb命令,手动更新一下数据库。 whereis whereis命令只能用于程序名的搜索,而且只搜索二进制文件(参数-b)、man说明文件(参数-m)和源代码文件(参数-s)。如果省略参数,则返回所有信息。同locate一样,查询数据库(/var/lib/locatedb)文件。 which which命令的作用是在PATH变量指定的路径中,搜索某个系统命令的位置,并且返回第一个搜索结果。也就是说,使用which命令,就可以看到某个系统命令是否存在,以及执行的到底是哪一个位置的命令。 type type命令其实不能算查找命令,它是用来区分某个命令到底是由shell自带的