Help on C# and XML


Hello guys!



I am new to web development in general and C# particularly.



Recently I have been given a project to create a simple web application, using C# and .NET.



The application is divided into three parts: Data Access Layer with an XML file attached to it, the Business Layer and the User Interface Layer.



So the question is- could anyone give me a guideline or a clue on how to design the DAL using XML (The tutor said I shoulsn't use SQL for this purpose). I spent whole day to find any tutorial on XML Data Access, but couldn't fins any info on that. (((



If possile, could you please provide me with a link to a sample code or step by step tutorials on XML file based DAL using C# in Visual Studio Express.



Thanks in advance and sorry to bother you with such a newbie question.
You could look at LINQ to XML. I use it all the time to read XML files and parse them.



<http://msdn.microsoft.com/en-us/library/bb387098.aspx>



If this is for an assignment, I'll leave the actual DAL building up to you, but LINQ to XML will provide you the mechanisms for reading the XML file and generating objects you require.
You could go the easy way and use [ADO.NET Data Services](http://codebetter.com/blogs/david.hayden/archive/2008/01/08/getting-started-with-ado-net-data-services.aspx). There is not an existing script but you could probably do it thru the Lotus COM interface. The easiest way is to create an agent in Lotus Notes to extract the information from Excel, and then using the NOTESACL objects of NotesDatabase add the references.


Does this help? If you need further assistance, please be a little more descriptive and I will see if I can help further.


Mike K. thanks for your comment!

i definitely should’ve used mkshell, not sure why i wasn’t. it does seem to produce a different error:

make: entering directory '/build/source/doc/manual'

xsltproc --nonet --param section.autolabel 1 --param section.label.includes.component.label 1 --param html.stylesheet … There is no DDEX provider package for VS 2017 (yet). <https://system.data.sqlite.org/index.html/tktview?name=8292431f51> 


Basically you need to wait for: sqlite-netFx46-setup-bundle-x86-2017-1.0.1xx.0.exe 


"Official" update:



> 
> The current estimate is that support for Visual Studio 2017 will
>  be included in the 1.0.106.0 release, which should be released at
>  some point in the mid-June timeframe.
> 
> 
> mistachkin added on 2017-05-28 20:41:40: At this point, it seems unlikely that I'll be able to add VS 2017 support for the design-time components (e.g. table designer, entity wizard, etc).
> 
> 
> 


**UPDATE:** I have created a DDEX provider that enables SQLite support (for EF6 only) in Visual Studio 2017, see the how-to guide here: <https://github.com/ErikEJ/SqlCeToolbox/wiki/EF6-workflow-with-SQLite-DDEX-provider> hello chris, - - we are already distributing telerik data access three nuget packages that you can download and try: - - telerik.dataaccess.fluent - package that should be used in your data model project, includes the enhancer; - telerik.dataaccess.core - package with references necessary for any project using telerik data access models and entities - telerik.dataaccess.fluent.sample - package to get you started with writing your fluent mapping using telerik data access. - - these packages are update when we are releasing a new version of the product and you can enjoy updates via nuget package manager. - you can find detailed information about the packages in this documentation article. - if you need assistance setting up your rlinq model to operate using nuget packages just let us know. - - - regards, - viktor zhivkov - telerik -   - - openaccess orm is now telerik data access. for more information on the new names, please, check out the telerik product map. - A couple of notes to get started:



> 
> .apply(literal\_eval)
> 
> 
> 


Wouldn't this be better as `map`?



> 
> I then re-create the Dask DF:
> 
> 
> ddf = dd.from\_pandas(ddf\_out, npartitions=nCores)
> 
> 
> 


`ddf_out` was already a dask dataframe, I don't know why you had to do this.



> 
> The columns in result seem to match those in metadir.
> 
> 
> 


The value of `result.columns` is taken from the meta you provided, no computing happens until you ask for it (dask is lazy in most operations). Does the ValueError exception not provide further information?


Here is a full example



```
x = ({'F9_07_PZ_COMP_DIRECT': '0',
  'F9_07_PZ_DIRTRSTKEY_NAME': 'DEBRA MEALY',
  'F9_07_PZ_COMP_OTHER': '0',
  'F9_07_PZ_COMP_RELATED': '0',
  'F9_07_PZ_TITLE': 'CHAIR PERSON',
  'F9_07_PZ_AVE_HOURS_WEEK': '1.00',
  'F9_07_PC_TRUSTEE_INDIVIDUAL': 'X'},
 {'F9_07_PZ_COMP_DIRECT': '0',
  'F9_07_PZ_DIRTRSTKEY_NAME': 'HELEN GORDON',
  'F9_07_PZ_COMP_OTHER': '0',
  'F9_07_PZ_COMP_RELATED': '0',
  'F9_07_PZ_TITLE': 'VICE CHAIR',
  'F9_07_PZ_AVE_HOURS_WEEK': '1.00',
  'F9_07_PC_TRUSTEE_INDIVIDUAL': 'X'})
df = pd.DataFrame({'a': x})
d = dd.from_pandas(df, 1)
meta = pd.DataFrame(columns=['F9_07_PZ_COMP_DIRECT', 
       'F9_07_PZ_DIRTRSTKEY_NAME',
       'F9_07_PZ_COMP_OTHER', 'F9_07_PZ_COMP_RELATED', 'F9_07_PZ_TITLE',
       'F9_07_PZ_AVE_HOURS_WEEK', 'F9_07_PC_TRUSTEE_INDIVIDUAL'], dtype="O")
d.map_partitions(lambda df: df.a.apply(pd.Series), meta=meta).compute()

```

How did I know what `meta` to use? I applied the function to the pandas dataframe - you might use a small piece of the dataframe to do this.


Some additional notes:


* it is an anti-pattern to load the data with pandas, pass to dask workers and then gather the whole result back to a pandas (in memory) dataframe, you are very unlikely to see a speedup this way and may incur a lot of overhead. You are better off loading with something like `dd.read_csv`, and aggregating or writing with dask functions too. Only `compute()` on something that will be small or not return anything (because it involves writing the output). The official examples do not use from\_pandas.
* string and dict processing are python methods, and so hold the interpreter lock (GIL) of any python function: threads will not actually run in parallel. To get parallelism, you need to run in processes, which is most easily achieved using <https://docs.dask.org/en/latest/setup/single-distributed.html>
* the distributed scheduler also gives you access to the dashboard, which has a lot of useful information to diagnose how your system is running. You can also configure a lot about its behaviour, in case you have firewall rules you need to obey. 1. You delete your old .tt files
2. You open your edmx file in designer mode (so you can see your model)
3. Right click on a free space
4. Select Add Code Generation Item
5. In the dialog select "EF 6.x DbContext Code Generation Item" (something like this)
6. Save your edmx and all classes will be generated for you, with the new namespaces and so on Hi,


This defines the “local data area”. The local data area is an area of storage allocated to a job. You can see the contents of the *LDA by using DSPDTAARA *LDA, you can also change the *LDA using CHGDTAARA.


This used to be a popular way of passing data and parameters between programs on the System/36.


Regards,


Martin Gilbert.


————————————————————————-


[The ILE RPG Reference also discusses the statement here](http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books_web/c0925086670.htm#HDRZZNAMVR).


Bruce Vining use sections. the first page should be section 1. you can assign the master page elements to that section only. then all other pages will be in section 2, with a different master page with different elements. each section can pick up page numbering from the last or start at a new number. you could download each fex submission to a separate folder and then create links (hard or symbolic) to the matlab files (m, p, mex, etc.) in a single common folder for all fex submissions. this might cause problems with name collisions to common files (e.g., contents.m).