cairo in gnome extension, nothing show - gnome-shell-extensions

I write simple test cairo code, mainly from office example code. but nothing show in the menu area.
It hard to describe, so put screenshot here. please help.

First of all you should check the logs... In my case I would do something like journalctl -f but your mileage may vary... I would assume that you'll see a lot of something like JS ERROR: TypeError: cr.move_to is not a function stuff...
As far as I believe most of your cairo functions are misspelled, the GJS Bindings have CamelCase names...
It's kinda hard to find out and I had no luck finding any documentation on that but after digging into the GJS Code here (https://gitlab.gnome.org/GNOME/gjs/-/blob/HEAD/modules/cairo-context.cpp) I was able to understand a lot more on how to do cairo stuff like this (https://www.cairographics.org/manual/) from GJS...

Related

How to use syntax highlighting in next js?

I am able to parse the markdwon with the help of remark and remark-html. How can I add syntax highlighting features for the code element?
I've been searched for TWO whole days trying to use remark/rehype ecosystem on syntax highlighting which is way more complex to use. I'm still working on searching, it's better to avoid remark/rehype ecosystem and try another method.
Here I share list of my search, just give you some subjective perspective so that you won't waste you too much time on things that not working. None of them will work as you expected, and their sample code are obscure or just broken codes.
https://github.com/remarkjs/remark-highlight.js
They move to support rehype. Are you a big fan of them wanna move as well?
https://github.com/sergioramos/remark-prism
You will get this error: Module parse failed: Unexpected character '�'
https://github.com/torchlight-api/remark-torchlight
They states on their website: 🚨 This client is still very much a work in progress. Please open issues! 🚨View it on github at github.com/torchlight-api/remark and this link is invalid.
https://github.com/rehypejs/rehype-highlight
It force you to use rehpye althought you can you remark-rehype for you to transfer easily. However, debug your code once you encounter some error will be helpless.
sample code use third-pary v-file to read file showing their code is working but not. and it reads html file not markdown file.
It's hard for you to grasp their concept to use their plugins to easily. It waste most of you valuable time to think what they think.
I give up remark/rehype ecosystem and stay away from them. Good luck! :)

Why my wrapped meteor package isn't working?

I seek a little help to wrap a package for meteor. It has always been my weakness on this framework. I know it is not difficult, I read tutorials and some articles like :
https://www.discovermeteor.com/blog/wrapping-npm-packages/
http://www.meteorpedia.com/read/Packaging_existing_Libraries
However I get lost in export and stuff, and it is time to understand !
I tried to wrap this package :
https://github.com/fians/Waves
(I knew one day I was going to not find the package already made by someone on atmosphere :()
So I wanted to do the thnings right, following guidelines made by dandv. I forked the repo, add the meteor packages with the files : export.js and package.js. Following the example of moment As you can see here :
https://github.com/Voyag3r/Waves
Finally, in my app, I created the local package folder with the meteor command : meteor create --package voyag3r:waves I tried to called the waves variable, bit it is not defined. I tried with and without a capital letter. (like in the source code waves.js). No, I tried with this.Waves instead of just Waves in export.js, neither.
There is something I do not understand with namespace and visibility I think, and errors are not displaying useful information this time. Is there someone to explain to me ? Because I would like to do a lot of other packages !
Thanks !
Glad to see that you read through those documents above, as they're quite helpful. However, I understand that it can be confusing to work through the details. Hopefully, I can assist you.
I recently finished packaging up a couple of libraries for Meteor, so you should take a look at those repositories as examples:
jspdf:core
jspdf:autotable
More specifically, take a look at the jspdf:core repository above and inspect the meteor-pre.js and meteor-post.js files for how to handle exporting variables:
meteor-pre.js
var window = {};
meteor-post.js
jsPDF = window.jsPDF;
Other important files include package.js and package.json, and of course autopublish.json, for integrating version updates with http://autopublish.meteor.com/, a fantastic tool written by Luca Mussi #splendido.
Additionally, I would recommend that you review the Official Meteor integration directly from 3rd party libraries discussion and ask #splendido or #dandv for assistance with reserving the namespace for this library.
This process has gone through rapid change over the last few months, and although not perfect, it's improving steadily. I'm encouraged to see that, like me, you want to assist the Meteor ecosystem.

different versions of the shared library

I have a -lelf option in my makefile, I want to know: how does it choose the version of libelf.so to link (e.g. libelf.so.0 or libelf.so.1)? I do have a libelf.so.1 in my system, as well as a libelf.so which links to libelf.so.1. When I compile the code, everything is fine, however, when I try to run the binary, it reports: "can not find libelf.so.0". Any guide on solving this problem? Thanks in advance.
Ok, finally I understand something. I can specify which version of the .so at compile-time (I can force it to link to libelf.so.1, while it will cause some problem at run-time). It seems the best way is to find the required libelf.so.0 anyhow.

Compile Finite State Machine to UML(-like) Diagram

Every Python developer knows tools like Sphinx. You write some text in a markup language, write make in the shell and let some compilers do their job. In the end you get beautiful HTML or PDF.
I am looking for something like that, just for Finite State Machines, e.g. I put SCXML into a file (with a GUI or manually with VIM as I desire) start a compiler and out comes a picture file format that i can use however I please and that looks good even if I don't know what I am doing. Example:
$ vim my-fsm.scxml
$ scxml2svg my-fsm.scxml
writing file...
finished writing my-fsm.svg
$
The closest I got so far is using various Eclipse plugins (years ago, dislike huge IDEs), draw.io or what I am using now: Umlet. Even Umlet has problems, though. For example it doesn't support the workflow I am used to (write text files, start compiler, see beautiful result). The results are often also suboptimal, because the engine is actually quite simple. But everywhere I look for a more useful alternative (python wiki, other SO questions, tools) I still don't find a simple compiler.
Now I would be really happy if anybody would know such a compiler. If not possible a FOSS GUI editors with PNG/SVG export would also be okay.
GraphViz has a file format which can be written manually and compiled to different picture formats.
I wrote some tools to do this: http://goo.gl/V97ft

Is it possible to get code completion for R in Emacs ESS similar to what is available in Rstudio?

Rstudio has a great code completion feature. It provides a quick view of functions that start with a given string, as well as function and parameter definitions.
ESS is powerful enough, familiar to me, and integrated into Emacs, where I conduct most of my work - so I am hesitant to move, but this feature is making me consider such a move.
Is it possible to integrate this feature into Emacs ESS?
Is there anything similar to this for Emacs ESS?
Any hope that there will be (and if so, how could I support such an effort?)
You do get the completion thanks to the rcompgen package by Deepayan (now "promoted" into base R as part of the utils package). So when I type
lm(
and hit TAB a new buffer opens which gets me the left-hand side of your window above: the available options to the function at hand. I don't think you can show the help directly though.
There is / was also a way to get context-sensitive help in the mini-buffer when typing but I have forgottten how/where that gets turned on.
[EDIT: This is an old answer and auto-complete package dropped out of fashion since then. Please use company-mode instead. It should work by default. Wiki configuration entry is here.]
Recent versions of ESS (> v.12.02) integrate with auto-complete package out of the box (you need not configure anything, just install auto-complete). It provides help on arguments as well as function help. I added detailed instructions to the wiki
Ess-eldoc was also rewritten and from v.12.02 it's active by default, so you don't need to configure anything.
Or maybe we should all use search:
Emacs autocomplete-mode extension for ESS and R
I don't want to be grumpy, I found this few hours ago and I'm still shocked. It works like a charm. Though I still prefer the old-style pop-ups. =)

Resources