Exit rails console after long output - ruby-on-rails-3

I would've thought this would be an easy thing, but when I use the rails console, if I query a variable that has multi-page output, I can continue scrolling until the console yields (END) but then I can't get out of that state without CTRL+Z, which requires me to restart said rails console to continue. I'd like to just exit that output, but CTRL+C, CTRL+D, ESC, and every other combo I can think of simply do nothing. I'm certain there is a way to do it, can someone put me straight?
Thanks

You're in a pager. Press "Q", for "Quit".

Related

How to stop IntelliJ from jumping to a subcategory in run console

I hope I can explain my specific annoyance clearly enough:
Quite some time ago, IntelliJ introduced a feature in the run console to parse the content of the output and would try to print a nice tree structure on the left. However, its default behavior of jumping to the error was very annoying. To illustrate my point:
When it starts normally, the full console output is available in the right panel. However, when things happen, or, in my case of gradle run, when I simply stop it, IntelliJ would jump to the specific block of output only with the error:
Note, in the second screenshot, that there is no scroll bar on the right side of the right panel, and thus I cannot scroll up to view the actual run logs. I have to click the left panel's top element in the tree to be able to view all logs.
The locking to a specific block of output is nice to have, but I am happy without it too, as before it was introduced. But the default jumping to that block is annoying and irritating. Almost in all cases I started and ended a run like this, I have to click the left panel to view the whole log -- this "Build cancelled" error block is of no use at all. And when it's jumping to an actual exception, majority of the time I'd need to look around its context for the cause, which requires me to re-orient myself in the log flow where the block was at. This is very counter productive for me.
I have been assuming IntelliJ should provide an option to either not jump to the error by default (leaving the full log available in the right panel), or to disable the whole console output parsing as a whole.
I have not been able to locate a setting for either of this. Does anyone know if that's possible?
We are working to fix that. Please vote and follow https://youtrack.jetbrains.com/issue/IDEA-241844

Sikuli click is not effect

I'm using SikulixIDE 1.1.0 to write a script playing Yugioh game (run on Windows 10 x64).
See the main screen:
I start the game manually and then run the script as below:
switchApp("Yu-Gi-Oh! PC")
click("1477213591920.png")
My expectation is that the link named "DUEL MODE" is clicked to go to the next screen. The cursor always moves to that link, but sometimes it works, sometimes does not.
I check the log and see that Sikuli has sent click command but for some reason, the game not accept it. This is the log:
[log] App.focus: [8020:Yu-Gi-Oh!]
[log] CLICK on L(687,488)#S(0)[0,0 1366x768]
I've already tried:
doubleClick instead of click
sleep a few seconds
hover and click
But all do not work, neither.
I would expect that some of the things you have tried will help but if that's not the case you will need to identify whether the button was actually triggered or not. To do that you have to capture the next screen or any part of it that uniquely identifies it. Then you will use it a loop with a predefined number of attempts and some wait time between them and click more than once if the click didn't work. So generally something like that (pseudo code):
attempts = 3
for attempt in attempts:
click(button)
if (nextScreen is available):
break
sleep(time)
I know it's been a while but I ran into a similar problem recently.
The image was found but the click didn't work.
I'm also working on Windows 10 x86_64.
The solution was simply to execute the program as administrator.
Don't know why but now it's working..
I also had to use the double click instead of simple click for some patterns.
In adition to Eugene S Answers, if you are using SikuliX, you can try to Run in Slow Motion. Also, if the image have some effects (like brightness), you can try to use Pattern inside of exists():
if exists(Pattern("DualMode.png").similar(0.6), time_in_seconds):
click(Pattern("DualMode.png").similar(0.6))
By default, the similar() value is 0.8, so if the image have some effect and for example, the color change every second, you can set a lower value between 0 and 1.
PS: Don't forget to put the pattern inside if exists and click, because if you don't put inside of click(), could throw an Image not found error message.

Stop execution in smalltalk

I´d like to know how can I stop execution in smalltalk. I entered an infinite loop and don´t want to loose the code that´s written. I tried using pause button but doesn´t seem to be right.
Normally, even if you are unable to stop execution, you should be able to get the code changes you made back from the .changes file. If you can restart the image, there is a 'recover lost changes' menu entry. Always first make a backup copy of the changes and image files before trying this. (In Pharo/Squeak. Other smalltalk have similar possibilities)
it depends on the dialect and possibly keyboard settings.
try CMD-. or CTRL-., which works in most dialects.

CodedUI prints "pipe" instead of "slash"

I have a problem with using Keyboard.SendKeys in CodedUI tests during entering date. I have simple html page with textbox (input[type='text']) and I'm trying to enter date in format (M/dd/yyyy) into it by following command (I am using VB.NET):
Mouse.Click(htmledit)
Keyboard.SendKeys("^A") ' Sending keys to select all and delete hence clear content of the textbox
Keyboard.SendKeys("{DEL}")
Keyboard.SendKeys("10/10/2014")
In my machine, it works just quick and perfect.
But, today's morning I tried to run test on the another machine and I noticed that it types pipe (vertical bar) instead of each slash! So, what I got is: 10|10|2014..
I was very surprised and tried another symbols and they work just as fine as on the my machine.
By googling this problem I have nothing. Does anyone know how to fix it? And I am very curious why it happens? Keyboard.SendKeys depends on what?
Thank you.

rails console pry/irb "stuck" after displaying long value/string

I am developing with rails on a mac using the rails console via pry/irb.
When I display a long result in the console ie. Model.all or .really_long_string, I cant seem to get past the string or value that is displayed and the console displays "(END)" at the end of the console.
What command do I use to get past this so I can continue entering ruby statements on the console without having to close the terminal window?
I recently discovered Ctrl Z to close the console, but I assume there is a better way
Looks likes the END is made by a pager. Have u tried typing "q"?