Different values in Variables View than Console View - swift

I´m debugging an IOS application with UITest.
I have tried to get the last index of the table but it gave me an unexpected value like 18446744073709551615.
Then I saw a problem between Variables View and Console View.
In the variables view, at the index value prints -1 but if I execute a 'po' command with the same initialization than the Index variable I got another value as you can check in the picture.
I wish that somebody could help me with this problem or tell me why is it happening.
Regards

It is the same number. -1 = 2^^64 - 1 = 18446744073709551615. You get the last on po.

Related

Cannot edit numbers document with AppleScript

I am trying to run a very simple script in automator for a the apple program numbers. I have tried a couple of different scripts with no success.
With the following code:
on run {input, parameters}
tell application "Numbers"
activate
tell document 1 to tell sheet 1 to set the value of cell "B3" to 0
tell document 1 to tell sheet 1 to set the value of cell "C4" to 42
end tell
return input
end run
I get the following error message:
"Numbers got an error: Can’t set cell "B3" of sheet 1 of document 1 to 0."
There was a nearly identical posted question with the following solution:
on run {input, parameters}
tell application "Numbers"
tell table 1 of sheet 3 of document 1
set the value of cell 1 of column "E" to 1000
end tell
end tell
return input
end run
but this gives me the following error message:
"Numbers got an error: Can’t set table 1 of document 1 to 1000."
This other post did mention it may have something to do with privileges but did not elaborate and I have been unable to find any more information regarding this.
Can anyone help me please?
Thank you.
With a Numbers document already opened, the following example AppleScript code works for me:
tell application "Numbers"
activate
tell first table of first sheet of front document
set value of cell "B3" to 0
set value of cell "C4" to 42
end tell
end tell
Here is a different way of saying the same thing as the example AppleScript code above:
tell application "Numbers"
activate
set value of cell "B3" of table 1 of sheet 1 of document 1 to 0
set value of cell "C4" of table 1 of sheet 1 of document 1 to 42
end tell
Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors. Additionally, the use of the delay command may be necessary between events where appropriate, e.g. delay 0.5, with the value of the delay set appropriately.

Empty rows in report when using count function

I am using BIRT reporting with my mongodb datasource. I am trying to COUNT some events. COUNT function gives the correct value but there is big empty space at the end of the page depending upon the count value. If the count value is big then the rest of the page is empty and on the next page same record is coming e.g. :
In this Image the rest of the page is empty and same record is coming on the next pages also. It looks like empty spaces are being printed.
This is how my report looks like :
The COUNT function:
I have tried using SUM also but I get this error when I use SUM function instead of COUNT :
org.eclipse.birt.report.engine.api.EngineException: A BIRT exception occurred. See next exception for more information.
Can not convert the value of True to Double type.
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1245)
at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1224)
at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:101)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.execute(HTMLAbstractLM.java:468)
Please help, thanks in Advance.
I got the issue to this problem. If we select "Hide Detail" Option from the group then this problem go away.

Zabbix Trigger Expression = NULL

i´ve a quick question regarding a zabbix trigger expression. Our script finds out the certification lifetime while returning a number into a file. I already created some triggers for specific time spans (like 10 days or 44 days).
For example:
{Certificate Lifetime:vfs.file.contents[C:\Zabbix_scripts\cert.txt].prev()}<=30 and {Certificate Lifetime:vfs.file.contents[C:\Zabbix_scripts\cert.txt].prev()}>10
I now want to have a trigger which will cause an "Disaster" when the value in the .txt file is unavailable, like the txt file is empty.
I´ve tried
{Certificate Lifetime:vfs.file.contents[C:\Zabbix_scripts\cert.txt].prev()}=0
But this was not the right sulution. Any ideas?
Moreover we have some machines which are equal to others but doesn´t show any value. Any ideas at this point?
Regards
You should be able to detect empty item value with something like this:
strlen()=0

Cannot retrieve rows from Zend_Db_Table_Rowset

I have successfully fetched a rowset from my database table unto the view script. I did a var_dump($result) on the view script to confirm. But I am unable to fetch the individual rows to properly display their contents.
<?php
if($this->result)
while($data =$this->result->getRow())
var_dump($data);
I get the error message(truncated..):
Message: No row could be found at position 0
Stack trace:
#0 C:\wamp\www\events\application\views\scripts\event\fetch.phtml(6): Zend_Db_Table_Rowset_Abstract->getRow()
....
....
what am I doing wrong?
I finally got it sorted. The getRow() method apparently does not work with while() loops. I switched to foreach() loop and it's resolved.
Though I would still like to know why the while() loop does not work.

Problems with empty table view

im trying to write an app that will display a list off lines from a book e.g line 1, line 2 in a table view and you can then select a line to view the corrosponding text.
I've got to the stage where the text should at least appear in the table view(not as far as being able to select it), yet it remains empty.
I used the debugger and was able to find out that there are zero objects in the array used to determine the 'numberOfRowsInSection' and being as this returns zero I think this may explain the problem?
I have pasted up all my code and would really appreciate it if someone has time to skim through it. I know its a big thing to ask but I cant seem to pin point the problem myself.
RootViewController.h --> http://pastie.org/858561
RootViewController.m---> http://pastie.org/858562
BookTestAppDelegate.h ---> http://pastie.org/858566
BookTestAppDelegate.m---> http://pastie.org/858567
LineClass.h----> http://pastie.org/858568
LineClass.m ----> http://pastie.org/858570
SOURCE : http://uploading.com/files/9f5f1249/BookTest.zip/
Thanks guys,
Your sample sqlite database doesn't have table named "animals". But it has table "book". I think you should correct your readLinesFromDatabase method with following SQL statement: select * from book. ;-)