How to stop wireless clicker skipping incremental content on slides - r-markdown

I like creating my presentations in RMarkdown using slidy.
It seems like Slidy needs to see right and left arrows for moving forwards and backwards through the incremental display of a slide.
It also seems that most remote clickers send Page Down and Page Up.
(Looks like I have a Logitech R400.)
For Slidy, these are causing a jump to the next slide, and is skipping the incremental display of the bullets on my slide.
Is there a way to get Slidy to process the Page Up / Down differently? To treat them the same as Right/Left?
Also open to any apps that could intercept the clicker and convert it, but that may be better posted in a different community; hoping for a software fix at it's more likely to be portable when presenting on other machines.

Monkey Patch fix :
I went to self_contained: false in the YAML top-matter, then went to
libs\slidy-2\scripts\slidy.js.
Circa line 2089, found block beginning if (key == 34) // Page Down.
Inside that block, found the line w3c_slidy.next_slide(false);.
Changed that to w3c_slidy.next_slide(!event.shiftKey); (copied from the Right arrow block a little further down) and now I get the behaviour I want.
Suspect it may not be robust. May get trashed when I re-knit the RMarkdown.

Related

How can I improve the usability/readability of Toad

I have installed Toad 12.8 and I had a pretty big mistake in executing code. I executed code out of sequence, despite triple checking my work. Some how the tab I had selected was unselected and another script was ran. I still wince in embarrassment a week later.
I just wanted to know if there are ways to improve usability/readability of Toad. For instance, can I highlight the tab I have selected? Can I review scripts in a viewer to showcase scripts that I have open and manage which have been executed and not?
I have changed the tab style to 'Flat Buttons', which better showcases the script you are viewing among the many you have open, but thats just 1 small change.
Anyone else have options they like to use? Im not seeing a lot of options here under View Options...
I'm on 12.5. Current tab is highlighted (i.e. has a different color than other tabs). You could, though, change the window background color (by default, it is white).
Open "Configure TOAD options" and search for "TAB", you'll find quite a few options in there.
If you want to review what you've executed, navigate to "Query Viewer" tab in the Editor window. Sort results by "Start Time" in descending order and it'll show what you executed, when, how many time was spent on it, how many rows were affected ... quite useful.
As of running code you didn't mean to: well, what can I say? I'm sorry you did that, but - after all - it is you who should pay attention to what you are doing. No highlighting will solve that problem (also know as we have met the enemy, and it is us).
Something I like to do to is to change the color of TEST vs PROD in order to make them stand out. On the session/new connection window, scroll right and you'll see a "color" column. I set PROD connections to Red and TEST to Blue. Give it a try, maybe you'll like it for a visual reminder for the environment you are working in. It will change the status bar background color so it's not that intrusive.

Moving cursor using code and opening folder

This is a very random and maybe a bit strange question that i thought of at 3AM. I was thinking about how code could make my day to day life easier. Every morning I wake up, open chrome to the facebook conversations with my boyfriend, and write "good morning". And thats when i thought about this hypothetical project(just out of curiosity, I wouldn't use it haha): making a code that i can just run that does all of this for me.
I could have a html file that could redirect to the facebook link(https://www.facebook.com/messages/t/boyfriend_name). But how would I go on to make the code open this file, then move the mouse to where its supposed to go (the white area where the user inputs the text) then insert the text then press send?
I'm not asking for any code help as I can imagine that is too much, but my question is: could this be achievable in C++?(This is what we've been studying at school so far). If not, what coding language should I use? Is the idea achievable without a vast knowledge in computer science? If yes, have you got any sources about opening files using C++, moving cursor etc.
Note:The OS this would happen on is Windows 10
To do what you want is possible by using AutoIT and to use it from C++ you can try AutoITX for C++. With AutoIT it's possible to detect windows, move the mouse and insert text, although a web page is like a blackbox to it, so you'll have to rely on relative pixel coordinates (it might not be very robust).

WebStorm opens files on AutoScroll to source

wondering if I could have the same behavior as Brackets like it previews the code on the right side but only opens the file if we do some edits.
Helpful when I'm just going through the files and not really changing anything but then at the end I've to close all.
Is there a setting in web storm that can help achieve the same behavior like brackets
Currently I may only suggest to use View | Quick Definition to preview file content instead of opening (has to be invoked for each file, which is possibly not what you are willing to do).
Other than that: https://youtrack.jetbrains.com/issue/IDEA-130918 -- star/vote/comment to get notified on progress.
P.S.
As stated in this comment they seems to worked on something like that already but quite possibly did not finished it for IDEA v14 release: in build 138.2502 there was an option to open file in "preview panel" first (and if satisfied -- move to editor) instead of opening in editor straight away. But it still a bit different to what Sublime does.

How do I find a pattern on the screen?

I thought I would try out making a bot to play a game on a website for me. How can I read the pixels of the screen? My best idea so far is basically:
Take screenshot
Scan screenshot for other images (bit comparison of one row in image?)
Click somewhere on the screen depending on what image was found.
Loop a few times per second
If this is the best/easiest way to do this: How do I do these things? I know some c++ but I've only worked with CLI programs and text/file IO so far. If you can think of a better way please tell me.
Using something like C# you can take screenshots of the screen and convert the resulting image to a Bitmap to do this, but it seems to me that you'd be better off looking at the HTML page on the wire (lookup a tutorial on how HTTP works or run wireshark to see how the page is transmitted on the wire). This will almost certainly be easier for you.

help with type of window dialog resource needed

I am writing a windows program (no mfc) and need to output a status line to the operator every few seconds or so. I tried using rich text boxes but after so many hours it seems to hang up. Does anybody have an suggestions on what I can use instead?
People mentioned that my buffers might have been exhausted. I thought I had planned for that. After I had about 1000 lines displayed I would take the first 500 and remove them using the select and cut options in rich text boxes. I still ran into the same problem.
This question appears relevant, and this one too. But they don't give any concrete recommendations for an alternative to rich text boxes.
You might try the Scintilla control (scintilla.org) which does not appear to have any hard limitations on text size. It has a permissive license. It is used by many text editors such as Notepad++, Notepad2, Code::Blocks, FlashDevelop. I haven't tried it personally but there from the documentation it looks easy to use it in a Windows API application. Of course, it might be overkill for your purposes.
If you keep appending to the text in the control every few seconds for hours then you are probably running into some memory constraint on the control or the process. I think you would have this problem with any control you choose given update frequence and how long you're running the program.
Have you considered implementing a simple circular buffer for the content of the text box? Say only keep the last hour's messages. You could maintain a separate log file for history if the operator needed to go back in time for hours.
I ended up writing my own control to do this, essentially duplicating the Output window in Visual Studio. It was a success, but it ended up being much more code than I thought it would be when I started - I insisted on features such as auto-scrolling when the cursor was on the last line, select/copy, bold text, etc. It was backed by a std::deque so I could limit the number of lines stored for the window.
Unfortunately the code belongs to a former employer so I can't share it here.