This is something I've wondered about for some time now, but only recently am I stuck on this. I am getting this error below when running my test in Mocha:
What does the (14:58) mean? I'm assuming it's the location of the syntax error, but how exactly do I read this in order to locate the error (for future reference)?
Thanks.
It means that node found something it couldn't handle at line 14, column 58 in core.spec.js. Note that the actual error that causes this could be located before this point if your syntax has logical errors.
Example:
if(foo === bar){
console.log('foo equals bar')}
} else { // <-- Unexpected token 'else', but error is on previous line
console.log('nope');
}
would trigger an error on line 3, column 3. But the actual error is the accidental extra ending curly bracket.
(But please, don't post images of code and terminal output. Text will do very well.)
Related
I made a program that is similar to clearing RAM. However, it always leaves a "Done" message followed by a dotted line after being executed. In addition, if you scroll up, you can see that the program was executed. Is there a way to remove both of these things? If you can't hide the fact that a program was executed, could you suppress the 'Done' message?
I have tried adding ClearHome" and " as the last line of my program, and neither stops the Done message from displaying.
Bonus points if your solution can be contained within the original program.
In a separate program, type the following line of code:
AsmPrgmFDCB00AEC9
Then at the end of the original program, type the following line of code:
Asm(prgmPROGRAMNAME
It is recommended that you test this out first with all programs archived, just running the above line of code alone, in case it fails. Hex codes like that one have been known to fail, and sometimes clears the RAM.
You can also try these other hex codes, but always keep in mind the warning above. My RAM has been cleared by this before, so use caution:
http://tibasicdev.wikidot.com/hexcodes
This works on TI 83 and 84, may be different with other calculator types.
EDIT:
I found a way to do this without an external program, and is much simpler.
Just add the following line of code to the end of your program:
Output(1,1," //no space, just a quote
You may or may not have to add ClrHome before that line of code.
This should prevent the Done message from appearing at the end.
Hope this helps!
Put an empty string at the end of your program, so your last line looks like this:
""
Or this
"
The empty string is stored to ans and will be displayed as a blank line rather than the Done message.
There is also an assembly hexcode to do this without leaving the blank line at the top:
FDCB00AEC9
When run at the end of the program using one of the various methods of running assembly, it will leave you with a blank, fully operational homescreen.
Outputting an empty string will prevent the Done message and also preserve Ans, in case a calling program is expecting to use it.
Output(Y,X,"")
See http://tibasicdev.wikidot.com/output for more details on Output(.
In your situation, run Clear Entries (found under Mem), then scroll up so that the Done message is selected and press Clear to get rid of it.
I am trying to conditionally format a graph with a repository variable. My goal is to end with a number between 1-12 which corresponds to the current month.
When I try,
biServer.variables['CURRENT_MONTH']
I get the following error:
Graphing engine is not responding.
"A fatal error occurred while processing the request. The server responded with: oracle.bi.nanserver.fwk.exception.BISvsException: java.lang.NumberFormatException: For input string: "2014 / 07"."
Trying the following,
RIGHT(biSerber.variables['CURRENT_MONTH'],2)
I get an error:
"A type mismatch occurred while evaluating an expression."
Finally, the follow also errors.
RIGHT('biServer.variables['CURRENT_MONTH']',2)
"The syntax of the expression to be evaluated is invalid."
Anyone have ideas? Thanks.
I ended up with a workaround that is serviceable but not ideal.
I added a new column and created a custom formula where the month number, in this case "7", is compared to the repository value CURRENT_MONTH. If CURRENT_MONTH is greater than 7, then return ".", else return "null". (The period being the least noticeable character I could think of)
From here I added the new column to the graph and set a conditional format on that column where if the value is equal to not null (a period in this instance), apply the desired conditional format.
The following link was most helpful for me.
http://bidirect.blogspot.com/2013/10/conditional-formatting-is-it-possible.html
This is my code:
select max(vhis_data.C0432_SAMPL_VALUE1_R), vhis_data.C0401_aid
from vhis_data, T0401_accounts
where vhis_data.C0401_aid = T0401_accounts.C0401_aid
and (
vhis_data.c0401_aid between 1179 and 1291 or
vhis_data.c0401_aid between 1382 and 1402 or
vhis_data.c0401_aid between 1462 and 1620 or
# and so on until...
vhis_data.c0401_aid between 5450 and 5485 or
vhis_data.c0401_aid between 5503 and 5495 or
)
(these numbers represent various points in the system)
The program displayed an error:
vhis_data.c0401_aid between 1179 and 1291 or
*
ERROR at line 5:
ORA-00936: missing expression
What I've noticed is that the first part of the error references the first line in the
and ( ... ) part of my code.
I have also noticed that there is an extra or on the last line of my code. I can take it out, but is this extra or the only reason that the whole and (...) part does not work? Or is there another reason that my code is not working?
(I guess a sub-question of mine, then, is, if there is a missing expression, where does the code stop executing properly?)
For example, here, the missing expression is potentially the last line (because it is expecting something after the "or"). However, the code does not even go through the first line of the and (...) part of the code.
I have combed the net for explanations dealing with the error ORA-00936: missing expression but have not found anything relevant enough to help me in this particular situation.
I welcome any criticism or advice you may have, and thank you so much in advance for any contributions that you give me!
you should not end the whole thing with an or
5495 or
)
this makes the entire parenthetical phrase invalid - everything in the ()... so thats why the line number is flagged up top.
Could this extra or be the only reason that the whole and (...) part does not work?
It's the reason the whole query does not work.
A SQL query does not "execute" in order like a string of commands. The entire query is compiled, a plan built, and the plan executed. For that reason any syntax errors are often shown to point to lines that do not have the actual error.
So the "code" does not "execute" at all. The compilation fails, so there's nothing to execute.
Is there any way through which I can get the Current Line in QTP or the Runtime Error Line number? The Error Line Number is displayed on QTP Error Popup, so there must be some way through which we can get the error line number....
The line number information is not accessible, as far as the QTP community knows.
Here is my console of an error occurring in my applications(iOS). i understand what the error is, but i don't know how to get a more descriptive trace of where this is in my code. Before iOS5 and the new xCode, i would be pointed to the line of error in my code. Now most times all i see is a hexadecimal output, and sometimes i get a short descriptive output like shown below.
2011-11-14 09:37:42.868 AppName[916:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:]: row (0) beyond bounds (0) for section (0).'
*** First throw call stack:
(0x343288bf 0x345781e5 0x343287b9 0x343287db 0x3779ef1f 0x50cd 0x3428722b 0x4edb 0x4fe9 0x5059 0x3175 0x41f1 0x3770a7ff 0x37708f9d 0x376fb941 0x3776d541 0x2bdf 0x377097eb 0x377033bd 0x376d1921 0x376d13bf 0x376d0d2d 0x30b03df3 0x342fc553 0x342fc4f5 0x342fb343 0x3427e4dd 0x3427e3a5 0x37702457 0x376ff743 0x2987 0x23d0)
terminate called throwing an exception
How can i get a more descriptive log output on errors like this? I would like to be shown/brought to the line of error in my code. Hexadecimal output doesn't help me - or i don't know how to use it to my benefit.
You can print all of your item's attributes.
EDIT:
Error descriptions will be at console, there are no more description to reach.