What to do if Processing won't find a library? - css-float

No matter what I do, Processing just won't find this library. No matter where I put it or how many renames I do, Processing can't find it and I can't find an alternative anywhere. I basically only need it for the "Descriptive" class. And I know its in the correct spot because I have the library "minim" and Processing can find that. The DL link.
Anyone want to give it a shot and then give a solution (or walkthrough of what/how they did) if they find whats wrong? Or know of another library where this class is at?

The simplest way to load a non-standard library into a Processing sketch is to drag the .jar file onto the Processing editor.
You don't have to install the library in the libraries directory. Just find a file like YourLibrary.jar and drag it directly onto your sketch in the Processing editor.
This will automatically put the library jar file in the correct place, and you'll be able to use the jar in your sketch.
Shameless self-promotion: here is a guide on using libraries in Processing.

It is possible that you are putting the library in the wrong folder, click Preferences in Processing and look for Sketchbook Location (which is where you should copy the downloaded folder in) to make sure you are putting it in the right place. I have checked the download link and the site says you have to copy the entire unzipped folder into your libraries folder (which is located in your sketchbook folder) in order for it to work.
If you have checked what I suggested above and still cannot find a problem, refer to https://github.com/processing/processing/wiki/How-to-Install-a-Contributed-Library which will hopefully help you.

Related

Qt creator deleted files and is unrecoverable

I had a code which Qt deleted it by itself, now I cant recover it even with data recovery programs.
I dont know if qt caches codes anywhere or saves history of them, also i ran it couple of times so there are some code.o and moc_code.cpp but they dont seem any useful.
If you have any idea on how to recover it, please help.
I think, there are a few things that you need to learn.
In general each development environment like Creator or Visual Studio will compile your code in one or more steps into something like an executable.
For Qt, the way roughly looks like this:
.cpp/.hpp -> .moc -> .o -> executable
Files with suffix .moc or .o are generated by moc/gcc/msvc-compiler and whatever you edit inside them, is lost.
So I guess, you edited the moc file and these changes are definitely lost (unless you have a backup tool like TimeMachine which was fast enough to catch your edits before you compiled them away).
I recommend reading a step-by-step example and walk through that w/o deviating from the path that is given there. This should give you a better start.
Qt will generate some code when compiling.
the .ui files will be used to generate xxx_ui.h files.
the .cpp/.h files may be used to generate xxx_moc.cpp files.
The auto generated files are not allowed to be modified.

Is there any way to convert a "bundled" MeteorJs source code to a normal source code?

I have a .tar.gz file of a MeteorJS application. This file was created using this command "meteor build --architecture=os.linux.x86_64 ./". I don't have original source code of this app because the author dev disappeared totally. Now I want to convert the .tar.gz file to a normal MeteorJS source code to add some changes (add third-party packages ...). So is there any way to do this? If not, is there any way to add new third-party packages to the app? Thank you in advance!
I think you probably can reconstruct it.
Looking at one of my projects, under
bundle/programs/server/app/app.js
This file is a concatenation of my source files. You could probably write a script to unpack this into separate files. I don't know if anyone has done it before, but it might be useful to post the tool when you have built it.

Opening a chm file containing merged files in a Qt application

In my Qt application we can open a help file (chm) by doing the following:
QDesktopServices::openUrl(QUrl::fromLocalFile(_PathToTheCHMFile));
This seems to be the suggested way of doing things. And it has worked up until now.
However, the documentation team has now changed how the chm files work. Now we are referencing a "master" file which only contains references to other chm files. The directory structure of the chm files is as follows:
master.chm
SUBDIR/
-> child1.chm
-> child2.chm
...
If open the master.chm file with hh.exe (the default tool in windows), everything looks perfect. However, from my Qt application, the help file opens, but there are no sub topics, just the root node.
I assume this is a search path issue, and it can't resolve the relative paths. There doesn't seem to be any way to configure the openURL call to run from a certain directory, or anything like that.
Thanks in advance
If you need to be able to access those elements properly, then you may need to change your applications current directory on the fly.
http://qt-project.org/doc/qt-4.8/qdir.html#details
http://qt-project.org/doc/qt-4.8/qdir.html#setCurrent
If that doesn't work, you may want to look into using QProcess::startDetached
http://qt-project.org/doc/qt-4.8/qprocess.html#startDetached
and specifying the working directory to be exactly where your master.chm is located.
You may want to specify some command-line arguments, too.
http://www.help-info.de/en/Help_Info_HTMLHelp/hh_command.htm
Hope that helps.

How do I remove a library from the arduino environment?

In the Arduino GUI on windows, if I click on Sketch --> Import Library, at the bottom of the menu there is a section called "Contributed".
Unfortunately, I had misclicked and added a library I did not want to that list.
How can I remove it from that list?
The help page only mentions that "If a sketch no longer needs a library, simply delete its #include statements from the top of your code" but it does not mention how to remove the library from the list of contributed libraries.
Go to your Arduino documents directory; inside you will find a directory named "Libraries". The imported library directory will be there. Just delete it and restart the Arduino app.
Your Arduino library folder should look like this (on Windows):
My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.cpp
My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.h
My Documents\Arduino\libraries\ArduinoParty\examples
....
or like this (on Mac and Linux):
Documents/Arduino/libraries/ArduinoParty/ArduinoParty.cpp
Documents/Arduino/libraries/ArduinoParty/ArduinoParty.h
Documents/Arduino/libraries/ArduinoParty/examples
The only issue with unused libraries is the trivial amount of disk space they use. They aren't loaded automatically so don't take up any application memory of the Arduino IDE.
Quote from official documentation as of August 2013:
User-created libraries as of version 0017 go in a subdirectory of your default sketch directory. For example, on OSX, the new directory would be ~/Documents/Arduino/libraries/. On Windows, it would be My Documents\Arduino\libraries\. To add your own library, create a new directory in the libraries directory with the name of your library. The folder should contain a C or C++ file with your code and a header file with your function and variable declarations. It will then appear in the Sketch | Import Library menu in the Arduino IDE.
To remove a library, stop the Arduino IDE and remove the library directory from the aforementioned location.
The answer is only valid if you have not changed the "Sketchbook Location" field in Preferences. So, first, you need to open the Arduino IDE and go to the menu
"File -> Preferences"
In the dialog, look at the field "Sketchbook Location" and open the corresponding folder.
The "libraries" folder in inside.
I have found that from version 1.8.4 on, the libraries can be found in ~/Arduino/Libraries. Hope this helps anyone else.
I had to look for them in C:\Users\Dell\AppData\Local\Arduino15\
I had to take help from the "date created" and "date modified" attributes to identify which libraries to delete.
But the names still show in the IDE... But it is something I can live with for now.
For others who are looking to remove a built-in library, the route is to get into PackageContents -> Java -> libraries.
BUT : IT MAKES NO SENSE TO ELIMINATE LIBRARIES inside the app, they don't take space, don't have any influence on performance, and if you don't know what you are doing, you can harm the program.
I did it because Arduino told me about libraries to update, showing then a board I don't have, and when saying ok it wanted to install a lot of new dependencies - I just felt forced to something I don't want, so I deinstalled that board.
In Elegoo Super Starter Kit, Part 2, Lesson 2.12, IR Receiver Module, I hit the problem that the lesson's IRremote library has a hard conflict with the built-in Arduino RobotIRremote library. I am using the Win10 IDE App, and it was non-trivial to "move the RobotIRremote" folder like the pre-Win10 instructions said. The built-in Libraries are saved at a path like: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries
You won't be able to see WindowsApps unless you show hidden files, and you can't do anything in that folder structure until you are the owner. Carefully follow these directions to make that happen: https://www.youtube.com/watch?v=PmrOzBDZTzw
After hours of frustration, the process above finally resulted in success for me. Elegoo gets an F+ for modern instructions on this lesson.
as of 1.8.X IDE
C:\Users***\Documents\Arduino\Libraries\
My solution is low-tech but effective so I want to share:
create a folder for disabled libraries next to libraries
move libraries here to disable, swap back in to re-enable

Export a jar file from Eclipse or Command Line

This is my first post ever but I intend to use this more often in the future so please be critical if I do something wrong.
I have done research on the topic and have already attempted everything from using the command line to Eclipse's File>export>jar and choosing the appropriate options.
Basically I have attempted everything suggested in the following two links:
Java: export to an .jar file in eclipse
http://docs.oracle.com/javase/tutorial/deployment/jar/basicsindex.html
The results of my efforts are:
1) a jar file is created
2) when I try to run it the error is "Failed to load Main-Class manifest attribute from test.jar"
I assure you that I have indeed created a "manifest.txt" file in my project that consists of
"Main-Class: Login
"
I even include a newline because I hear that is necessary in some instances.
Does anyone know what I could be missing? Or better yet can anyone please provide an extremely detailed explanation of how to create a jar. This could be either from command line or eclipse.
My current project is setup where I have three java files in my workspace: Login, NewFrame, and NewUser. Login has the main method which will eventually call the other files. These three files are in the default package. The projects name is JavaVersion.
Thanks.
Thank you Antimony for your interest and help. After more tinkering I was able to figure it out for myself. Turns out I was never correctly defining the entry point. For anyone looking to export a jar in Eclipse I would also like to recommend this link.
How do you build a JAR in eclipse with a custom manifest file?

Resources