import many to many relationship in CRM 2011 - import

I am currently migrate some legacy data from CRM 4.0 to CRM2011, however, there is big barrier on the Many-to-Many relationship importing, I have search for the solution and get this from codeplex http://crm2011manytomany.codeplex.com/discussions/433816,
when I importing data, it keep get 'Issues on line 1 - line has 1 instead of 2' error,
any advise on it
Thanks

I don't know how that tool is working but I found this blog that covers how to do an import of many-to-many. Other than that it's cusom coding that will solve this issue I'm afraid. Write a program that does what you want, it will take some time and it's not a trivial task but it might be the only way.

The Codeplex you mention actually works, I just tested it.
There is however an issue regarding the file encoding format. As a workaround you can copy past your csv content within notepad++, use encoding UTF8 and save it -> the import will work fine then.

Related

Is it possible to use data frame in r-exams?

I would like to paste the data-frame from the R environment to the latex part (question or solution part) when creating exercises in r-exams. Later the exercises will be imported into Moodle. Is that possible in r-exams? We saw it is possible when the object is matrix object via $\Sexpr{toLatex(matrix_obj)}$. But a similar way does not seem to work with the data-frames. Thank you!
A data.frame would usually be included as a {tabular} in LaTeX and there are various packages for automatic conversion like xtable or using the function kable() in knitr. For PDF output this also works nicely including all vertical and/or horizontal lines included in the table. However, for HTML-based output (as for Moodle) the table as such is converted correctly but without any lines.
An overview of a couple of solutions is available as:
Different copies of question with table for Moodle with R-Exams
Moreover, Kenji Sato has proposed to inject some dedicated CSS code to handle the table formatting in HTML. We are currently working on some automated way of including this in R/exams:
https://www.kenjisato.jp/en/post/2020/07/moodle-bordered-table/

Opening Anylogic model in an older version

I have created a model in Anylogic 8.3. Now I want to open this model on a different computer that contains an older version, Anylogic 8.2.3. This, however, does not work, as I am prompted with the fact that the model is created in a newer Anylogic version.
Is there a way to circumvent this issue?
I am not a system admin on the computer with the older Anylogic, nor does our license cover updating to a newer version of Anylogic (expired in december 2018).
You can easily do that by opening the .alp file of your model with Notepad or a similar text editor. Then:
Get your actual AnyLogic build version (open AnyLogic, click "Help" and then "About". You can find your build-version as in the image below
replace AnyLogicVersion and AlpVersion with your required values, e.g. something like AnyLogicVersion="8.2.3.xxxxxxxx" and AlpVersion="8.2.3"
save the file and open with AnyLogic 8.2.3
(Note that if you want to open a model in AnyLogic 7 that was developed in AnyLogic 8, you would also need to remove the entire <RunConfiguration> section. But this is not relevant in your case.)
I think it's only possible to go back to an earlier AnyLogicVersion by hacking the .alp if the AlpVersion is the same, because it denotes the structure of the XML. I don't have an 8.4 file handy, but I have, for example, an 8.5.1 and an 8.2.4, and the AlpVersion is 8.4.9 for AnyLogicVersion 8.5.1, but 8.0.4 for AnyLogicVersion 8.2.4.
If the XML structure is different, the newer version of AnyLogic will likely be unable to load the file. Looking at the two examples of essentially the same model that I've detailed above, there are readily apparent structural differences in the ActiveObjectClass, for example. If there are not too many structural differences, you could try replicating them. I've succeeded in doing that manually at least once, that I can recall.
There are a variety of online tools that allow you to compare the XML schemas of two XML documents, from which you will be able to judge whether a manual hack is feasible.

BibFuse: What language is this, and how can I modify it?

I write a lot of scientific papers, and have been recently forced to work with MS Word. I use BibDesk as my reference manager on a Mac OS, and have found bibfuse to be a nice way of citing papers in Word from BibDesk. The problem is that bibfuse only handles journal articles. It does not work very well at citing books, book entries (i.e., "incollection" entries in BibDesk), and websites. Does anyone know how to add to or modify the sampletemplate.doc file in the bibfuse package to accept these entries? The sampletemplate.doc file contains only the following lines of code:
<$publications>
<$itemIndex/>.
<$pubAuthors.unpunctuatedAbbreviatedNormalizedName.stringByRemovingTeX.#componentsJoinedByCommaAndAmpersand/> (<$pubFields.Year/>) <$pubFields.Title/>. <$pubFields.Journal/>
<$pubFields.Volume/>, <$pubFields.Pages/>.
</$publications>
If no one knows how to do that, can anyone tell me what language this is, so I might figure it out and modify if possible?

How to repair Simulink SLX file?

One of my Simulink SLX files has stopped opening as a model. Apparently it was corrupted. Are there any means to repair such a files or extract some information of them? File looks like being a MZ executable. Where is the block schema stored?
SLX is a compressed file which contains XML files with model information. You can try opening the SLX file in winzip and check. See http://www.mathworks.com/help/simulink/ug/saving-a-model.html#btbr7kx-1 for SLX format. I do not think there is any utility to repair corrupted SLX files.
DiffPlug's Simulink Viewer has an .slx parser that was developed independent of The Mathworks, and it's a little more "lenient" than The Mathworks' implementation. You might want to try opening your model in DiffPlug's viewer (it's free, so you don't have much to lose I guess...).
That way you'll at least be able to scout around the model so you can see what piece has been corrupted.
Disclaimer: I work for DiffPlug.
If there's a lot of time invested in the model, I'd be happy to open your model up and poke around inside it using our internal API. It'd only take me a few minutes, and it might be an easy fix like a mis-matched Stateflow id.
Remove the extension 'original' from the file name 'X.slx.original'. This worked for me.
You can actually still load the system using load_system(), use bdroot to see if it loaded, then use save_system() to save what is returned by bdroot, using a new filename. The new model should open correctly.

ESS workflow for R project/package development

Can anyone share his experience on workflow for R peject development under ESS? I tried several times to learn emacs but I have not get it yet. I can understand ESS as an editor, but is there a project view in ESS? what's the efficient ways to set up/view R project directory, coding, and testing, and how's ESS has an edge to facilitate the whole process?
Do you use ESS as a good R editor only or tend to emulate a R IDE environment within ESS?
Thanks for any advices.
It sounds like you're asking two separate questions.
One question concerns workflow and the other concerns using ESS.
As I use StatET and Eclipse, I'll just share my experience regarding the workflow aspect of your question.
As with Vincent I also follow something like the workflow set out by Josh Reich here (also see Hadley's useful comments):
Workflow for statistical analysis and report writing
Although it can vary between projects, I tend to have a couple of main R files
import.R: this imports data files and does any necessary cleaning and manipulation
analyse.R: This generates the output that I need for any final report
main.R: This calls import.R and analyse.R
The aim is for import.R and analyse.R to represent the complete and final workflow for producing the final results of any analyses.
In terms of a directory structure for an analysis project, I'll often also have the following folders
data: for storing any raw data files
meta: for storing meta data, such as variable labels, scoring systems for tests, recoding information, etc.
output: for storing any graphics, tables, or text generated by my analyses that I might want to incorporate into an external program
temp: When exploring the data and brainstorming analyses, I like to type code into files instead of using the console. I tend to label these temp1.R, temp2.R, temp3.R. I store these in a temp folder. That way I have a permanent record that's easily accessible. If the analyses become final they get incorporated into one of the main R files (i.e., import.R or analysis.R)
functions: If I think that a function will be needed across a couple of projects, I often place it one function per file or a set of related functions in a file in a folder called functions. This makes it relatively easy to reuse functions across projects, when the formal requirements of package development are more than needed.
library: If I want to create some general functions that I think will be project specific, I'll place them in this folder
save: A folder to store any saved R objects
StatET and Eclipse make it easy to interact with such a file system.
Of course, given all the R gurus that use ESS and Emacs, I'm sure it also handles interactions with the file system well.
I'm not exactly sure what you expect as an answer on this one. I, for one, have stolen (and adapted) a system that was suggested here a little while ago (by Josh Reich):
Create a folder for every project, and split up your work in a bunch of different .R files:
Load.R for getting your raw data into R;
Prep.R for cleaning the data, recoding variables, etc.;
Func.R for coding any custom functions you will need for evaluation; and
Eval.R for running your final stuff.
If that doesn't fit your style, just change it.
Then, you can either have a master file to call each of the parts one after each other (good for reproducibility), or save at different stages and have the individual scripts load the appropriate data (good if some of the prep work is very computationally/time intensive).
**
On a different note, the trick that is posted at the link really helped me get into ESS. It turns Shift-Enter into a one-stop-ESS-shop: http://www.kieranhealy.org/blog/archives/2009/10/12/make-shift-enter-do-a-lot-in-ess/
Others have given you some good ideas about how to setup your directory/file structure for a project.
You also asked about "project views," in which case you might want to look into the Emacs Code Browser (ECB).
You can find some screen shots of it in action on its site, here:
http://ecb.sourceforge.net/screenshots/index.html