Pywinauto Sendkeys function - sendkeys

I seem to recall that using SendKeys, you once could use the construct +(abc) to send ABC. However, recently, that sends Abc. Am I missing something?
By the bye, the old documentation (before ReadTheDocs) was better and more complete. Do you have a link to it?

I've just checked pywinauto==0.6.5 (newest) and pywinauto==0.5.4 (early 2016). There is no difference in SendKeys behavior: always typing Abc. I'm pretty sure old 0.4.0 works the same way.
The docs can be easily compared by Contents:
0.6.5 docs ("Getting Started Guide" was added, keyboard page was also updated).
0.5.4 docs with very minimal SendKeysCtypes page.
But if you want applying modifiers to the group of keys, this can be filed as an issue on GitHub. This request makes sense definitely.

Related

IntelliJ/PhpStorm - How to use IDE scripting engine as a GitHub Copilot completion capture/fix?

I've been trying to find any type of documentation or examples on how to use the "IDE scripting engine" (or other quick methods of enhancing PhpStorm/IntelliJ IDEs) and found literally nothing that works.
I'm hoping for a bit of a guideline, maybe a snippet that leads in the right direction.
What I want to do:
When pressing Ctrl + Tab (shortcut for GitHub Copilot completion) I want my custom-script to wait for the completion to be inserted into the IDE code.
I want to immediately remove the code again and display it as a completion suggestion (should be quick).
Now I want to press a shortcut to accept the completion word by word until finished.
The possibly biggest problem of Copilot with countless of bug/feedback/feature reports since 2021 is that it inputs tons of code when people just want a tiny part. Like half a line. So users of it are forced to accept 12 lines of bad code, remove all the bad parts.
The reason probably is their marketing, they take those 12 lines (11 of them garbage) as efficiency improvement (12 lines of code accepted). So they don't fix it.
I want to fix it using the above method, the easiest approach would be the most welcome one.
Here is the only available data on the IDE Scripting console:
https://www.jetbrains.com/help/idea/ide-scripting-console.html
However, none of the examples even worked and there are barely any.
Here are the linked examples:
https://gist.github.com/gregsh/b7ef2e4ebbc4c4c11ee9#file-samples-groovy
Nothing of that worked either, various errors usually already in the first "imports" and no examples in "javascript"
Here is the finished code, I switched to Kotlin and from the dysfunctional scripting console to "LivePlugin".
https://github.com/cmp-nct/Stewardess
Stewardess takes over the completions through a new shortcut and plays them in word by word.
Also shows the Copilot internal status as temporary hint notification when it changes.

What is the meaning of 'cimode' in react-i18next and why isn't it properly documented?

I started using react-i18next a few days ago and I am very satisfied with it. However, I've been seeing this 'cimode' language here and there, in some posts and while debugging, but have no clue what it means. I've searched all over, I believe, and can't find any documentation on it.
In my particular case, I am generating some boilerplate code in a new website and created a demo page to show how to use localization in the website. I am generating toggle language buttons from the languages I set on the whitelist and, to my surprise, I have a 'cimode' button. I know I can filter it out and I will, but I would like to know what it should be used for and maybe to see better documentation for it in https://react.i18next.com/.
From my understanding, CIMODE is used for testing to consistently return the translation key instead of the variant value.
It seems rather hidden on the FAQ.

How do I emulate WebGL stuff with OESMesa on AWS Lambda?

I would like to take a screenshot of a web site using WebGL. I don't have to use GPU to open that site. Using emulation is enough for me.
At the beginning, I already tried headless-chrome to do this. That can take screenshot of ordinal web sites. But, It not works for WebGL canvases.
I think one of possibility is using OSMesa or something to emulate OpenGL.
I have used all of my strategy for overcoming this. Is this actually possible to do?
If yes, please tell me how to do that. If no, I would like to know why.
Thanks.
Yes it is possible!
You need the right combination of:
headless-chromium binary
libosmesa.os binary (in same directory)
launch chrome headless with the right flags, such as (see link for full details): ['--use-gl=osmesa', '--enable-webgl', '--ignore-gpu-blacklist', '--homedir=/tmp', '--single-process', '--data-path=/tmp/data-path', '--disk-cache-dir=/tmp/cache-dir']
This thread on the serverless-chrome github project discusses the issue and provides some binaries which I have used to capture screenshots of WebGL content on AWS Lambda using Page.captureScreenshot().
https://github.com/adieuadieu/serverless-chrome/issues/108#issuecomment-416494572
(See comment by #apalchys on 28th August)
This particular example uses SwiftShader which seems to be the preferred option going forward.
Note, however, that I was unable to create PDFs using Page.printToPDF() using this version - WebGL content just appears blank/white. However, I was able to also get Page.printToPDF() using an earlier version which uses osmesa, see https://github.com/adieuadieu/serverless-chrome/issues/108#issuecomment-371199530

How do I just SAVE a jsFiddle and not get a new version

In the documentation:
Buttons Save or Fork are always present in the UI. First one appears if no fiddle was loaded, the latter is used to create a new fiddle from the existing one.
I ONLY see SAVE when the fiddle is brand new, then RUN/update/fork. In Fx4 and Safari 5 on MAC (and Fx 4 on pc)
UPDATE: New BASE functionality does exactly what I wanted.
From the SO FAQ
Stack Overflow is for professional and
enthusiast programmers, people who
write code because they love it. We
feel the best Stack Overflow questions
have a bit of source code in them, but
if your question generally covers …
a specific programming problem
a software algorithm
software tools commonly used by programmers
matters that are unique to the programming profession
… then you’re in the right place to ask your question!
When you log into JsFiddle, you'll get a Set as Base button, which will make the revision you're working on the base version - think of it as an alias for john/7hd62/12/ -> john/7hd62/.
I ran into an issue where set as base would not save my work. The solution was to:
make a change.
Update to get a new version.
Set as Base.
Hope that helps
I always use Update to save and create a new revision.
I haven't seen the button Save... maybe it is so that we can't Save to a version, but always need to Update to a new version, so everybody can look at the same code at a certain version.
Have a look on Issue #225 in JSFiddle GitHub Repository - URL for the latest version of a fiddle such as /xxxxx/latest/:
#zalun: Please read http://doc.jsfiddle.net/basic/introduction.html#setting-base-version
Sharing a latest fiddle is not always what you wanted. Because anyone is able to save "latest" fiddle, someone would be able to change it to the content you wouldn't like to share. With setting a base version you are the person who chooses which version is shared under default "no version" URL.

Where can I browse the sourcecode for libc online (like doxygen)

Sometimes I want to look up the implementations of functions in the stdlib, I've downloaded the sourcecode, but it's quite messy.
Just greping is not really suitable because of the many hits.
Does anyone know a webpage doxygen style that has the documentation.
The same goes for the linux kernel.
Thanks
You should check if your distribution is using the vanilla GLIBC or the EGLIBC fork (Debian and Ubuntu have switched to EGLIBC EDIT: they switched back around 2014).
Anyway, the repository browser for GLIBC is at http://sourceware.org/git/?p=glibc.git
http://code.woboq.org/userspace/glibc/, posted by #guruz below, is a good alternative.
The source is a bit complicated by the presence of multiple versions of the same files.
How about this for libc documentation? And perhaps this for the kernel? There is also Google Code search; here is an example search.
More on Google Code Search You can enter search queries like this: package:linux-2.6 malloc for any references to malloc in the linux-2.6 kernel.
Edit: Google Code search is now shut down. But you can access the git repo at http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git and it has search as well.
You can try http://code.woboq.org/userspace/glibc/
It has nice navigation/hilighting similar to an IDE.
To help navigate the source to glibc, perhaps try something like ctags or cscope?
Note: I get dumber every time I look at the glibc source, so please be careful! :)
If you are using GNU C (glibc), the functions (beyond the GNU extensions) follow the POSIX standard as far as their arguments, implementation, failure and return values. If you want to peek under the hood of static members, you'll have to look at the code.
Every push (that I can remember) to try and adopt something like Doxygen for glibc was rejected for the following reasons:
Redundant, POSIX already documents almost everything thats exposed, as well as man and info pages.
Too much work initially
More work for maintainers
As far as the kernel goes, Linux does use a system very similar to Doxygen called Kerneldoc.
You can also get actual Doxygen-generated docs from http://fossies.org/dox/glibc.