QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

How can I read/write structs from/to data files?

Infrequently Asked Questions in comp.lang.c
Loop with putchar. Be careful; if your machine uses signed chars by default, all of the sign bits in your structure elements will be reversed. [a]

How do I read/write files?

JavaScript - Frequently Asked Questions - CodingForums.com
Pure client-side JavaScript cannot write files to the server because it simply was never intended to and moreover, that's what server-side languages are used for. Perhaps there are security reasons among others for this as well. for reading files with JavaScript, this is completely possible and done quite easily if you use something like Vlad's script or David's script.

I need to read/write files. How do I find the correct path for my site?

hsphere faq
The correct way to do this would be using Server.MapPath. This would map the virtual path to a physical location on the disk. Ex. If you have a file in your root web called visitor.txt and you use Server.MapPath("/visitor.txt") and the physical path to you root web was "F:\webs\yourweb" then it would return: "F:\webs\yourweb\visitor.txt" If you use this method you should never have to worry about the physical paths.

How can I read/write structures from/to data files?

Structures, Unions, and Enumerations
It is relatively straightforward to write a structure out using fwrite: fwrite(&somestruct, sizeof somestruct, 1, fp); and a corresponding fread invocation can read it back in. What happens here is that fwrite receives a pointer to the structure, and writes (or fread correspondingly reads) the memory image of the structure as a stream of bytes. The sizeof operator determines how many bytes the structure occupies.

Can I read and write files from a kernel module?

Unofficial comp.os.linux.development.* FAQ
Yes, but it is a little tricky. You should not use the usual user space functions open, read, write, and close. Instead you should use filp_open and the methods in the returned struct. Always remember to cleanup after yourself. Here is an example: (FIXME: Put the updated version here) kcp.c. If you need more examples I suggest you take a look on the sourcecode for the khttpd or tux webserver. Always remember that file access is only possible in a process context.

When I read and write graphics files they have errors. Why?

REBOL Language FAQ
Be sure to use the /BINARY refinements on READ and WRITE when dealing with binary data such as graphics, programs, compressed data, etc. data: read/binary http://web.page.org/pic.jpg write/binary %some-pic.jpg data If you don't, the file will be read as a text string, and any bytes that appear to be line terminations (CR) will be converted or deleted.

How can I read and write from a database?

FAQ - iMacros
Database integration is very easy with iMacros thanks to its powerful Scripting Interface. iMacros can connect to any Windows database, for example Access or SQL Server, but also MySQL. The Scripting Interface can be used from any Windows programming or scripting language like Excel VBA, Foxpro, Perl, C, C++, Java with no problems. Please see the following example scripts: "extract-2-file.vbs" (uses wsh-extract-and-fill-part1 and wsh-extract-and-fill-part1 macros) "extract-2-database.

How can I read signal files?

Frequently Asked Questions about PhysioNet
If you would like to read signal files within a C, C++, Fortran, Java, Perl, or Python program, see the WFDB Programmer's Guide for information on doing this using the WFDB library. Other programming languages supported by SWIG may also be usable with the WFDB library, but have not been tested. Briefly, use isigopen() to open the files, and getvec() to read them.

How can I read annotation files?

Frequently Asked Questions about PhysioNet
If you would like to read annotation files within a C, C++, Fortran, Java, Perl, or Python program, see the WFDB Programmer's Guide. Other programming languages supported by SWIG may also be usable with the WFDB library, but have not been tested. Briefly, use annopen() to open the files, and getann() to read annotations from them.

How do I read the download files on this website?

Frequently Asked Questions (FAQs)
pipe-delimited text (.txt) format files (OTCBB Symbol Directory, Daily List, Monthly Share Volume, etc.); self-extracting ZIP (.exe) files that expand into pipe-delimited text format files (Monthly Share Volume Report, Market Maker List, Other-OTC Symbol Directory, etc.). This information will need to be saved to your computer. Select File from the menu bar, then select the Save As... option You can now import the data into a spreadsheet or database.

Why are some files in PDF format, and how can I read them?

FRB: FAQs
Adobe's Portable Document Format (PDF) reproduces the exact look of a printed page and is used for documents that could not be readily deployed in hypertext markup language (HTML)--the "typeset" format that is designed for web browsers--or in the plain "typewriter" text of ASCII (American Standard Code for Information Interchange). Also, the document may be offered in PDF along with one or both of the other two formats.

Can one read/write files from PL/SQL?

PL/SQL FAQ - Oracle FAQ
A DBA user needs to grant you access to read from/ write to a specific directory before using this package. Here is an example: CONNECT / AS SYSDBA CREATE OR REPLACE DIRECTORY mydir AS '/tmp'; GRANT read, write ON DIRECTORY mydir TO scott; Provide user access to the UTL_FILE package (created by catproc.sql): GRANT EXECUTE ON UTL_FILE TO scott; Write File DECLARE fHandler UTL_FILE.FILE_TYPE; BEGIN fHandler := UTL_FILE.FOPEN('MYDIR', 'myfile', 'w'); UTL_FILE.

How i can get read and write access to ntfs files system from fedora?

Fedora For Newbies
Fedora kernel has module for read and write access to the ntfs file system, that should be enabled, now the easy way for installed kernel is to install the kernel version ntfs modules get the lates fedora core 5 kernel ntfs moudle from here or use the yum to install the module:

Can I read/write ascii text files with the AID language?

Answers to Questions
Yes, Unibase by DMAC does allow read/write of ascii text files with the AID language. These text files must be in the "text" sub-directory under the ETROOT. They may NOT have an extension in the name. Sub-directories may exist under the "text" sub-directory.

Can I read and write plain text files which contain tabular data?

NExS (X/Motif GUI Spreadsheet) Frequently Asked Questions
Yes. NExS attempts to intelligently parse plain text by looking for vertical columns of ''white space'' (space or tab characters), assuming that's where the data should be cut into columns. Of course, this is not always what is intended, so there are adjustable parameters on the ''Import/Export Options'' dialog to tweak the way the file is cut into columns.

How can I read and write pltgks netcdf files from fortran?

Radar Meteorology Group Frequently Asked Questions
Three routines have been created to make it easier to read and write pltgks netcdf files in fortran. To read a pltgks netcdf file you first call 'readinfd' to read the header information and then 'readat' to read the data. To write a pltgks netcdf file you call 'wrtdatd'. A description of the subroutines can be found at http://olympic.atmos.colostate.edu/software/rwpltgks.txt. Yes you can. A sample program showing and describing how it can be done is available at http://olympic.atmos.colostate.

Can't Gartrip read and write files for Mapsource and Google Earth?

GARtrip FAQ
It can't read and write the special file formats of those programs, but with the general purpose file format GPX this is possible - for Googel Earth with KML as well.. Why not use the GPX file format in general, to save user data, instead of the special file formats of Gartrip? Then I would not need to convert my data each time I want to access it with another program. This is not recommended because Gartrip, like all other programs, saves additional data in its own format.

Is there a library to read or write Microsoft Office or other application files?

perlwin32faq9 - Modules and sample scripts
In general, there aren't any library modules to read or write application files, like Microsoft Word, Microsoft Excel, Microsoft Access, WordPerfect, Lotus 1-2-3, etc. However, many if not most major Windows applications now support OLE Automation. You can use the OLE Automation support of Microsoft Office applications to read and write their file formats, for example. See the documentation on your application for information on its support for OLE Automation.

Can I use NEOS to read separate input files or write separate output files?

NEOS Server FAQ
For security reasons, we don't allow submissions to read or create files after they have been received by NEOS. There are alternatives that can achieve a similar effect, however. If you have your own copy of the GAMS or AMPL modeling language software, then you can use GAMS or AMPL to read your files locally, before sending your problem to NEOS. Also you can have the results returned to your local GAMS or AMPL environment, wehre you can write whatever files you need.

Q10: How do I check out a module with read-write access?

CDCVS FAQ
business for the checked out module. You shouldn't have to type it again to do updates, commits, etc.
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact