问题标签 [locate]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
18305 浏览

macos - 在 Mac 的终端中找不到 Applications 文件夹

我尝试了以下代码不成功

我也尝试了以下失败

0 投票
2 回答
1476 浏览

batch-file - 批处理文件如何定位它所在的位置?

批处理文件如何单独查看它的位置?

0 投票
1 回答
235 浏览

java - 在java中的屏幕上的某个点查找窗口

是否有任何跨平台的方法来确定哪个窗口位于屏幕上的某个点?

如果没有,对于 linux(X11?)和 OS X,getWindowAtPoint 的等效函数是什么?

0 投票
5 回答
5520 浏览

macos - 为什么 unix 定位命令仍然显示不再存在的文件/文件夹?

我最近将整个本地 Web 开发区域转移到使用 MacPorts 的东西,而不是在我的 Mac 上使用 MAMP。我已经进入 Python/Django 并且不再需要 MAMP。

问题是,我已经从 Applications 文件夹中卸载了 MAMP,还有首选项文件,但是当我在终端中运行“locate MAMP”命令时,它仍然显示我所有的 /Applications/MAMP/ 东西,就好像它仍然存在一样? 而当我 ' cd' 进入 /Applications/MAMP/ 它不存在?

与 locate 是一种索引搜索系统有关,因此这些旧文件路径被缓存了吗?请解释原因以及如何对其进行排序以使其不再显示。

0 投票
2 回答
1190 浏览

c# - C# 需要使用 REGEX 来定位网址,这可能吗?

C# 需要使用 REGEX 来定位网址,这可能吗?

基本上我需要在将字符串加载到 WebBrowser 之前对其进行解析

基本上我想要发生的是替换网址,使其看起来像一个超链接,并使用拉入字符串的任何地址来执行此操作。我需要替换网址,以便网址看起来像

这将允许我有可点击的链接.. 任何想法?

0 投票
3 回答
2160 浏览

c# - 查找 .exe 的图标

我有一个 .exe 文件的路径名。

如果将此文件拖放到桌面上,如何找到 Windows 将使用的图标的路径?(我想在我自己的程序中显示这个图标。)

我需要能够在运行时通过我的 C# 程序找到图标。

在 Visual Studio 2008 中使用 C#。

0 投票
3 回答
3860 浏览

apache - phpmyadmin 位于 plesk 的什么位置?

我有 plesk 8.3.0,使用 phpmyadmin 2.8.2.4
我试图查找 phpmyadmin 所在的位置。我在 srv/ 中找不到它,我在服务器中执行了一个 find 命令,但不太确定它的实际位置。

我想要做的是在 /httpdocs 下设置一个 phpmyadmin,这样我就不必登录到 plesk 并单击多次,直到我可以启动 phpmyadmin..

任何想法?谢谢。

0 投票
2 回答
2056 浏览

scp - Xargs 的 Scp 定位输出

我想列出定位输出的文件。我scp想拿清单。

我不确定语法。我对伪代码的尝试

如何将文件移动到目的地?

0 投票
2 回答
128 浏览

sql - Complicated query - help NEEDED!

really hope someone can help me on this one! I have 6 tables:

Products
prodid

Prodequipment
prodid
equipclassmain
equipclassor

Equipclasses
classid

Equipfunctions
equipid
classid

Equipment
equipid

Workshopequipment
workshopid
equipid

Products – a list of some products
Equipment – a list of some equipment
Prodequipment – lists what equipment is needed to do a product. You can use equipment listed in equipclassmain or replace it by equipment in equipclassor. Table Products has one to many relation to table Prodequipment, i.e. you will use many different tools (equipment) to produce one product, but you can choose to use anyone in the pair equipclassmain/equipclassor. For instance to frame a photo you can use a wooden frame or plastic frame (one pair) and a cover glass or cover plastic (second pair). You can combine it as you wish, but both pairs should be used: wooden frame with cover glass or plastic frame with cover glass or wooden frame with plastic cover or plastic frame with plastic cover.
Equipfunctions and Equipclasses – Because one piece of equipment can be used in different ways it is not linked directly to table Prodequipment. I have created table Equipclasses where all single use of every possible equipment is listed and table Equipfunctions where I list those single uses for every equipment.
Workshopequipment – lists workshops and equipment they are using.

Now I need a list of products which can be manufactured by two different given workshops (let's say workshopid = 1 and workshopid = 4), i.e. both those workshops have all equipment needed to produce those products. Bear in mind that those workhops don't have to use the same equipment to do so as I described above.

I'm trying with this query:

But I get an "Column classid in field list is ambiguous". Any idea what's wrong here?

THANK YOU!

0 投票
4 回答
1866 浏览

java - 在固定网格中定位和/或选择图形对象的有效方法

我有一个充满大量圆圈(Ellipse2D)的面板。圆圈存储在二维数组(行和列)中。

我的目标是当我将鼠标拖到圆圈上时能够“绘制”圆圈。我最终会想要使用选择形状来改变选择形状中包含的所有圆圈的颜色。

我正在使用鼠标拖动侦听器,它不断扫描整个二维数组并检查当前点是否在圆圈内。像这样:

上面的代码有效,但它真的很慢(1000+ 圈),因为它正在检查每一个对象。

肯定有更好的办法。我读过一些关于四叉树的文章,但我不确定四叉树是否比我需要的马力更大。

谢谢

我根据以下一些评论进行了以下更改。Circles 现在是一个线性 ArrayList。draw 方法只是简单地填充圆圈。进行此更改将速度提高了两个数量级。现在效果好多了。虽然,我仍然可以以适中的速度扫过面板并错过几圈。所以我可能需要进一步优化。