GWT- SDK upgrade issue - java

I recently came across a bug with an unresolved issue in SDK 2.2 and, as its fixed in 2.5, decided to explore a switch.
Now I am new to GWT and I have no idea of the effects of doing such a switch, but figured it couldn't hurt to mess around locally. I went ahead and successfully updated to 2.5 locally to test and can run with no errors. However many of the text boxes have changed appearance and my navigation bar disappeared, etc...
Is this type of behavior normal after an update? If so I cant imagine why anyone would be in a hurry to do so, as spending enormous amounts of time to modify all pages is pretty unrealistic. Is there maybe some type of quick fix or an error i may have made to cause this?

If you want to put a lot of resources into a GWT project it is always a good idea to check regularly how the project is going on. On the release-note page you can check what's new and what has been deprecated. This way you can make an informed and rational decision whenever you want to update. This is very important since going from an old version (say 1.0) to a new one (i.e 2.5.1) might give some headaches to the programmers. Spendind half-an-hour checking what's going on every month will make your life easier.
GWT has an issue tracker where you can see the open issues and what has been resolved. Many issues have never been fixed, but I read the GWT team intend to solve the 100 most important issues for the next release. GWT is now open-source and you can contribute to its development whenever you know of to fix one of those issues.
Last but not least: many people say a lot of things, which are not always correct (including on Stack Overflow). Always dubble check before making important decisions.
Giving this advice is all I can do for you so far...
Yet, if you give me some info about that bug you expected to be fixed and the exact name of that "navigation bar" widget you might find out information on the sites above to check their status. But I can't search that for you if I don't know what the bug was and the name of the widget that is broken. Also, when you say "many of the textboxes" I understand it's not every textbox that's broken but some variant your are using in some particular places. More information would also be needed...

Related

LWJGL GLFW hangs on native glfwInit call

I originally posted this question on GameDev stackexchange however I'll also ask the question here to try and get more outreach, especially since I wasn't sure my problem was specific to game development since it's a problem with a Java native call.
For the past months I've been working on creating my own game engine for personal use in LWJGL using pieces here and there, especially from developer ThinMatrix's rightfully credited code, to learn as much as I can while building it. Only recently there has been strange behavior happening when I launch the engine from IntelliJ for testing:
After about 6-10 individual times I click run, all subsequent runs suddenly take about 60 seconds for the window to appear.
Whenever I restart my PC this hanging resets and I have another 6-10 runs before it hangs everytime again.
I located the issue to glfwInit, more specifically at the call to the native method:
#NativeType("int")
public static boolean glfwInit() {
long __functionAddress = Functions.Init;
return invokeI(__functionAddress) != 0; // Right here
}
I also noticed that this issue only started when I attempted to implement text support in my engine using the STBTrueType library. It was perfectly fine before that. I tried removing the TrueType code but it didn't fix it.
Here's a list of things I've tried:
Clearing my temp folder in case a buggy or corrupted file was present.
Recompiling and rebuilding the entire LWJGL jars twice.
Building glfw.dll from the GLFW sources and replacing the glfw.dll in the native jars with the former.
Reinstalling Java and actually upgrading JDK versions (from 13.0.2 to 14.0.2)
Switching IDEs even if I suspected it wouldn't work.
Updating my NVIDIA drivers, and reinstalling them.
I'm quite confused as to what it could be, and I'd be more than happy to share code, thread dumps, or debug info if you deem it necessary. Here is the Github repository with the latest, "faulty" code (fault in quotes because I'm not too sure the code is the problem.)
Thank you very much for any guidance.
P.S: Please tell me if this is better asked in StackOverflow instead of here.
So I fixed the issue, it turns out it wasn't even related to anything to do with programming, or STBTrueType, or the library itself. The problem was as pointed out in this StackOverflow post, where this hanging behavior was due to a faulty driver or, in my case, my keyboard USB being plugged in the "wrong" USB port. I moved my computer at the same time I started working on text in my engine, hence why I wrongly linked the issue with the TrueType library. If you're having the same issue, look at the aforementioned post or if that doesn't work, look for a peripheral that might cause interference.

Android Studio problem: Unused Java instance variable marked as used

I am using Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338 (linux version). Although this problem might also appear in Intellij Idea which I have not tested. The problem is whenever I name my instance variables by certain names (like place,time,date) they are instantly marked as used right when I declare them! Below is a screenshot of the problem:
Here I just opened the default Hello World project and typed some declarations. I have not touched anything in the project other than this. Imagine how much of a nightmare would be this kind of misinformation for big projects! Can anyone here solve this or suggest any workaround (other than changing names of those variables)? (And also if you feel to downvote then atleast comment first)

Is there any calendar view libs that support English as well as Hebrew(Arabic the same)

I found the most famous lib for calendar view
https://github.com/prolificinteractive/material-calendarview
And really this lib works fine, but if I use it with Hebrew locale(rtl) so Calendar view change language and name of days, but direction of swiping and direction of days are still as English...
it should be vise versa.
Here my view in English
and here in Hebrew android:supportsRtl="false"
and here in Hebrew android:supportsRtl="true" (I don't know why, but except arrows direction nothing were changed
I found this fixing
https://github.com/prolificinteractive/material-calendarview/pull/573
according to this fixing direction of days and mounts swiping should be changed... But in my case, no
What am I doing wrong?
Or maybe someone had this issue, how did you solve it?
Feel free to ask if I forgot about something
I'm not aware of any other calenderview for android that would solve your problem. But I think you can stick to material-calendarview.
As you already mentioned there is a pull request that promises to fix the issue you're facing. This pull request however has not yet been merged into the main branch of the prolificinteractive/material-calendarview repository. That is, the changes are only available in the forked repository (anasanasanas/material-calendarview) until the pull request is merged.
The author of the fix for the RTL issue however provided a release of the material-calendarview containing his fix. You can try to use this in your app to get like early access to the fix. The downside is, that other fixes that have been integrated into the original material-calendarview repository in the meantime, are not available in the forked repository. You can of course fork the repository yourself and merge with upstream master, but given, that the fix is from April this year, I doubt that it is worth the effort as there won't be that much important changes.
Additionally you should/could comment on the pull request and ask for integration. Probably someone simply forgot about it and will integrate in a timely fashion. The changes are not complex, have already been reviewed and the merge conflict is easy to solve. Thus I don't see why this fix should not make it's way into prolificinteractive/material-calendarview.
The fix you found was not merged yet (you can see that it still have the label open).
It happened in May 17.
The latest version in Maven in since Feb 17 (1.4.3).
You can ask the repository owner to merge it for you and create a new version or to download the code and do the changes from the fix by yourself.

If I publish an app to the google play store what stops people from stealing my code?

I ask this question because I couldn't find the answer I was looking for but simply put is there anything in place in the app store to prevent stolen code? I notice that there are a lot of clones on android which made me wonder whether they are directly ripped off or just so easy to replicate that they end up cloned.
Can people just simply download the apk file and reverse engineer it?
Is there anything google has in place that prevents this, or if there isn't, is there anyway that I myself can prevent it or make it more difficult for people wanting to steal my code?
I'm still new to Java and learning so it will be a while before I start this, but the project I have in mind will consume a large chunk of what little spare time that I have for a while, so I don't want to put a lot of time into it without proper measures only to have it stolen and sold for someone else's profit in a week.
If this has been answered before whether on this site or another please point me to there and delete this if necessary.
Well, you can do code obfuscation, so that on de-compiling the code, the logic is not obvious, so hard to maintain.
You can use the free version i.e. ProGuard or much powerful professional version DexGuard.
Here is an example which shows how to configure ProGuard when you are using libraries.
Retrofit+ProGuard.

IntelliJ inspection -- non-thrown exception

This is a follow-up question to 1832203. I'm making it a new question as well, because it seems that posting an answer to a question doesn't change its position on the java page and so I'm worried that it won't get seen. Apologies if I've just stepped on some etiquette toes.
I'm an IntelliJ newbie -- started using it two days ago and I'm absolutely head-over-heels in love! One of the things I adore is the code inspections. However...
In one of my classes I often create exceptions without throwing them. If I can't turn off (or downgrade) the inspection warning for this then I can see I'm going to end up ignoring inspections on at least that file (if not the entire project), which would be a real pity.
I've done a search in the inspection settings for "exception", and found nothing that relates exactly, so I turned them all off just to see, and it's still doing it (even after a rebuild...BTW when are inspections redone? at save? at rebuild? ???), so I would really like some help on how to make this one into an info/typo level -- which I can then ignore.
Using the free version, if that makes any difference
TIA to all those experienced IntelliJ warriors out there!
Press Alt+Enter to show inspection popup, then press Right Arrow to see available options. You'll see there options to suppress this current instance of warning, for this class or completely turn it off.

Categories