Gradient of Unstructured grid filter in paraview - vtk

There used to be a quite useful filter in Paraview called GradinetOfUnstructuredGrid. We could efficiently and effectively calculate the divergence, curl and vorticity of vector field quite easily. For some reasons, they removed this feature in the latest version.
Is there any other way to do the same in ParaView now? Or is there any way to re-install the much better older version?
Edit :
The filter called GradientOfUnstructuredDataset is not similar. For instance, it will not give us Gradient, Curl and Vorticity.
When we apply this filter we get a set of arrays confusingly named from 0- 9, for my uses and purposes this filter is totally useless.
I'm using V 5.8.0

It is still here and called GradientOfUnstructuredDataSet.
Tested in the 5.9.0 RC3 downloaded from the website (where you can also download previous versions)

Sorry for the confusion. The option is still there, just difficult to find.
(1) You can choose the GradientOfUnstructuredDataset filter by going to the filters tool bar.
(2) Then select the vector field of which you want to compute the divergence.
(3) Then click on the Settings icon ( it is right under the properties panel ),
the advanced properties tab will pp open. You can choose to calculate divergence, curl and vorticity from there.

Related

Vaadin 6 : RichTextArea and remove formatting

It's been a while that I've been reported about a problem on the software I'm on charge. I will try to explain it as much detailed as possible (Sorry if my english seems bad to you by the way ^^').
Context : The software has been developed as a Web Application (Java EE) + the framework Vaadin 6 (not 7). Since this project exists for about 4 or 5 years, the technology used isn't the newest but it's currently ok. This software is used by our internal clients so about a 70 users are using it per day. I'm on charge of this project for 9 months now.
Problem : Often, users copy some info (words, tables and so on) from others sources like a Word Document, or a PowerPoint. Then paste it into a RichTextArea. then they export all those info into an Excel (XLS) file. But sometimes, those pasted info aren't reported, or generate some HTML Tags (not understandable for most users).
What I had suggested : The RichTextArea has some tools, displayed with buttons, one of them is "Remove Formatting", if they press it, everything would be ok. But I had to agree with them, it isn't intuitive and "friendly" to use. Since they are my clients, I want to help them as much as possible.
What I want : I want that if they copy paste into the RichTextArea:
They should be invited to remove the format (with a notification on paste) by pressing the Remove Formatting Button, so I should valorize it.
Or automatically apply the remove formatting on paste.
But I couldn't achieve those solutions because I don't know how to detect the action of pasting, moreover, for the second solution, I couldn't retrieve on the code the remove formatting action.
Can you help me in order to achieve this please? Any tips that doesn't involve an other technology would be appreciated :)
Aynath
If this is still relevant:
Not sure about the first approach. But the first thing that comes to my mind is to use usual change event. When user will paste the new text, you will be notified that values were changed. Then use any tool to clean HTML and get the simple text (I suggest to use something like jsoup because it is the easiest thing). Or, if you need something specific implement your own parser/cleaner. The last thing is to simply set a new text to the current area value.
Otherwise, you can use Vaadin add-ons which may provide such information. Just look for add-ons repository for CKEditor or TinyMCE Editor

Additional icon to ratchet Ratchicon set

I am using Cordova, Phonegap and Ratchet for an iOS application.
How can I have additional icons with last version of Ratchet?
We tried to use bootstrap icon set but it has some kind of conflict with Ratchet CSS.
I added ratchet-ios7.css from Github, and it seems have more icons but I can not use them and the documentation link of the package is not working too.
Is there any solutions?
I had a similar problem, and managed to fix it as below. BUT, I didn't use this ratchet-ios7.css, and after looking a bit into that, it doesn't look like my answer will apply to that part of your question. This answer is specifically to add icons to the ratchet icons.
So then:
Go to http://icomoon.io/app/
Import the ratchicons.svg (found in the ratchet/ratchicons directory), and import the .svg of the icon set that you want to add to it. (They also have a bunch of their own icon sets as well)
Select any/all of the icons you want included (I suggest at least including all of the ratchicons, just to make sure it doesn't mess up with how the Ratchet stuff works and so you won't have to edit it yourself). When you're satisfied, click the "Font" button at the bottom of the window, and you'll see all the selected icons and their codes (the same ones that can be seen at the bottom of ratchet.css).
In the top left, make sure the "U+" is toggled to true. If it is a darker shade of grey and you see their unicode attributes underneath the icons (ex. "e600"), then it is set to true. I'm not entirely sure what the "fi" toggle does in terms of how it affects the code, but I just left it alone (just to play it safe).
Go through the list and change the names of any icons you want, if they don't accurately convey what they are and/or if they don't conform to the naming convention.
Also in the top-left, click the Preferences button, and in the Font Name input field, replace "icomoon" with "ratchicons". I don't remember if I changed the Class Prefix field or not, though I don't think it particularly matters (someone feel free to correct me on that). Lastly, make sure "Encode & Embed Font in CSS" is checked. Click the "X" button in the top-right.
When everything looks schpick-n-schpam, click the download button in the footer, and you'll get a zip folder.
Unpack that sucker and inside that you will see several folders/files; the one we're looking for is "fonts". Open that one. Inside that you will see 4 files, each one named ratchicons and each with a different file extension (all of which are the ones we need!). Copy all 4 files.
Nagivate to your ratchicons folder (the one you got the initial ratchicons.svg from), and just rename all these to something else (ex. "ratchicons.woff" -> "ratchicons_old.woff"), just to keep the working ones available. Now Paste the new files here.
Now, editing the ratchet.css file directly isn't the best practice, but this doesn't pose any problems as far as I've experienced, so we're going to do just that. Open up ratchet.css and go right to the bottom. You'll see all the .icon- css selectors that come standard with ratchet, and now we're going to add our new ones. Go back to the folder you downloaded and unpacked and open style.css. See all those .icon-*:before{} selectors, like the ones in ratchet.css? Copy all of those, and paste them over the ones in ratchet.css
You should now be able to use your new icons in the exact same way as the standard ratchet icons! Just use the icon's name you gave on the website in the class="" attribute. If you need to change a name or something, just make the edits in the ratchet.css. Also, for anything I missed and/or if you're curious, here's the docs for IcoMoon: http://icomoon.io/#docs
Update
As pointed out in the comments, in the unicode strings, the numbers in the code must be higher than 255. Otherwise, they will conflict with normal ASCII character unicodes. I'm not sure exactly what the lower limit is, but if you stick to much higher numbers (500s-900s) you shouldn't have to worry about it.

Design pattern for Excel like workbook editor

I've been assigned to a software development task for a excel like editor. Basically the editor is working on 2-dimensional data, should have the basic editing features such as add/remove rows/columns, edit cells, undo redo etc.
Please point me some good design patterns for this type of job, Thanks!
Rather than trying to figure out all design patterns for a project in advance, wait until you run into a specific design issue and think about patterns that address that issue.
That being said, the features you list here do call out the likelyhood that you'll be wanting to use the Command pattern, so that each possible operation (add column, add row, remove column, edit cell, etc.) is supported by a command object, and enabling undo/redo for your commands with additional help from the Memento pattern.
Depends on context of use.
You could check out some common usage guidelines for tables here: http://www.oracle.com/webfolder/ux/middleware/richclient/index.html?/webfolder/ux/middleware/richclient/guidelines5/tblInteraction.html
Very often users want an Excel-like UX for table data manipulation, including actual export to Excel. You can provide for edit, sort, add row, enlarge, etc. If the user is editing in a table try that guideline. It's intended for enterprise users, so customize accordingly.
HTH

EXCEL like table in eclipse GEF

I have a project that need to create several graphic editing.
A new feature is to create a excel like table using GEF.
Column / Row add/delete is needed.
The current plan is to many Node. As add new column / row, add lots of Node to make it like a table.
About the Node width / height adjustment, the current plan is use can adjust size of each Node.
Other corresponding node will be change according the current node change.
Currently some tests is working, but I wonder if there are better solution this this?
(Using plan SWT table is not ok, for some GEF feature is still needed.)
I think it would be better to render the excel table on Canvas than using GEF figures to represent column/row..etc. Because you will not be able to optimize performance with GEF as its UpdateManager(that does painting) is very generic and it doesn't know about a thing about excel like behavior that you are looking for.

Connection between svg elements

Is there a way to connect 2 elements in svg to achieve a "flow chart" like diagram? I have 2 boxes, an arrow between them, and I would like that if I drag one box, the arrow stays connected to the box.
I've founded that there is a spec for this feature in SVG 1.1 but is far from being completed.
I can't find any piece of code or library that does it (and I think it isn't a rare use case), and I would like to be sure that there isn't a proven way of doing it before I start making it myself.
Thanks!
You may be interested in the Dracula Graph Library which uses Raphael and does exactly what you mean:
http://www.graphdracula.net/
Update: I haven't used jquery-svg before, but I put something small together that may get you going: http://jsfiddle.net/7vJmy/2/
It takes advantage of jquery-ui draggable, but I suspect there's a nicer way to do it using the jquery.svganim.js package that's include with the library - anyway, this is all I have time for now.
Also, if you can in the future, include things like library restrictions in the question so you can get more specific answers from the get go! :) Hope that helps.

Resources