问题标签 [background-foreground]

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 投票
1 回答
3890 浏览

image-processing - 使用 maxflow 进行图像分割

我必须在 C++ 中使用 maxflow 算法进行前景/背景分割。(http://wiki.icub.org/iCub/contrib/dox/html/poeticon_2src_2objSeg_2src_2maxflow-v3_802_2maxflow_8cpp_source.html)。我根据它们的 RBG 从 png 文件中获取像素数组,但下一步是什么。我怎么能用这个算法来解决我的问题?

0 投票
2 回答
2758 浏览

terminal - 关闭终端窗口/会话后获取 bg 作业到 fg

TL;DR关闭终端窗口后,如何将bg(后台)作业放入(前台)?fg

FULL 我正在使用终端启动 Spotify 并使用 and 将其置于CTRL+Z后台bg。在这个窗口中一切都按预期工作:fg再次将进程置于前台,并将jobsSpotify 显示为正在运行的进程。如果我关闭终端窗口,就会出现问题。

在我关闭终端窗口并打开一个新的终端窗口后,该jobs命令找不到在后台运行的 Spotify。因此,我无法再访问停止或关闭的过程。

CTRL+Z这种行为, fg, bg&的优点是什么jobs?我怎样才能找回我的流程?

0 投票
1 回答
532 浏览

r - 如何更改`gedit()`或`gcombobox()`输入框的背景/前景颜色?

考虑以下输入框:

gedit()当/输入框包含字符串时,如何制作gcombobox()红色的背景和白色的前景(文本本身)asdf

0 投票
0 回答
165 浏览

android - 从我的应用程序中运行另一个应用程序,但在该应用程序关闭后继续执行?

好的,我有一个程序(prog1),它通过intent(prog2)打开另一个程序。我的目标是让 prog1 在 prog2 处于前台时不做任何事情。当 prog2 退出前台时,让 prog1 继续执行。

但我不知道从这里去哪里。

这是可能吗?任何人都可以提供有关从这里去哪里的指导吗?

0 投票
1 回答
422 浏览

ios - UIPageViewController 在前台应用程序之后没有重新加载当前的 viewController

https://imgur.com/6rGCCe5 在 pageViewController 上滑动时,我按下锁定或主页按钮。在前台应用程序进入后

我向 pageViewController 发送了通知,所以我无法获取当前控制器,PageViewController 没有重新加载他的控制器。

返回错误的对象。任何委托方法都不会在前台之后调用。如何获取当前控制器?

0 投票
1 回答
364 浏览

ios - 应用程序后台 - 前台状态

有没有办法阻止应用程序进入后台?或者有没有办法让我的应用程序进入后台?

我正在为客户制作一个展示应用程序,该应用程序必须始终在 iPad 上运行,无需用户交互。

0 投票
1 回答
936 浏览

shell - 当我向后台作业发送 SIGCONT 信号时发生了什么?

我正在编写一个简单的 Linux shell,我想知道是否可以通过向其发送 SIGCONT 信号将后台作业置于前台。

0 投票
1 回答
1045 浏览

android - 从服务启动活动

我们不能从服务启动活动吗?如果是这样,服务是否会在单独的线程中继续在后台运行,而在前台启动的活动是否会作为单独的线程?

0 投票
1 回答
114 浏览

android - Is possible to check running application currently is showing or not on Android device

I'm working with Receiver and I can detect Wifi state changes in Wifi Setting System.

But I need to know specified application is showing or not to do more thing,

ex. if specified application was hide in Background, do nothing, and if it was showing for user to integrate, I will do something.

People who know how to check specified application was running is showing or not,

Please help me,

p/s :

  • I have 1 Receiver and 1 Activity (is "specified Application" as I mentioned)

  • I can integrate in onReceive method, it means I know how to receive signal.

Thanks.

SOLUTION

Okay, thank you,

I know how to check.

I need stored public static boolean in onPause method, to indicate current is invisible state.

And when onResume method was called, the above boolean will be in Visible state.

How to check if activity is in foreground or in visible background?

0 投票
1 回答
586 浏览

ios - iOS:如何将应用程序从后台调度到前台

我正在通过低功耗蓝牙为 iPhone 和我的智能手表之间的连接进行编码。功能是“查找我的手机”,触摸手表然后 iPhone 会报警。在此过程中,我希望我的应用程序处于活动状态。它可以从后台调度到前台,所以我们可以做更多其他的事情!但是我找不到关于它的api,任何人都可以帮助我,谢谢?