creating createM3FromEclipseProject in Rascal creates no data - rascal

I'm new to Rascal and have a very very basic question.
I'm using in a little test project the follwing command :
createM3FromEclipseProject(|project://example-project|);
and uses the code to extract data from a project
It only gives my {}... I assume that means that my M3 model is empty.
What am I doing wrong? It has to be something really basic..
Greets
Doerak

Have you followed the recipe in http://tutor.rascal-mpl.org/Recipes/Recipes.html#/Recipes/Metrics/MeasuringJava/MeasuringJava.html ?
If no: then please do because that example code is tested.
If yes, then it means there is no data in your project. This can be caused by:
there really is no code in your project. This can be remedied :-)
or the source path of the example project (with the Java code) is not configured to point to the place where you have your Java code. This can be fixed in the properties pane (right-click on the project and its the bottom option). From there on, find help on managing Eclipse projects on stackoverflow.com.

Related

Error when I bind an Objective-C Package

I want to bind an Objective-C Package in my Xamarin project. I follow the step from
here.
However,the content seems incomplete.And I want to know what to do next.Any advice will help me.
Have you get two file(xxx_ApiDefinitions.cs and xxx_StructsAndEnums.cs )? Copy the code from two files to binding project.
That's not enough. The compiler will prompt a large number of errors . Such as
You have to do something. For example, use the ulong/long instead of nuint ,and annotate the code such as [Verify(MethodToProperty)] .In addition,there are some differences between iOS and Xamarin.iOS in name of Object.For example ,NSURL in OC and NSUrl in C#.You need to manually modify it.

Proc_common_v_3 not found

I am starting out getting more hands-on with FPGAs and have chosen Xilinx.
In a small trial project I have the problem that XST complains about the library proc_common_v_3 is not found. The ise prj file contains paths looking like "../../.." and so on and it gets recreated when trying to change the paths.
When looking in the project list and not the file, the library is referenced using "........", which is different.
Is there another way to make sure ISE handles libraries correct?
ISE Version 14.7
Error message when doing XST->Check Syntax
Xst:2927 - .... line 1: Source file ../../../../../../../../../../../../../Xilinx/14.7/ISE_DS/EDK/hw/XilinxProcessorIPLib/pcores/proc_common_v3_00_a/hdl/vhdl/proc_common_pkg.vhd does not exist
NB: Yes I know there is a thread on this issue, but my comment gets deleted. The answer there is using what seems to be known working paths, but as starting out that is not possible. Better to go for Altera perhaps.
Thanks in advance.
-Michael

Missing opencv_core248d.dll

I'm trying to install OpenCV 2.4.8. Turns out this is far more complicated as expected. The tutorials are all outdated. Here is my current problem:
I'm running on a 64 bit machine, and am trying just a simple sample code:
#include <opencv\cv.h>
#include <opencv\highgui.h>
using namespace cv;
int main() {
Mat image;
VideoCapture cap;
cap.open(0);
namedWindow("window",1);
while(true) {
cap >> image;
imshow("window", image);
waitKey(33);
}
return 0;
}
When I run this, I get an error stating that opencv_core248d.dll is missing. Checking the bin directory, it's there. How do I fix this?
Regards
Edit: I've been on this issue for the past 3 hours. Whoever can help me solve this issue will get so much rep and love from me...seriously I'm getting desperate
Edit2: Picture of some settings:
OPENCV_BUILD = C:\OpenCV\build\
You are running into OpenCV dll issues, similar to here. Three ways to fix dll-related issues about OpenCV, also works for other dll related issues.
copy the required dlls into the same folder with your application. This is a little better because it kind of prepares you for when you'll need to deploy your application on systems that don't have OpenCV installed (for then don't forget to build the release version of your application).
add the dll path to Debugging Environment: Project –> Properties –> Configuration Properties –> Debugging –> Environment –> add dlls' paths here. The syntax is NAME=VALUE and macros can be used (for example, $(OutDir)).
For example, to prepend C:\Windows\Temp to the PATH: PATH=C:\WINDOWS\Temp;%PATH%
Similarly, to append $(SolutionDir)\DLLS to the PATH: PATH=%PATH%;$(SolutionDir)\DLLS
add the dll path to Environment Variables (be careful that the path in there are separated by ;)
EDIT: Among the three methods, the first two will only work for this project (local) and the last one works for all projects in your PC (global).
Have you tried adding C:\OpenCV2.0\bin to your PATH variables? Yup, installing OpenCV can be a chore :/
Have you done the proper project setup, like adding source library, source directories etc? Anyway, if my guess if right, the following will resolve that particular error:
Go to your project properties, Linker -> Input -> Additional Dependencies, add opencv_core248d.dll in and compile. If a new error appears, means you have yet to do the proper configurations.
EDIT: to comments
Here, the include directories and library directories. Did you add the relevant build/include & \lib into to the include and library directory respectively? This are some of the "configuration" that need to be done.
EDIT2: TO answer your edit
Yup, looks like you did do the configurations. Was confused by your comments.
1) I am not really sure if $(OPENCV_BUILD) will work. Maybe you would like to try C:\OpenCV2.4\lib, (link directly) etc instead of that.
2)Go to your linker input and edit the additional dependencies to this (image from one of the books I have):
Hope it works. And don't worry. I know how you feel. I was stuck at installing OpenCV for almost a week, and only one guy's youtube video saved me. I needed to edit some header files. But it's a different problem from yours. Good luck and hope my method work.
EDIT3: Hopefully this solve your problem, try these.
1) If you are using the "band-aid" method, which means having to copy paste the dll files every time, my suspicion would be that your PATH variables is wrong. Just double check it.
the equivalent for yours would be something like(the path of where you copied the dll files from/the path of the library directories you added inside the property page. But instead of lib at the end, you use the bin folder):
C:\OpenCV2.3\build\x86\vc10\bin
More details on this : Setting window path
If you have done this, just check that you have separated them with a semi-colon.
2) Not sure if this is really the solution for missing .dll file, if I remember correctly, it's more for linking errors. But give it a shot if step 1 doesn't work, or if step one works and you face another error. At the most, you can just undo it.
For each header files, for instance the core.hpp file, add the following lines:
#pragma comment(lib,"opencv_core248.lib")
#pragma comment(lib,"opencv_core248d.lib")
This need to be done for all the header files you use. Where to place it? I place mine here:
This goes the same for highgui.hpp, etc, but you change the name, so #pragma comment(lib,"opencv_core248.lib") becomes #pragma comment(lib,"opencv_highgui248.lib", etc...
Hope all goes well. I think if the path variable, but if not and 2nd method doesn't work, I have no clues anymore.

"Groovy:unable to resolve class ..." (import error in LoginController.groovy)

I am trying to use the ":spring-security-core:2.0-RC2" (using Grails version 2.3.1), but have my own LoginController.groovy. Following Burt's notes (here and here), I copied the LoginController.groovy from the original location at "myapp\target\work\plugins\spring-security-core-2.0-RC2\grails-app\controllers\grails\plugin\springsecurity" to my project location at "myapp\grails-app\controllers\com\company". Now I get a bunch of import error messages like "Groovy:unable to resolve class ..." (I have attached am image below showing all the imports giving errors). How do I take care of these errors?
Sorry if this is a trivial question (still getting used to Grails), and thank you for the help!
It looks like GGTS/STS isn't entirely aware that the plugin is installed, since those classes are from the two jars that the plugin depends on. Try right-clicking the project node in the tree and running Grails Tools > Refresh Dependencies. If that's not enough, run Project | Clean to force a full recompile.

Binding project for UltraliteJNI12.jar - "already defines a member" error

We need to use a Sybase Ultralite database in our Mono for Android app (it's a port of an existing application, synchronising with a Sybase server database).
I'm not aware of an existing Mono binding, so I'm setting off on the task of creating a binding library using the new project type in 4.2.
So... I've added UltraliteJNI12.jar, set its build action to InputJar, and clicked 'build'.
I get an error:
Com.Ianywhere.Ultralitejni12.Implementation.JniDbMgr' already defines a member called 'Release' with the same parameter types
and yes, when I look at the generated source, there are two identical Release members declared.
Is there a way of working round this? I've read the tutorial and can't see anything there which points to a solution.
Thanks, and apologies for what may be a stupid question - I'm just starting out on this!
James
The answer - as supplied by Jonathan Pryor on the Mono for Android list - was to rename one of the instances of release, by adding the following to metadata.xml:
<attr
path="/api/package[#name='com.ianywhere.ultralitejni12.implementation']/class [#name='JniDbMgr']/method[#name='release']"
name="managedName">Release2
</attr>

Resources