codenameone theme.res of example todo app is huge (200mb) - codenameone

I tried building a small TodoApp with Codenameone in Netbeans (i tried to follow the example from the book and website to try out stuff) - but my theme.res file is over 200mb and my jar is also huge.
I can't really understand why it is so big. I tried to google the problem but i did not find a solution - it is a very small app and i have only one multi-image.
Thanks!
Edit: I deleted the very low and low density as well as 4k, now my jar is quite small. Can I do that automatically?

Related

Improving build time for our create-react-app which is getting big

We are working on an application that uses create-react-app as its initial boilerplate. As the project is getting larger in size, the deployment is getting longer. For now, we are using gitlab runners to deploy it into AWS.
The problem is getting worse and it is now taking around 30minutes to build and deploy. I am seeking any advice on how to improve the performance and speed of the build time.
We have already tried using cache for the npm install part, but was not really successful. I also looked into incremental build but could not find a satisfying solution there.
We also explored the code splitting, but do not think that it affects the build time as it mainly impacts the run-time loading speed.
We are open to any practical solution such as changing bundler, runners, etc. and I am personaly interested in the success stories of those who tackled this problem so that we don't do trial and error.
Thanks in advance for your help.
You can try removing static images from your project, large images can be a problem for your build time and deploy time for server.
If you really need to keep static images in your project, you can try to check and optimize the size of the images using a tool like (https://tinypng.com/). But I really recommend that you using a storage (AWS S3, for example) to store your images.
You can also try to remove big dependencies like, react-icons (or any other like this), Charts (like Charts.js...) can also be a problem for your build time.

Tesseract.js not working as node package to my ReactJS project

Tesseract initializes fine until it needs to load the language files, and it just stops working. See the attached picture for reference on the error..
The npm package(?) installs fine, I also downloaded offline files (worker and wasm files) and made it work as I have seen that it loads them correctly.. Well, at least until it starts loading the language files and breaks my app..
Worker and wasm files are put in the
/public
folder so it can be read by the jsx. I tried not using the offline files, by removing these lines
workerPath: '/External/tesseractjs_data/js/worker.min.js',
corePath: '/External/tesseractjs_data/js/tesseract-core.wasm.js',
but I am still having the same error. All of the solutions I have seen online that is connected to this problem are almost all in java, and one of the solution needs to install some kind of tesseract software, but what I would want to avoid this as I wanted no installations, why I have picked web programming so the installation would be minimal..
I don't think anyone will need this but here is how I fixed my issue:
Seems like my downloader (IDM) was capturing the language files (traineddata.gz) and then sets a key with 0 value in indexed db on the domain / browser.
Clear browser cache, or just delete the key/value pair thingy in the Indexed DB, which can be found on the developer tools / console thingy, at the "Storage" of the browser
Disable downloader or just remove ".gz" on the file types capturing section of the downloader
It should now work

Get running / walking pace in steps per minute using React native

I'm developing an app in which i'll play music which is synced your current walking or running pace. In order to do so i have tried using a pedometer input from expo, however this isn't working too great. Input of the pedometer is delayed and is therefore hard to fix. Is there a "better" way to get pedometer inputs in react native more reliably? Otherwise i could opt for trying to guess a walking / running pace by deeming how fast the user is travelling with google maps or similar.
How would you approach my problem?
I would drop expo. With expo you will be limited in the capabilities of your app, meaning you won't be able to add 3rd party native libraries to your app. These are what you are looking for to get the data you want. A quick google search found this, and I guarantee there are many other similar packages if this doesn't quite fit your needs: https://github.com/mathieudutour/react-native-pedometer
Once you drop expo, a world of possibilities will open up to you, but if you are unable to drop expo ... Not being an expo expert, I'm not sure what can be done to get better data. Depending on what you have made so far, dropping expo may be a difficult experience. Either way, good luck.

gwt sample project rpc call failure

When i try to run gwt sample project it gives "RPC call failure.An error occurred while attempting to contact the server. Please check your network connection and try again". It was running good before but after i update programs and libraries it gives that error. Which update causes this error or there is other things?
Appengine version:1.7.0
GWT version:2.4.0
Eclipse version:4.2(juno)
JDK version:1.7.0_05
This may not be the problem you are facing but it seems to be the most frequent problem.
Let me predict - you last tried GWT four years ago and you hoarded the sample project hoping to pull it out one day.
And yesterday, you did pull it out. It kinda worked and then you decided to upgrade to the latest 2.4.0. (Actually the latest is 2.5.0-rc1).
Ooops. The web-inf/lib of your project is still faithfully using pre-version 2.2 gwt-servlet jar.
Nope, you can't do that. GWT-RPC data transfer format is version-unstable. Not guaranteed to be compatible from one version to the next.
Simple solution - recreate a new GWT project using the new Google plugin.
Then copy the src and web.xml of your project into the new project.
Or replace the gwt-servlet.jar with the latest. And if you usegwt-servlet-deps.jar, you would need to upgrade that too (but I doubt so, because if you did use gwt-servlet.deps.jar you wouldn't be asking this question).
But why would you keep the gwt sample from an old project?
The samples have remained quite the same over the years. Why not use the samples from the new GWT 2.4.0 download. You don't have to keep the samples. You should try to construct the projects for the samples afresh.
The GWT directory is found under Eclipse's plugins directory, under a long name. Like
plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205091048-rel-r37/gwt-2.4.0.
In which you will find the samples directory.

File sharing not working on iPad

I am trying to get file sharing to work on my app in iPad. I've added UIFileSharingEnabled to the plist, I've queried the documents dir and written a file there (and verified it is there by looking at it through Organizer). iTunes just refuses to display the file sharing info in the device's apps tab. Does anyone know of any obscure step I might be missing, or some edge case that might be causing my problem? I've tried all the rebooting, clean building avenues.
Try running a sync of your iPad to iTunes. That did it for me.
Here's what fixed this for me: I built an ad-hoc distribution and installed it on my iPad. I believe once the app was installed/recognized as an actual "app" in itunes (versus something that shows up as a function of building through xcode), it was able to handle recognizing it as being able to share documents.

Resources