Can GraphEngine TSL-files import other TSL-files? - graphengine

can TSL-files import other TSL-files?
Imagine a struct that is outsourced in file "b.tsl" and
another file would like to use it.
I've looked up the official web page and parts of the web,
but didn't find something.. Is there any option available?
Kind regards
Seargent

Yes, importing other TSL files is possible in GraphEngine, by just placing include $PathToTheDir$\b.tsl; at the beginning of the TSL file.
If the TSL files are in the same GraphEngine modeling project,
no explicit importing is necessary for them. Multiple TSL files are permitted, and they can be recognized by each other. My suggestion is just splitting the cell and struct definitions into different TSL files (the TSL filenames don't matter), adding a TSL file to the project is much convenient in my opinion.

Related

XLS/XLSX to CSV in c++

I've been given a project in which I need to import data from CSV, XLS and XLSX files, do some processing, then write the results to a database.
I'm working on a project that's been going on for a while and there are several import functions already that use a very nice object to handle opening files with all sorts of separators and such. And this object is key to the processing that I need to perform.
Since a CSV is basically a textfile with a different extension this object opens it perfectly and I've managed to complete most of the processing and testing with the object and values stored within.
But now I need to add the XLS and XLSX support. And since this object is now pretty much central to the processing I figured the easiest way to fit XLS and XLSX files in would be to convert them to CSV, then import that.
Any help would be appreciated and I'll try answer questions if it's necessary, but since the request is just for some way to convert from one file type to another and nothing more insightful I don't think it's really necessary to add any snippets just yet.
Your options in terms of C++ libraries:
OpenXLSX - https://github.com/troldal/OpenXLSX
XLNT - https://github.com/tfussell/xlnt
Or you could give "XLSX I/O" a try. It's a small C library.
"XLSX I/O" - https://github.com/brechtsanders/xlsxio
Don't forget to add the usual extern "C", when calling C functions from C++.
The repo contains basic xlsx-to-csv (and csv-to-xlsx) examples, which should get you started: https://github.com/brechtsanders/xlsxio/blob/master/src/xlsxio_xlsx2csv.c
Maybe this will help:
http://www.codeproject.com/Articles/42504/ExcelFormat-Library
Also you can use libraries from Open/Libre Office project.

What is the consequence of using my own autoexec.sas file?

I want to write my own autoexec.sas file, but I don't want to lose any functionality that I might have had from the default autoexec.sas file(s).
When I do a SASHome directory search, I find many files with this name. Do all of these files execute by default after the SAS system initializes? Or just one of the files?
Where do I save my own autoexec.sas file so that the other files still execute, along with my own?
Just starting here. Thank you very much.
You really shouldn't edit the usermods file. When you upgrade versions you'll lose all of your changes. There's actually a specific autoexec file designed just for this purpose -- autoexec_usermods.sas
That's where you'll want to keep your site specific modifications -- this way when you upgrade versions your transition will be relatively seamless.
I think you will want to edit these 3 usermods files:
opt-biserver-Lev1-SASMeta
opt-biserver-Lev1-SASMeta-MetadataServer
opt-biserver-Lev1-SASMeta-WorkspaceServer
The following links from SAS documentation should help answer your question on impact, storage and order of execution of autoexec file :
Customizing Your SAS Session by Using Configuration and Autoexec Files
Files Used by SAS -> SAS Autoexec File

Copy files from local PC to SAS server in Enterprise Guide

I need to extract a particular sheet from a .xls file on my local machine and get it as a .sas7bdat files on the SAS server on which I work (or the other way round, that is, import it and then convert).
The problem is that although this can be done using the Import Wizard, I need to do this using the 'Copy Files Add-in' because it needs to be built as a part of an automated process.
When I tried doing this using the copy files add-in, it DID copy the .xls file onto the server according to the log, but the .xls file didn't actually show in the library and could not be referenced either (or maybe I'm just referencing it wrongly).
This has led me to believe that I need to convert it to a .sas7bdat and then import it.
Is there a way to get past this? Please bear in mind that I am talking about an automated process, so the wizard is useless for me (or is it? I'm not sure)
NOTE : I am extremely sorry that I cannot post the log and screenshots here, because I work as an offshore resource for a very large bank and cannot post anything here. I have, however, tried to make my problem as clear as possible. If any further clarifications are needed, please let me know!
I assume you've read There and Back Again which covers this in some detail.
Ultimately, all you're doing is copying the excel file as a file onto the SAS server. You're not importing it into a SAS dataset. You would import it by placing the file (either the remote file after copy files add-in, or the local file) in the workflow as an import step.
For example, if you chose /usr/lib/sasdata/myexcel.xls as the remote copy destination, you then need to include that file in your workflow as an import step (you can drag/drop the file and it will automatically create that step for you, with some wizardry).

Hiding application resources

I'm making a simple game with SFML 1.6 in C++. Of course, I have a lot of picture, level, and data files. Problem is, I don't want these files visible. Right now they're just plain picture files in a res/ subdirectory, and I want to either conceal them or encrypt them. Is it possible to put the raw data from the files into a resource file or something? Any solution is okay to me, I just don't want the files exposed to the user.
EDIT
Cross platform solutions best, but if they don't exist, that's okay, I'm working on windows. But I don't really want to use a library if it's not needed.
Most environments come with a resource compiler that converts images/icons/etc into string data and includes them in the source.
Another common technique is to copy them into the end of the final .exe as the last part of the build process. Then at run time, open the .exe as a file and read the data from some determined offset, see Embedding a filesystem in an executable?
The ideal way for this is to make your own archive format, which would contain all of your files' data along with some extra info needed to split files distinctly within it.

How to properly collect and manage admin media files from django?

Collecting the admin-media files from different django application is one of the not-so-good things about django. Usually you have to file copying from the module distributions to your directory every time one you install/update/remove a module.
When you are using several django application that do have their own media/admin files, some of them even overriding others you need a proper way of collecting them and building a correct media directory.
A proper solution should be able to recreate the directory by collecting the required files
from the modules in a specific order, allowing them to override each other.
Useful links
Proposal: installmedia command - A story for distributing media with apps
What solution do you have for this issue?
I just stack multiple Alias directives one on top of each other, grafting the media to the appropriate place on the tree.
For the moment the best solution I found was to use http://djangosnippets.org/snippets/1068/
but I'm still looking for better approaches.