how to retrieve COD file from ALX file? - blackberry

I am able to retrieve information in cod files from jad files but if i want to retrieve same information about COD file from alx file then how it is possible?

Alx file is an xml file. Parse this xml file and get the information.

Related

Paperclip uploads for docx file is being downloaded as zip files?

I have checked the Mimetype of the docx file and it shows: 'application/octet-stream'
But checking it without any content in it shows application/vnd.openxmlformats-officedocument.wordprocessingml.document as mimetype.
I don't know whether the problem is with the content inside the file also,
while uploading the file with paperclip it shows:
#content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document", #headers="Content-Disposition: form-data;
But when we check the file content after the upload it shows as "application/zip".
Tried all the mimetypes, but it doesn't seams to work.
Meanwhile other docx files are uploaded and downloaded in fine way, this particular file alone been downloaded as zip file while downloading it form s3 bucket.
I cannot provide the file because it is confidential so please leave suggestions if you have any solution for this ?
Note: the same file when it is uploaded in google drive and downloaded or also downloaded in safari it is downloaded fine the problem occurs when downloading it in chrome browser.
Try adding this to your config/initializers/mime_types.rb
[['application/vnd.openxmlformats-officedocument.presentationml.presentation', [[0..2000, 'ppt/']]],
['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', [[0..2000, 'xl/']]],
['application/vnd.openxmlformats-officedocument.wordprocessingml.document', [[0..2000, 'word/']]]].each do |magic|
MimeMagic.add(magic[0], magic: magic[1])
end
Don't forget to restart the server after :)

Using .zip files with Forge Design Automation for AutoCAD

I have a zip file containing several file types (.dwg,.xlsx,.pdf). If I specify a .zip file as input, I've noticed they're all accepted by Forge, but only .dwg's come back out. Is there anyway I can fix this?
Save your results to specific folder and finally create zip file.
ZipFile.CreateFromDirectory(CurrentDirectory + "\\Result", CurrentDirectory + "\\Result.zip");
This zip file set as result of your WorkItem.
Thanks to everyone who replied,
Ultimately, I create a project folder structure all my files are unzipped into (dwgs, pdfs, xlsx),beneath the working folder. My localname for both my input and result are identical in both the Activity and the Workitem. I recall Augusto telling me not to do this, but I have yet to run into an issue with it. In the end, my files get cycled in AutoCAD Core and saved to same location. DA zips the changed files and sends them to my endpoint. I took this approach, because if I save to changed files into a results folder, my modified dwg files and non-dwg files are now in two separate, adjacent locations. If there's a side affect of working with files in a single location, I'd like to know what it is.

iOS where should I download and store index.html

I want to download a Javascript/Html5 code in zip format and then unzip the code and load the index.html file in webview in iOS.
So where should I save this zip folder on iPhone ? Document Directory or cached Directory ?
All data that can be downloaded again most correct be stored in cached Directory. Files stored in Document folder will be synchronized with iCloud. See link. In your case, I think you need to store in cached.
Hope it helps you.
Better store it in document directory since your file should be available always.In Cache directory,you should store only those files which can be recreated easily. System may delete content of this directory (to free up the disk space) when it is required.

Read content of zip file without extracting that

is it possible to perfom some tasks on files in .zip file without really extracting it?
Thanks,
The zipfileset is a resource collection which represents the files within a zipfile.
So any Ant task which accept a resource collection as input (for instance the copy task) can deal with your files within the zip file.

How to refer file located in current application into file in SD card

I have a one script file in my current application.. The path for same look like this.
D:\myproj\Example\www\abc.js
while running my application in device it will download one file into my SDcard dynamically.
I need to parse my downloaded application and need to set this "abc.js" file path in this.
I can able to set path if my file is in SDCard , but dont know how to refer path which is in my current application..
If you have that file on SDCard, then the full path to it will be as follows:
file:///SDCard/myproj/Example/www/abc.js
ADDITIONAL INFO:
If your file is located in cod file, then there is a way, but it is not documented and it is not guaranteed that it will work on all devices and RIM OS versions.
Code below shows document.htm encapsulated in modulename.cod in BlackBerry browser.
BrowserSession session = Browser.getDefaultSession();
session.displayPage("cod://modulename/document.htm" );
Try to use cod://modulename/abc.js to specify path to your js file.
To reference an application embedded file (in this case an image file stored in images directory):
"file:///local/images/embedded_img.png"

Resources