Loading local STL files - xtk

I tried referencing a local STL file for the skull example and changed:
skull.file = 'http://x.babymri.org/?skull.vtk';
to:
skull.file = 'file:///C:/graham/cad_files/rubber_duck.stl';
but I don't see my model.
The STL file is a binary file, and I see from the API document that these are supported.
I'm using Windows and am sure that the file:///C:/... format is correct.
I'm using jsfiddle and saved the file as an external resource:
jsfiddle.net/gmseed/TTBr2/6/

Can you try to drop the file in slicedrop.com?
If it works, it means there is something wrong in your code, if it doesn't work, it is related to XTK
The jsfiddle link is not working because the file your are trying to pass is not available to the public. (it is sitting on your computer, and the link only works from your computer)
You could use drop box or google drive to host your file instead.
Thanks

Related

cPickle.load() doesnt accept non-.gz files, what can I use for .pkl files?

I am trying to run an example of a LSTM recurrent neural network that is presented in this git: https://github.com/mesnilgr/is13.
I've installed theano and everything and when I got to the point of running the code, I've noticed the data was not being downloaded, so I've opened an issue on the github (https://github.com/mesnilgr/is13/issues/12) and this guy came up with a solution that consisted in:
1-get the data from the dropbox link he provides.
2- change the code of the 'load.py' file to download, and read the data properly.
The only issue is that the data in the dropbox folder(https://www.dropbox.com/s/3lxl9jsbw0j7h8a/atis.pkl?dl=0) is not a compacted .gz file as, I suppose, was the data from the original repository. So I dont have enough skill to change the code in order to do with the uncompressed data exaclty what it would do with the compressed one. Can someone help me?
The modification suggested and the changes I've done are described on the issue I've opened on the git(https://github.com/mesnilgr/is13/issues/12).
It looks like your code is using
gzip.open(...)
But if the file is not gzipped then you probably just need to remove the gzip. prefix and use
open(...)

SAS Path to "My Folder"

I created some CSV files and exported them to a file folder on a SAS server. I'm using the Excel SAS add-in to make some charts. For whatever reason, the only folder I can access is "My Folder", which I can also view inside Enterprise Guide. There, I can modify it and make changes.
Unfortunately, I can't figure out the path to the folder. I want to write my text files (or maybe some datasets) to that folder so I can access them with the add-in. Side note - I tried to just export the CSV files to a network drive but wasn't allowed for security reasons I guess. It looks like I'm stuck with "My Folder" being the only option, I just can't figure out the path to make use of it.
If your "My Folder" is equivalent to a SAS library, you can do the following:
%sysfunc(pathname(work));
That gives you the path to the work library, which is at least one location that you have write access to.
My guess is that you are confusing two things:
1. Physical folders. (the ones you are looking for)
2. SAS Metadata. (the 'file system' you are seeing)
It has been a while i worked with the excel add-in, but if (no guarantees ;)) i recall correctly, you can only access SAS objects that were registered in the SAS server metadata.
The SAS metadata looks like a file structure, but it is virtual. Objects in the same metadata folder can actually have a totally different disk location.
The easiest way would be to register the file you want to access in the metadata. (the 'my folder' if you want to make it easiest) Of course, this requires certain administrative rights on the server.
If not possible, i'm not sure that you can access it some other way through the SAS add-in.
For reference, the metadata path to your "My Folder" is /User Folders/&sysuserid/My Folder
You can store the files in a folder on the server and give a reference to the folder using LIBNAME in the autoexec.sas file in your ~/home folder on the server. The when you browse libraries using the add in, you will see the reference to your folder present there.
for the university demo edition on linux/Mac try this
INFILE '/folders/myfolders/yourfilename';
if you have set up your shared folders as described in the install howto.
See one example from "the little SAS book" loading raw data:
You can also see the path in the status line at the bottom
Other aproach: enter
%put all;
will list "all" macro variables in the log. There you can find:
GLOBAL USERDIR /folders/myfolders
So in the example above you could also use
INFILE "&USERDIR/yourfilename";

Debug iCloud key-value data in the cloud

I have been banging my head against the wall trying to figure out how to determine what is actually in the key-value store for a given app. Using the api to detect data seems dubious to me as I am afraid of getting false positives. Also I would have to guess at what else might be there (i.e. from previous versions of the app or whatever). So far as I can tell, the developer test website only shows files in the cloud, and not the key-value store. Does anyone know how to access this data, or where in the filesystem the local .plist file is stored (I assume it is in a .plist anyway)?
I finally found it. There is a circuitous route to get there. ~/Library/SyncedPreferences/com.apple.syncedpreferences.plist has a dictionary entry for each application bundle. Inside that dictionary is the key plistPath. This points to the actual plist file that contains the key-value data for your app (on the local device anyway). This file is stored in your app's container at ~/Library/Containers/<bundleName>/Data/Library/SyncedPreferences and appears to be named <bundleName>.plist. Still don't know how to view what is actually in the cloud, so I guess I will have to trust what is in the local file. :)
I know this question is old but shows up in google search so it may help others.
In case that the device is a simulator the path are as follows:
Directory for application bundle list is:
~/Library/Developer/CoreSimulator/Devices/<Device-ID>/data/Library/SyncedPreferences/com.apple.syncedpreferences.plist
File with key-value data for your app:
~/Library/Developer/CoreSimulator/Devices/<Device-ID>/data/Containers/Data/Application/<App-ID>/Library/SyncedPreferences/<bundleName>.plist

How Can A .dll File Read a .txt File?

I would like my Browser Helper Object which is simply a .dll, to be able to read a text file. I have tried using a pointer to a FILE, as well as ifstream in("file name goes here"). Before implementing these two methods of reading files into the BHO, I tested them individually, and made sure each example dealt with similar data types and locations. Both of them worked without a problem, yet testing the BHO reveals that the file cant even be opened. I have searched google for an alternative method, and after exhausting all other options, I'm hoping that someone would be able to provide me with some guidance/resource. Anything is appreciated; I will keep trying to find a solution and will post what I can in the event that someone else may have the same problem.
Are you providing an absolute path to the file? If you're just using a relative path you may not be in the same working directory while running IE.
I think you might be a victim of the IE protected mode.
http://www.codeproject.com/KB/vista-security/PMSurvivalGuide.aspx
Under protected mode your addin might not have access to registry and file system as you might like.

Symbian C++ - Persistent storage of a single variable

I wish to store a single variable in my application that will be saved between runs. This will be a version number that will be used to trigger an update option and so will change only rarely.
Does anyone have suggestions on the best way of implementing this? Considering it's such a simple requirement I am interested in the simplest solution.
Thanks!
Normally, that sort of information will be held in a constant (not a variable) in the binary, and the binary will contact an external site to find out whether there is a more recent version of the software. When it downloads the new, the newly downloaded file will have a new constant embedded in it.
Alternatively, you could keep the information in some sort of file in the file system. I'm not familiar with the Symbian environment, but something similar most likely exists.
It has already been mentioned, so I am going to elaborate on it. Create a file in your project directory that will contain the version number. Make that file a part of final SIS file by adding a line about it in the PKG file---for example, put a line in the PKG file to tell the installer to copy the file to a place like c:\System\Apps\${AppName}\${filename} on the device. Within code, read the version number from that file. The advantage you will have from doing it this way is that when you update your code and edit the file in your project directory and recreate an updated SIS file, on updating the SIS on the device, the version file will automatically get replaced with the current one.