Difference between Text and ChangeableText - andengine

What is the difference between Text and ChangeableText in andengine. Since there is no andengine manual i couldnt find the information anywhere

If you a referring to the examples there is no difference, both the TextExample and ChangeableTextExample both derive from the Class Text.
All the ChangeableTextExample is showing is how to change the contents contained with your string.

Related

Most efficient way to change the value of a specific tag in a DICOM file using GDCM

I have a need to go through a set of DICOM files and modify certain tags to be current with the data maintained in the database of an external system. I am looking to use GDCM. I am new to GDCM. A search through stack overflow posts demonstrates that the anonymizer class can be used to change tag values.
Generating a simple CT DICOM image using GDCM
My question is if this is the best use of the GDCM API or if there is a better approach for changing the values of individual tags such as patient name or accession number. I am unfamiliar with all of the API options but have a link to the API documentation. It looks like the DataElement SetValue member could be used, but it doesn't appear that there is a valid constructor for doing this in the Value class. Any assistance would appreciated. This is my current approach:
Anonymizer anon = new Anonymizer();
anon.SetFile(myFile);
anon.Replace(new Tag(0x0010, 0x0010), "BUGS^BUNNY");
Quite late, but maybe it would be still useful. You have not mention if you write in C++ or C#, but I assume the latter, as you do not use pointers. Generally, your approach is correct (unless you use System.IO.File instead of gdcm.File). The value (second parameter of Replace function) has to be a plain string so no special constructor is needed. You should probably start with doxygen documentation of gdcm, and there is especially one complete example. It is in C++, but there should be no problems with translation.
There are two different ways to pad dicom tags:
Anonymizer
gdcm::Anonymizer anon;
anon.SetFile(file);
anon.Replace(gdcm::Tag(0x0002, 0x0013), "Implementation Version Name");
//Implementation Version Name
DatsElement
gdcm::Attribute<0x0018, 0x0088> ss;
ss.SetValue(10.0);
ds.Insert(ss.GetAsDataElement());

Added custom styles(style_formats) to tinyMCE. Classes are appended and not replaced as intended

Followed several tutorials and have added custom classes in the formats section of the tinyMCE. The classes used are being appended and not replaced as I had intended. Is there a way to have them overwrite the existing style if there is one instead of adding to the class tag?
My use case is this: The user select a piece of text and select a class from the formats dropdown I have added. They dont like the color of the link and decide to change it by going back up to the formats tab and selecting a different value. Behind the scenes, TinyMCe replaces the class. I realize I could use the styles key in the json array, but that would produce inline-styles, which I'd like to avoid.
Thanks!
Maybe use exact: true for your style?
https://www.tiny.cloud/docs/configure/content-formatting/#exact
fixed the issue by using inline css rather than using the classes

Custom classes data tooltips in Matlab editor

Does any one would know a way of overriding the data tooltip that is shown when hovering over a variable when we are in the Matlab editor ? I have a custom class that is relatively simple and its content could be shown easily in the tool tip, but Matlab insists on saying it is a 1x1 CustomClass, which is nice and all, but it would be more useful if we could make it to show the content of the object in a nice way. Right now, I have to type the name of the variable in the cmd window e.g. when debugging instead of a short hover on the variable name. Nitpicky, but I'd find it interesting ^^
I've tried to dig a bit using undocumented leads on data tooltips, e.g. http://undocumentedmatlab.com/blog/accessing-the-matlab-editor/
http://undocumentedmatlab.com/blog/spicing-up-matlab-uicontrol-tooltips/
But I don't have the final answer, anyone has any ideas ?
The tooltip seems to get its string by using the disp method. Override disp on your class. In the method body, construct your desired string however you want and then call disp on it. In R2012a at least this works for the debugger tooltip.
Note that you'll need to do a clear classes after editing the class to get MATLAB to recognize the overridden disp.

ZXingWidget header search path

Have imported the ZXingWidget project and it seems to be working as expected (after quite a bit of trail and error). What it can do now is to be activated, display a white framed view finder, scan a QRCode and return the result.
What I wish to add is to have ZXingWidget to turn the white view finder frame red when the scan result does not match any predefined strings.
My strategy is to update a global flag in my own project for the string matching result and have ZXingWidget read it.
My problem is, ZXingWidget cannot find the header file (where the global flag variable is declared) despite having set its header search path.
My feeling is, it is either because the search path is wrong or the strategy is flawed. Please advise.
Well, it kinda sounds like a hack, so if you're not concerned about cleanliness, just extern it in the widget rather than bothering it to include a header.
At the point of defintion:
bool my_red_flag;
In the hacked widget:
extern bool my_red_flag.
The "proper" way to do it would be add an API for the widget, but that might not be worth the effort to you. (Polling that variable somehow would seem to be required: the widget draws the frame directly and won't generally redraw it unless given a reason.)

Highlight some text in a Jasper Reports viewer

I want to highlight some parts of the reports i'm generating for display.
I don't want to change the report definition. I want to highlight the output at runtime.
But the JRViewer i'm using doesn't really have much of an API.
And manipulating the JasperPrint object with setForecolor/setBackcolor before displaying it, didn't seem to change the output.
Any ideas? Or do i have to overload/reimplement the viewer? Wouldn't be much of a problem since it's open source, but i'd like to prevent reinventing the wheel.
Looks like i have to answer my questions myself... again.
I overloaded the JRViewer class (actually copied the code of JRViewer because none of the interesting panels were accessible) and added some highlighting methods to do the following:
Template based JasperPrint data uses - like the name suggests - templates. Meaning the text objects don't have a style of their own, they use their template's style.
That is the reason why setForecolor didn't do anything - the JRTemplatePrintElement implementation is plain empty.
But if i would set the highlight on the text template i would end up with a full column of highlighted texts, since they share the template instance.
Instead i create a new template as a copy of the original with highlighting and use that in the highlighted print elements. Btw, those jasper elements could really use a clone() method.
Feels like a hack, but i don't see a better way.
UPDATE:
However this has a nasty sideeffect for file based (virtualized) reports.
These apparently save any changes you make to the elements while you walk the pages.
If however the viewer in the meantime causes the virtualizer to discard the elements you reference (for example by flipping pages), your further changes won't be saved...
So that made me reconsider and now i'm just drawing my highlighting on top of the Graphics object painted by Jasper's PageRenderer.
Much simpler and cleaner. Only highlighting the background won't work this way.