获得BlackBerry 10日志的最佳方式是什么?(The best way to get BlackBerry 10 logs?)
与iOS和Android相比,BlackBerry 10具有相当先进的日志系统。 我发现的唯一解决方案是使用像这样的
javaloader
工具:javaloader.exe -u eventlog > eventlog.txt
但它似乎只适用于黑莓操作系统的前10个版本。 我在BlackBerry 10 NDK中找不到此工具。
使用命令行获取日志的最简单方法是什么?
BlackBerry 10 has quite sophisticated logs system compared to iOS and Android. The only solution i found is using
javaloader
tool like this:javaloader.exe -u eventlog > eventlog.txt
But it seems to work only with pre-10 versions of BlackBerry OS. I cannot find this tool in BlackBerry 10 NDK.
What is the simplest method to get the logs using the command line?
原文:https://stackoverflow.com/questions/13112383
最满意答案
你可能会发现CountDownLatch做你需要的工作。 你会用1的计数来实例化锁存器:
CountDownLatch latch = new CountDownLatch(1);
然后在你的线程之间分享它。 所有等待门打开的线程都会执行
latch.await()
。 直到另一个线程调用latch.countDown()
此方法才会返回。You might find CountDownLatch does the job you need. You would instantiate the latch with a count of 1:
CountDownLatch latch = new CountDownLatch(1);
and then share it between your threads. All the threads that wait for the doors to open will do
latch.await()
. This method will not return until another thread callslatch.countDown()
.
相关问答
更多-
你可能会发现CountDownLatch做你需要的工作。 你会用1的计数来实例化锁存器: CountDownLatch latch = new CountDownLatch(1); 然后在你的线程之间分享它。 所有等待门打开的线程都会执行latch.await() 。 直到另一个线程调用latch.countDown()此方法才会返回。 You might find CountDownLatch does the job you need. You would instantiate the latch ...
-
如何判断ManualResetEvent是否有信号或无信号?(How can I tell if a ManualResetEvent is signaled or non-signaled?)[2024-01-07]
您可以使用WaitOne ,其超时时间为零。 无论哪种方式,函数都会立即返回,您可以使用返回值来确定事件是否被发送。 You can use WaitOne with a timeout of zero. Either way, the function will return immediately and you can use the return value to determine whether the event was signalled or not. -
您也可以使用“或”操作符, for( int i = 0 ; i < 100 || someOtherCondition() ; i++ ) { ... } You can also use "or" operator, for( int i = 0 ; i < 100 || someOtherCondition() ; i++ ) { ... }
-
您可以使用为您处理异步调用的延迟对象 。 这样做时,您的代码将按阅读顺序执行,无论响应何时发回: var jqxhr = $.getJSON('url', function(data) { alert('first callback'); }); jqxhr.done(function() { alert('second callback'); }); 然后使用jQuery.when()来处理多个延迟: var jqxhr1 = $.getJSON('url1'); var jqxhr2 ...
-
但循环只是保持循环,即使它成真 只要条件保持为true while循环就保持循环。 我认为问题在于你应该将条件改写为: while ((userWin < 2) && (compWin < 2)) 用&&代替|| 。 事实上:现在while循环是这样的:“ 只要用户没有赢过两次或更多次,并且计算机没有赢得两次或更多次,就保持循环。 ” but the loop just keeps looping even if it comes true A while loops keeps looping as l ...
-
我可能没有完全清楚你的场景,但我认为你可以为每个事务使用一个条件变量(但仍然只有一个互斥量)。 当事务结束时,发出相应的条件变量信号; 当调度循环退出时,所有条件变量都会发出信号。 I may not have got your scenario completely clear, but I think you could use one condition variable per transaction (but still a single mutex). When the transaction ...
-
只需在检查失败时返回false。 如果其中一个前提条件失败,则无需再进一步检查。 public static boolean isLegitimate(int mon, int day, int year){ // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. // TODO ...
-
在排序方面,通常只是关于如何实现Comparator 。 在这种情况下,您只需要一个Comparator ,它将两个ClientSearch对象与您描述的方式进行比较。 如果您可以简化排序要求,那将会更加清晰 客户编号(最后为空) 然后是队列ID 顾客姓名 使用Java 8,比较器就像这样简单: import static java.util.Comparator.*; .... Comparator
comparator = comparing(Customer::getCu ... -
该代码存在一些问题: produce_bytes在阻塞调用fread期间锁定互斥锁。 响应式应用程序的一般经验法则是尽可能短时间锁定互斥锁。 您可能希望首先将输入读入临时缓冲区,然后锁定互斥锁并将数据复制到线程之间共享的缓冲区。 这同样适用于在调用可以阻塞的fprintf保存互斥锁的consume_bytes 。 produce_bytes in while(d->n_bytes > 0)不保持互斥,这是一个竞争条件,因为consume_bytes为d->n_bytes分配一个新值。 假设你想在fread返 ...
-
WaitHandle.WaitAny方法不设置事件。 它返回满足等待的对象的数组索引。 这可能需要等待,或者也可能在调用WaitAny之前设置事件时发生。 在后一种情况下,索引将无需等待即可返回。 The WaitHandle.WaitAny method does not set an event. It returns the array index of the object that satisfied the wait. This may need a wait or may also occur ...