Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hello. SMath Studio 0.90 will have a new interesting feature - Snippets. Here is one case how it works: SMath Studio will have some built-in snippets, but of course every user can create its own snippets. Snippet in SMath Studio is a simple *.sm file that is placed into the special "snippets" folder. Every snippet can be inserted to the page using Dynamic Assistance (pressing TAB will insert snippet inside th collapsed Area Region; pressing Shift+TAB will insert just all snippet expressions without Area Region) or directly from the "Snippet Manager" of the "Tools" menu group. By the way, please, advise me snippets that you want to be built-in to the SMath Studio. Best regards, Andrey Ivashov.
|
1 user thanked Andrey Ivashov for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/12/2009(UTC) Posts: 249 Location: Cali, Colombia Was thanked: 87 time(s) in 66 post(s)
|
Thanks for this interesting feature. I think that it would be useful to include a snippet for English <-> SI units.
Regards,
Oscar Campo
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Andrey, I suppose Snippets would be useful if we want to have some sort of worksheets inside worksheets. With Area regions, dedicated "snippets" folder, we could have some collection of expressions which could be reused many times - some sort of "subroutines". If you remember there were extensive discussion and interest on the Forum about this possibility as a very welcome feature. I am just curious if there would be any specific rules for snippets *.sm files? Some sort of "input" into and "output" from the snippets, some local variables for the snippet. I suppose not this time because you mentioned that there is a possibility to insert the snippet either as Collapsed Area region or to insert the entire *.sm file - every expression in it. I hope I am right. Regards, Radovan Edited by user 30 September 2010 22:48:44(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
omorr, you are absolutely right. No any rules for snippet *.sm files will be required (except user can set shortcut to see the snippet in the DA list).
Regards.
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1126 time(s) in 723 post(s)
|
Following Davide's recommendation, I supply the stuff as snippets with corresponding example. You may unpack the zip file in your SMath install directory, then the files go automatically to the correct locations. Some remarks: - The description in the snippet manager is taken from the file properties, this does not show up in the dynamic assistant. - After insertion of the snippet, the dynamic assistant shows the the description text of defined functions along with their definition. - The explanation text in the examples browser is taken from the file properties. - The snippets are more of an exercise for me in making snippets and examples than a real contribution to the community, as they are quite trivial. Also, I have not seen any set of snippets gaining such popularity that it is continuously discussed and improved like many of the great plugins. Feedback, however, is welcome. Perhaps, plotting related helper functions could be collected in a central example. I also encourage the plugin makers to use the examples mechanism (examples folder) for documenting the use of their products. Partly this is already done. The files in the attachment have descriptions in german and english. Edit: 2013 06 02 fixed missing translations Edited by user 02 June 2013 15:15:34(UTC)
| Reason: Not specified File Attachment(s): mkraska attached the following image(s): |
|
3 users thanked mkraska for this useful post.
|
on 02/06/2013(UTC), on 02/06/2013(UTC), on 02/06/2013(UTC)
|
|
Rank: Advanced Member Groups: Registered
Joined: 30/03/2011(UTC) Posts: 393
Was thanked: 132 time(s) in 113 post(s)
|
Thanks. The second plot takes like 20 secs to load, some english/german descriptions do not show up in the snippet manager. Edited by user 02 June 2013 14:37:48(UTC)
| Reason: Not specified kilele attached the following image(s):
|
1 user thanked kilele for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 15/04/2012(UTC) Posts: 1,988 Was thanked: 1126 time(s) in 723 post(s)
|
Originally Posted by: kilele Thanks. The second plot takes like 20 secs to load, some english/german descriptions do not show up in the snippet manager. English descriptions were incomplete, fixed. And, yes, the fill function is slow (no performance optimization done so far). I had the idea of making coloured contour plots using dots with computed colors, but given the lousy performance I think that is a bad idea. On top of that, most graphics tricks are obsolete as soon as any of the plugins under construction are mature and feature-rich enough. Matplotlib would be nice, but there is few hope as they have no c# api. My newly gained snippets experience has found it's way to the Handbuch now. Edited by user 02 June 2013 15:16:29(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 Location: IL Was thanked: 19 time(s) in 17 post(s)
|
Is there a way to use sub folders in the snippet folder or with the snippet manager? I think it would help with organization.
Thanks
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 25/09/2013(UTC) Posts: 325 Location: IL Was thanked: 19 time(s) in 17 post(s)
|
This may be stated somewhere but if you use area regions in your snippet make sure that they are expanded. That way when you insert the snippet into a calculation page between separators the snippet will not overlap other regions.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,648 Location: Italy Was thanked: 1331 time(s) in 876 post(s)
|
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: oscampo Thanks for this interesting feature. I think that it would be useful to include a snippet for English <-> SI units.
Regards,
Oscar Campo It does include Imperial => SI Edited by moderator 29 September 2016 00:42:27(UTC)
| Reason: added [quote] BBCODE
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.