What's outdated in this JavaCC project? - javacc

I have tried a simple JavaCC example project here.
However I get quite a few errors, I'm guessing that a few things have changed in 4 years. But I don't see any difference in a newly generated example file (just a MyVisitor class extending DepthFirstVoidVisitor but I've tried to include that aswell). Maybe a too big thing to ask, but can anyone help fixing this?

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! :)

is there any complete minecraft forge documentation anywhere?

While it doesn't appear that this is a duplicate based on my searches, I'm sure other people have complained about this in many places.
I play minecraft and know java pretty well, so I thought it would be interesting to make mods with the minecraft forge. However, most tutorials are outdated or incomplete and I can't find a complete documentation. Now, if someone says, for instance, that existing blocks can be accessed through the Blocks class, I don't know what package that class is in. My more specific question was about modifying the properties of TNT(I wanted to do this as a test mod). Based on what I've been able to scrounge from various forums, using reflection on existing blocks in the game is possible, and what I found surrounding food would suggest there is a class for TNT somewhere that can be modified to boost its power. Just so someone can explain the not-well-explained principles of forge mod making, where would I find this TNT-related class that I could use reflection on, and how would I go about doing that(I've never done stuff with reflection before)?
To be clear, I've gotten forge minecraft all set up, I don't need an explanation of that. Just how to modify the properties of TNT(and hopefully this explanation will help me understand some broader principles)
I've been using https://nekoyue.github.io/ForgeJavaDocs-NG/ for a while. It has 1.12.2, 1.13.2, 1.14.4, 1.15.2, 1.16.5 and 1.17.1
I've been looking for a complete documentation/tutorial too, and I haven't fount a lot of stuff to be clear, but I found a wiki that might be useful. Here it is if you want to check it out:
Mcjty's wiki: https://wiki.mcjty.eu/modding/index.php?title=Main_Page
Forge's official documentation can be found here, versions:
1.15.x
1.16.x
1.17.x

Control over OpenAPI 3.0 package generation for jersey-jaxrs

I'm using openapi-generator for jersey-jaxrs (OpenAPI 3.0). I'd like to control the package where my code is being generated.
I'm setting the api-package, model-package, package-name, and invoker-package options, all to a xxx.yyy.zzz value.
My problem is that most of the code is generated under gen.xxx.yyy.zzz, and it's not discoverable by the part of the code generated under xxx.yyy.zzz. Implicitly, gen is prepended to the package name. I understand this is convenient in many cases, but not mine. Is there any generator option to avoid this?
I've learned a bit about the Mustache templates and they seem like a possible solution, but maybe a bit too much for my requirements.
Ultimately, I can move the code in gen to the other (non-gen) package manually, and it works, but this is quite inconvenient.
Finally, I found out that you can mark folders in IntelliJ IDEA as "generated sources root", which makes it discoverable to the rest of the project's code.
This doesn't solve my question, but it does solve the problem that originated the question.

Rewrite the Next.js example with-react-intl in Typescript

I'm trying to rewrite the Next.js official example with-react-intl in Typescript , but I'm having trouble with the HOC component PageWithIntl.js
My code is here https://github.com/soulmachine/with-react-intl.
Any ideas? Thanks!
Any pull requests is welcome.
I was trying the same thing by going through the Basics but got stuck on the "Fetching Data for Pages". There are too many typings missing for TS development.
I created some interfaces for page and component properties and I see that you have too. And the types under #types/next seem to be very lacking/incomplete.
Perhaps its time to write a comprehensive d.ts for next.js/ts?
I am game.
edit: just saw that your typeRoots point to src/#types instead of #types. Maybe nothing but still.
Now my code totally works, with only two minor flaws:
Line 50 of PageWithIntl.tsx, IntlProvider doesn't have the initialNow prop
Line 47 of PageWithIntl.tsx, Rest types may only be created from object types

Tool to merge 3 CSS files

Merging huge CSS files is huge pain,
Hi i found some question asked on the same line. I tried some of the tools but they end up merging line by line rather than on the basis or CSS rules.
Now i thought i should right one good program to do following,
1. read CSS file convert in XML
2. sort it on the basis of CSS rule
Now write one more program to consume 3 XML files find different classes and merge the files nicely based on CSS rules.
How ever that turned out to be good amount of work and i hope there must be someone who must have faced this problem before me and solved it clean way.
Please add your thoughts and suggestions, I would love to know the tool for this however i would also love to know how to design/code for this kind of tool? Am i thinking on right track ?
Thanks All,
There is a free tool called CSS Merge. Have you tried it?
Since order is important in CSS, it is difficult to merge files more sensibly than simply concatenating them. Certainly, this can't be done in the general case. In a specific case you might be able to produce a tool that can do it.

Resources