file-format

Unable to transfer large .csv row count to Excel 2007

僤鯓⒐⒋嵵緔 提交于 2019-12-02 03:21:07
I've been using the below VBScript code snippet to move an hourly .csv drop to an Excel file. It works like clockwork except recently the .csv crossed the 65536 row limitation. The machine is flooded with popups from Compatibility Checker and then I realized it was using Excel 2003 even through Excel 2007 is installed. Not sure why this happens even when Excel.Application.12 object is explicitly invoked: Dim oExcel Set oExcel = CreateObject("Excel.Application.12") With oExcel .DefaultSaveFormat=51 .Workbooks.Open sourceFile .Sheets(1).Columns("A").TextToColumns .Range("A1"), xlDelimited, , , ,

how to force that any file of a certain type will open with my program?

只谈情不闲聊 提交于 2019-12-01 14:11:20
i have build program that can open *.sdf files and show all the table & the data. how to force that any *.sdf file in my computer will open with my program ? thank's in advance If you have a Deployment project for your program it is easy to do with the File Types Editor: Select your deployment project Click on the File Types Editor button Right click on the "File Types on Target Machine" Add File Type Use the Extensions property on your new File Type to specify one or more file extensions to be associated with your program. In the Command property choose "Primary output" from your application.

File format limits in pixel size for png images?

假如想象 提交于 2019-12-01 03:23:09
Is there a file format limit to the PNG pixel size? I am trying to visualize a 30.000x30.000 pixels PNG image with Firefox, but I get an error. The image opens correcly in Preview.app, although very slowly. The file size is not big, just around 3 MiB (1 bit black/white image). I am wondering if there's a technical file-format reason for this. A naive implementation of resizing would require the image to be blown up to 2.7GB in size before it is displayed. This would clearly be too large for a normal 32-bit program to handle. The PNG specification doesn't appear to place any limits on the width

How to get the length of a file in MATLAB?

痴心易碎 提交于 2019-11-30 22:56:31
Is there any way to figure out the length of a .dat file (in terms of rows) without loading the file into the workspace? Row Counter -- only loads one character per row: Nrows = numel(textread('mydata.txt','%1c%*[^\n]')) or file length (Matlab): datfileh = fopen(fullfile(path, filename)); fseek(datfileh, 0,'eof'); filelength = ftell(datfileh); fclose(datfileh); I'm assuming you are working with text files, since you mentioned finding the number of rows. Here's one solution: fid = fopen('your_file.dat','rt'); nLines = 0; while (fgets(fid) ~= -1), nLines = nLines+1; end fclose(fid); This uses

Design pattern for multiple output formats

☆樱花仙子☆ 提交于 2019-11-30 20:27:34
I have a class structure which represents (internally) the data I wish to output to a file. Some of the member variables are private to the data class so that it can manage itself and stop things going awry. I then want this data to be output into a number of file formats. I could do something like savefile_formatA(DataClass* pDataClass, ofstream& fout); savefile_formatB(DataClass* pDataClass, ofstream& fout); except that the functions need to then see the private member variables of DataClass . I could of course just make savefile_formatXYZ() friend functions but then I would need to add a

Specification of JKS key store format

假如想象 提交于 2019-11-30 20:18:11
I was wondering if there exists an official specification of the JKS key store format used in Java? I'd like to write a converter from/to PKCS#12, but not in Java, so keytool or Java code is not an option unfortunately. Looking at one in a hex editor tells me that it's probably not ASN.1. Before I start digging into OpenJDK, trying to reverse-engineer the format, does anyone know if there exists a spec maybe? I couldn't find anything so far, any help would be much appreciated! I think you should start your research at JDK sources . There are some very useful comments there. E.g. /* * KEYSTORE

python: edit ISO file directly

ぐ巨炮叔叔 提交于 2019-11-30 16:03:42
问题 Is it possible to take an ISO file and edit a file in it directly, i.e. not by unpacking it, changing the file, and repacking it? It is possible to do 1. from Python? How would I do it? 回答1: Of course, as with any file. It can be done with open/read/write/seek/tell/close operations on a file. Pack/unpack the data with struct/ctypes. It would require serious knowledge of the contents of ISO, but I presume you already know what to do. If you're lucky you can try using mmap - the interface to

python: edit ISO file directly

本小妞迷上赌 提交于 2019-11-30 15:47:09
Is it possible to take an ISO file and edit a file in it directly, i.e. not by unpacking it, changing the file, and repacking it? It is possible to do 1. from Python? How would I do it? Of course, as with any file. It can be done with open/read/write/seek/tell/close operations on a file. Pack/unpack the data with struct/ctypes. It would require serious knowledge of the contents of ISO, but I presume you already know what to do. If you're lucky you can try using mmap - the interface to file contents string-like. Have you seen Hachoir , a Python library to "view and edit a binary stream field by

Convert text to image file on Android

与世无争的帅哥 提交于 2019-11-30 07:36:13
I have a text document (.txt). I want to convert it to an image (.png or .jpg). For example, black text on white background. How can I do that programmatically? this (untested) code should get you on the right track. void foo(final String text) throws IOException{ final Paint textPaint = new Paint() { { setColor(Color.WHITE); setTextAlign(Paint.Align.LEFT); setTextSize(20f); setAntiAlias(true); } }; final Rect bounds = new Rect(); textPaint.getTextBounds(text, 0, text.length(), bounds); final Bitmap bmp = Bitmap.createBitmap(bounds.width(), bounds.height(), Bitmap.Config.RGB_565); //use ARGB

Standard UML file format

早过忘川 提交于 2019-11-30 06:39:45
I have designed UML diagrams in different tools (StarUML, BoUML, Papyrus, Omondo, Rational Rose, etc.) depending on the project and the date (rose was first, after Omondo, then starUMl, ..., now papyrus). However, I see that I cannot open my old UML diagrams because the tool is obsolete. I would like to know if there is a standard format for UML diagrams. Probably not in production, but at least to know if there is proposal of standard format. Probably, Eclipse is doing something like that with the M2 project, but do the other tools (not eclipse based) are interested in reading this format.?