I am working on a research project.I need to customize ScrewTurn Wiki to store C# source code.It can reuse the code by linking.
e.g. I have a add function and add function will be stored as a wiki page.If someone would like to add 2 integer then instead of writing their own ,they can simply reuse the add function by linking the page. [url]add/url.
The user can write code by reusing the existing function like shown above and be able to download a complete source code and preview the source code.
My question is that I am very new to ScrewTurn Wiki, I need some suggestions to where do I start?What is the best way of customizing it given I only have 2 months.
Any suggestions are much appropriated.
Related
Could someone point me to documentation that shows how to create a record in a model with one to many relation via client side script.
Thanks in advance!
There are two ways of creating a new record.
1. Via a client-side script
You can do this by calling a createItem function from a widget. This link might help with that.
2. Via a server-side script
You can do this by directly creating a new record, assigning it to the relation of a model and then saving that model. This link might help with this method. By the way, it's easier to do this in a server-side script, as the guide itself says.
Since you just requested the link to official documentation, I've limited my answer to links only. Please feel free to ask if you need clarifications!
I am pretty new to meteor and I am trying to make my first app which should have a profile page, later also with picture upload depending on user group.
As I understand I do not need a extra collection and subscription.
I am using useraccounts:bootstrap package with accounts-password. I added some custom fields to the profile (firstName, lastName, country).
Now I want to create a update or edit page. I could not find any resources which could been helpful.
Do I need to write all the logic for example testing the email address by my self? Or is this included by the package.
Or is it better to create a new collection for users with meteor-collection2?
Thanks
Witali
Collection2 will just attach its schema to the original user collection (if you proceed like suggested in collection2 readme).
As far as I know, I'm afraid that you will have to create some publications. Since editing user should be considered as "must-be secure", I would advise you to take a look at the existing packages. I'm quite a newbie to so I didn't look into the code of alanning roles package (which is, I've been told, excellent).
I used https://github.com/perak/user-roles. I think the code is good and clear.
The same guy, perak, made a meteor code generator which is still a work in progress, but looks very promising to me. Get one of his examples with user account and look at the client folder. You will have, when considering his user-roles package, all the code to do what you want.
ps: for email testing, look at his files in the client/lib folder but it is just a regex
first of all, i will explain what i would like to do here : given a C big programm, i would like to output a list of producers/consumers for a data and a list of calling/called-by functions of the function where this data is.
for doing this, i am thinking about using what computes some modules of frama-c, like dataflow.ml or callgraph.ml in my own plugin.
however, as i read the plugin developper doc, i can't manage to see how we can have access to the data of those modules.
is a "open.cyl_type" sufficient here in my own plugin?
moreover, here are my other questions :
i tried using by the way pdg plugin for my purposes but when i call it and it says "pdg graph computed", how can i access it?
is there any more documented thing about "impact" plugin than the official webpage, in depth, how it works fondamentally? (i have to say that i'm in like a pre-project phase, and that i installed frama-c with the apt-get on ubuntu and that i did not get an impact plugin working (i'll see by compiling the sources))
by the way, do you think i'm using the right method to get to my purposes?
Your question is quite unclear, and this answer is thus very generic. As mentioned in the developer documentation, there are two main classes of plugins: static plugins, compiled with the kernel and whose API is exposed in a module (usually of the same name of the plugin) in Db. Dynamic plugins, such as Semantic_callgraph register dynamically their entry points through the Dynamic module.
If you do make doc in Frama-C sources (I'm not sure that there is a corresponding package in Ubuntu) you can access documentation for the Db module in FRAMAC_SOURCE_DIR/doc/code/html/Db.html and the list of functions registered by dynamic plugins in FRAMAC_SOURCE_DIR/doc/code/dynamic_plugins/Dynamic_plugins.html.
I think that, following Virgile's advice, you should get the source code anyway because you will most of the time need to browse the code to find what you are looking for. Beside, you can have a look at the hello_word plug-in (in src/dummy/hello_world) to have an example of a very simple plug-in. You can also find some examples on my web site at https://anne.pacalet.fr/Notes/doku.php?id=notes:0061_frama_c_scripts to find out how to have access to some information in the AST.
I am writing a CodeGenerator. The string output is later on mixed with user code.
In order to be able to make changes to my generated code after the user edits the file, I have to make sure my generated parts are not editable.
I am currently not sure how to achieve this behaviour..
If I would be able to track which line correlates to which CodeDomObject and vice versa I could tell my TextEditor to mark Lines as read only.
But at this Point I have two problems.
I don't know how to keep track.
I am not sure if my solution ( which I am not able to implement... ) is
clean. There would be a lot of overhead, because I have to find out
which object is generated and which not. I could do so by comparing a
generated CodeDomTree with the actual Tree and marking the diffs as
UserObjects.
I don't know if this solution is practical in your environment but this is handled using partial classes where required in Visual Studio.
An example would be Windows Forms where the visual designer is responsible for creating source code to reproduce the form at runtime but the developer is expected to add event handling code to the class.
By having the developer's code in a separate source file it doesn't get overwritten when changes are made in the designer.
Of course, this won't help you if you need to have a single source file for your class.
I found this tool but I wonder if it still the right way nowdays with net 4.0 or is there any straight forward oob alternatives.
I just need to add columns and update excel stuff programatically. There are many ways but I need to keep the original document as a template. The link above explains exactly what the requeriments are and why they created such "ExcelPackage" library.
A quick look at the link you provided seems like it will in fact keep the original template intact and just return a populated version of that template. This is a pretty common way to create and populate Excel documents using Open XML since it helps to minimize the amount of code you have to write. If you did not specify the layout, styles, formats, etc in a template you would be forced to define those when coding and that could lead to some bloated code. Overall, a project like this or using the Open XML SDK 2.0 to create the documents is the way to go.