Search Results

Search found 10693 results on 428 pages for 'reading'.

Page 14/428 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • Reading timecode track data using the C# version of Quicktime

    - by tinmaru
    Hi, I'm using the .Net activeX component of Quicktime. I would like to read the timecode track data contained in a QTMovie track. I can already select my timecode track like this : // Valid Quicktime movie QTMovie movie; QTUtils qtu = new QTUtils(); for (int i = 1; i <= movie.Tracks.Count; i++) { if (movie.Tracks[i].Type == qtu.StringToFourCharCode("tmcd")) { QTTrack tcTrack = movie.Tracks[i]; // // Timecode data reading ? // } Is there a way to extract the timecode data? Thank you for your help!

    Read the article

  • Reading data from a socket

    - by Bobby
    I am having issues reading data from a socket. Supposedly, there is a server socket that is waiting for clients to connect. When I write a client to connect() to the server socket/port, it appears that I am connected. But when I try to read() data that the server is supposedly writing on the socket, the read() function hangs until the server app is stopped. Why would a read() call ever hang if the socket is connected? I believe that I am not ever really connected to the socket/port but I can't prove it, b/c the connect() call did not return an error. The read() call is not returning an error either, it is just never returning at all.

    Read the article

  • How to get current compass reading android 2.1

    - by Brandon Delany
    How do I get the current compass reading in android 2.1? I know that I can initiate a listener and receive updates but I do not need constant updates I only need it to get the compass orientation when the user clicks a button. Also what is the most accurate way to get the compass orientation? Lastly, how do I send fake data to the android console. I know that you're supposed to use the terminal and send it commands but what are the commands I can't seem to find it on the Android website. Thank you

    Read the article

  • Reading files using Windows API

    - by Eli Polonsky
    Hi I'm trying to write a console program that reads characters from a file. i want it to be able to read from a Unicode file as well as an ANSI one. how should i address this issue? do i need to programatically distinguish the type of file and read acoordingly? or can i somehow use the windows API data types like TCHAR and stuff like that. The only differnce between reading from the files is that in Unicode i have to read 2 bytes for a character and in ASNSI its 1 byte? im a little lost with this windows API. would appretiate any help thanks

    Read the article

  • Effective methods for reading and writing large files in C

    - by Bertholt Stutley Johnson
    I'm writing an application that deals with very large user-generated input files. The program will copy about 95 percent of the file, effectively duplicating it and switching a few words and values in the copy, and then appending the copy (in chunks) to the original file, such that each block (consisting of between 10 and 50 lines) in the original is followed by the copied and modified block, and then the next original block, and so on. The user-generated input conforms to a certain format, and it is highly unlikely that any line in the original file is longer than 100 characters long. Which would be the better approach? a) To use one file pointer and use variables that hold the current position of how much has been read and where to write to, seeking the file pointer back and forth to read and write; or b) To use multiple file pointers, one for reading and one for writing. I am mostly concerned with the efficiency of the program, as the input files will reach up to 25,000 lines, each about 50 characters long. Thanks!

    Read the article

  • PHP fastest method of reading server response

    - by Peter John
    Hi there, im having some real problems with the lag produced by using fgets to grab the server's response to some batch database calls im making. Im sending through a batch of say, 10,000 calls and ive tracked the lag down to fgets causing the hold up in the speed of my application as the response for each call needs to be grabbed. I have found this thread http://bugs.php.net/bug.php?id=32806 which explains the problem quite well, but hes reading a file, not a server response so fread could be a bit tricky as i could get part of the next line, and extra stuff which i dont want. Any help much appreciated!

    Read the article

  • What is the best programming paper you have read?

    - by SDReyes
    I think that papers are a great information source. they generally tend to be built upon other experts investigations, and generally are short enough to transmit you great ideas in a short coffee read. But I don't really have read many papers in this area. So I would like to start soon and I'll be glad to hear your thoughts. So I wonder what have been the best programming paper you have read?

    Read the article

  • Why isn't this file reading/writing program working?

    - by user320950
    This program is supposed to read files and write them. I took the file open checks out because they kept causing errors. The problem is that the files open like they are supposed to and the names are correct but nothing is on any of the text screens. Do you know what is wrong? #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip> using namespace std; int main() { ifstream in_stream; // reads itemlist.txt ofstream out_stream1; // writes in items.txt ifstream in_stream2; // reads pricelist.txt ofstream out_stream3;// writes in plist.txt ifstream in_stream4;// read recipt.txt ofstream out_stream5;// write display.txt float price=' ',curr_total=0.0; int wrong=0; int itemnum=' '; char next; in_stream.open("ITEMLIST.txt", ios::in); // list of avaliable items out_stream1.open("listWititems.txt", ios::out); // list of avaliable items in_stream2.open("PRICELIST.txt", ios::in); out_stream3.open("listWitdollars.txt", ios::out); in_stream4.open("display.txt", ios::in); out_stream5.open("showitems.txt", ios::out); in_stream.close(); // closing files. out_stream1.close(); in_stream2.close(); out_stream3.close(); in_stream4.close(); out_stream5.close(); system("pause"); in_stream.setf(ios::fixed); while(in_stream.eof()) { in_stream >> itemnum; cin.clear(); cin >> next; } out_stream1.setf(ios::fixed); while (out_stream1.eof()) { out_stream1 << itemnum; cin.clear(); cin >> next; } in_stream2.setf(ios::fixed); in_stream2.setf(ios::showpoint); in_stream2.precision(2); while((price== (price*1.00)) && (itemnum == (itemnum*1))) { while (in_stream2 >> itemnum >> price) // gets itemnum and price { while (in_stream2.eof()) // reads file to end of file { in_stream2 >> itemnum; in_stream2 >> price; price++; curr_total= price++; in_stream2 >> curr_total; cin.clear(); // allows more reading cin >> next; } } } out_stream3.setf(ios::fixed); out_stream3.setf(ios::showpoint); out_stream3.precision(2); while((price== (price*1.00)) && (itemnum == (itemnum*1))) { while (out_stream3 << itemnum << price) { while (out_stream3.eof()) // reads file to end of file { out_stream3 << itemnum; out_stream3 << price; price++; curr_total= price++; out_stream3 << curr_total; cin.clear(); // allows more reading cin >> next; } return itemnum, price; } } in_stream4.setf(ios::fixed); in_stream4.setf(ios::showpoint); in_stream4.precision(2); while ( in_stream4.eof()) { in_stream4 >> itemnum >> price >> curr_total; cin.clear(); cin >> next; } out_stream5.setf(ios::fixed); out_stream5.setf(ios::showpoint); out_stream5.precision(2); out_stream5 <<setw(5)<< " itemnum " <<setw(5)<<" price "<<setw(5)<<" curr_total " <<endl; // sends items and prices to receipt.txt out_stream5 << setw(5) << itemnum << setw(5) <<price << setw(5)<< curr_total; // sends items and prices to receipt.txt out_stream5 << " You have a total of " << wrong++ << " errors " << endl; }

    Read the article

  • reading excel file in vb.net

    - by Mark
    can anyone help me on how to know EOF of excel using vb.net? i have this code but it crash when i try delete the proceeding rows from row 6 to downward. my problem is, my code was still reading a null values of rows that i deleted in excel.. this is my code: Dim xlsConn As New OleDbConnection Dim xlsAdapter As New OleDbDataAdapter Dim xlsDataSet As New DataSet xlsConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & pathName & " ; Extended Properties=Excel 8.0") strSQL = "SELECT * FROM [Sheet1$]" xlsAdapter.SelectCommand = New OleDbCommand(strSQL, xlsConn) xlsDataSet.Clear() xlsAdapter.Fill(xlsDataSet) ListView1.Items.Clear() Dim listItem As ListViewItem For ctr As Integer = 0 To xlsDataSet.Tables(0).Rows.Count - 1 listItem = ListView1.Items.Add(xlsDataSet.Tables(0).Rows(ctr).Item("EmpNo").ToString) listItem.SubItems.Add(xlsDataSet.Tables(0).Rows(ctr).Item("EmpName").ToString) Next Can anyone help me to fix this bugs!

    Read the article

  • reading unformatted fortran file in matlab - which precision?

    - by Griff
    I have just written out a file: real*8 :: vol_cel real*8, dimension(256,256,256) :: dense [... some operations] open(unit=8,file=fname,form="unformatted") write(8)dense(:,:,:)/vol_cell close(8) dense and vol_cell are real*8 variables. My code to read this in in Matlab: fid = fopen(fname,'r'); mesh_raw = fread(fid,256*256*256,'double'); fclose(fid); The min and max values clearly show that it is not reading it in correctly (Min is 0 and max is a largish positive real*8). min = 3.3622e+38 max = -3.3661e+38 What precision do I need to set in Matlab to make it read in the unformatted Fortran file? A somewhat related question: This Matlab code I am using reads binary files OK but not unformatted files. Though I am generating this new data on my Mac OSX using gfortran. It doesn't recognize form="binary" so I can't do it that way. Do I need to add some library?

    Read the article

  • how to open many files simultaneously for reading in c

    - by monkeyking
    I'm trying to port some of my c++ code into c. I have the following construct class reader{ private: FILE *fp; alot_of_data data;//updated by read_until() method public: reader(const char*filename) read_until(some conditional dependent on the contents of the file, and the arg supplied) } Im then instantiating hundreds of these object and iterate over them using several 'read_until()' for each file until allfiles is at eof. I'm failing to see any clever way to do this in c, the only solution I can come up with is making an array of FILE pointers, and do the same with all the private member data from my class. But this seems very messy, can I implement the functionality of my class as a function pointer, or anything better, I think I'm missing a fundamental design pattern? The files are way to big to have all in memory, so reading everything from every file is not feasible Thanks

    Read the article

  • Reading from a file not line-by-line

    - by MadH
    Assigning a QTextStream to a QFile and reading it line-by-line is easy and works fine, but I wonder if the performance can be inreased by first storing the file in memory and then processing it line-by-line. Using FileMon from sysinternals, I've encountered that the file is read in chunks of 16KB and since the files I've to process are not that big (~2MB, but many!), loading them into memory would be a nice thing to try. Any ideas how can I do so? QFile is inhereted from QIODevice, which allows me to ReadAll() it into QByteArray, but how to proceed then and divide it into lines?

    Read the article

  • boost.asio error on read from socket.

    - by niXman
    The following code of the client: typedef boost::array<char, 10> header_packet; header_packet header; boost::system::error_code error; ... /** send header */ boost::asio::write( _socket, boost::asio::buffer(header, header.size()), boost::asio::transfer_all(), error ); /** send body */ boost::asio::write( _socket, boost::asio::buffer(buffer, buffer.length()), boost::asio::transfer_all(), error ); of the server: struct header { boost::uint32_t header_length; boost::uint32_t id; boost::uint32_t body_length; }; static header unpack_header(const header_packet& data) { header hdr; sscanf(data.data(), "%02d%04d%04d", &hdr.header_length, &hdr.id, &hdr.body_length); return hdr; } void connection::start() { boost::asio::async_read( _socket, boost::asio::buffer(_header, _header.size()), boost::bind( &connection::read_header_handler, shared_from_this(), boost::asio::placeholders::error ) ); } /***************************************************************************/ void connection::read_header_handler(const boost::system::error_code& e) { if ( !e ) { std::cout << "readed header: " << _header.c_array() << std::endl; std::cout << constants::unpack_header(_header); boost::asio::async_read( _socket, boost::asio::buffer(_body, constants::unpack_header(_header).body_length), boost::bind( &connection::read_body_handler, shared_from_this(), boost::asio::placeholders::error ) ); } else { /** report error */ std::cout << "read header finished with error: " << e.message() << std::endl; } } /***************************************************************************/ void connection::read_body_handler(const boost::system::error_code& e) { if ( !e ) { std::cout << "readed body: " << _body.c_array() << std::endl; start(); } else { /** report error */ std::cout << "read body finished with error: " << e.message() << std::endl; } } On the server side the method read_header_handler() is called, but the method read_body_handler() is never called. Though the client has written down the data in a socket. The header is readed and decoded successfully. What's the error?

    Read the article

  • Reading membership section from web.config in C#

    - by PlayKid
    Hi there, I have created a custom MembershipProvider class, so far so good, however, I am not sure how to read the configuration settings from the web.config file. I tried to search from Google and Stackoverflow, seems like someone also experiencing my problem and asked, but no answer has been given. It should be a simple thing, but I am very new in web development, so reading settings from web.config seems away too technical to me. Here is my settings: <membership defaultProvider="CustomMembershipProvider"> <providers> <clear/> <add name="CustomMembershipProvider" type="Test.Models.CustomMembershipProvider,Test" passwordFormat="Hashed" connectionStringName="ApplicationServices" minRequiredPasswordLength="8" minRequiredNonalphanumericCharacters="0" maxInvalidPasswordAttempts="5" enablePasswordReset="false" enablePasswordRetrieval="false" requiresQuestionAndAnswer="false" applicationName="/"/> </providers> </membership I would like to read the minRequiredPasswordLength setting, please assist. Thanks alot in advance.

    Read the article

  • reading and writing QByteArrays

    - by synchronicity
    I'm having trouble reading and writing QByteArray data to a file. My goal is to save QPixmap data into a QByteArray and save that QByteArray to a file (with the ability to read this QByteArray back from the file and into a QPixmap). I want to use following code from the QPixmap documentation: QPixmap pixmap(<image path>); QByteArray bytes; QBuffer buffer(&bytes); buffer.open(QIODevice::WriteOnly); pixmap.save(&buffer, "PNG"); // writes pixmap into bytes in PNG format After writing the buffer to a file, I want to be able to retrieve the QByteArray and load it back into a QPixmap using the QPixmap::loadFromData() function. Please let me know if any further clarification is needed (I'm open to alternative approaches as well, I just need to be able to read and write the QPixmap to a file! :) );

    Read the article

  • Issues reading CSV file using OLEDB when filenamen have period

    - by Rodel Dagumampan
    Issues reading CSV file using OLEDB when filenamen have period. I have a code in C# that reads CSV File using OleDBProvider. It works perfect with filenames in regular format such as Budget.csv but failed when i renamed the file into Budget.DKK.csv or Budget.USD.csv I throws this exception: he Microsoft Jet database engine could not find the object 'Budget.DKK.csv'. Make sure the object exists and that you spell its name and the path name correctly. I have no idea so far why is this happenning.

    Read the article

  • Matlab time stamps reading

    - by Paul
    Any easy way to read all the columns in Matlab? my format is date time y1 y2 y3 y4 ......................... 4/27/2010 00:3:09 34 45 45 56 ................ so on currently i am reading these with the code [c,pathc]=uigetfile({'*.txt'},'Select the data','C:\Data'); file=[pathc c]; data= dlmread(file, ',', 1,3); so needless to say i am skipping the time stamps. Was wondering if there is aeasy way to read the time stamps and plot my other colums agianst the time in hours. my files are 43200 X 30 and some are 86400 X 90 Related question : is the format same for .csv and .xls files , i mean except ofcourse xlsread

    Read the article

  • reading csv file without for

    - by Abruzzo Forte e Gentile
    Hi All I need to read a CSV file in python. Since for last row I receive a 'NULL byte' error I would like to avoid using for keyword but the while. Do you know how to do that? reader = csv.reader( file ) for row in reader # I have an error at this line # do whatever with row I want to substitute the for-loop with a while-loop so that I can check if the row is NULL or not. What is the function for reading a single row in the CSV module? Thanks Thanks p.S. below the traceback Traceback (most recent call last): File "FetchNeuro_TodayTrades.py", line 189, in for row in reader: _csv.Error: line contains NULL byte

    Read the article

  • Reading Microsoft word document in iphone

    - by Arnieterm
    Hi All Using CGPDFDocument class we can read pdf document, get number of pages, get a page by number. Is there any other library that helps us reading word documents like microsoft word doc where we can get number of pages and get a page by its number etc? Do not want to use safari to view the document. I have seen some apps on app store that claims to read MS Office docs like docx, xlsx etc. Does there exists any library [even static] that we can make use of? Any idea? Thanks Arnieterm

    Read the article

  • asynchronous writing and reading of a file

    - by tazim
    hi, I have two processes. 1.) One processes is redirecting output of some unix command to a file on server side.the data is always appended to the file eg : find / > tmp.txt 2.)Another process is opening and reading the same file and storing it in a string and sending the entire string to the client Now, this things take simultaneously. I am using python. Any suggestion as in what can be possible ways to implement this scenario . Please explain with sample code . Thanks in advance . Tazim.

    Read the article

  • Reading programming tutorials while at work

    - by Teifion
    I work in a call centre and have been told by my manager that when there are no calls coming through they're happy for me to read stuff on the internet. There is a net filter in place but I can access SO from work which is always handy. I'm searching for articles that will make me a generally better programmer. I code in Python but combine it with Postgres and JS quite a lot if that helps. I'm currently reading Dive into python3 but I fear it won't last me much longer and would really like to expand my programming ability.

    Read the article

  • How do I read hex numbers into an unsigned int in C [Solved]

    - by sil3nt
    I'm wanting to read hex numbers from a text file into an unsigned integer so that I can execute Machine instructions. It's just a simulation type thing that looks inside the text file and according to the values and its corresponding instruction outputs the new values in the registers. For example, the instructions would be: 1RXY - Save register R with value in memory address XY 2RXY - Save register R with value XY BRXY - Jump to register R if xy is this and that etc.. ARXY - AND register R with value at memory address XY The text file contains something like this each in a new line. (in hexidecimal) 120F B007 290B My problem is copying each individual instruction into an unsigned integer...how do I do this? #include <stdio.h> int main(){ FILE *f; unsigned int num[80]; f=fopen("values.txt","r"); if (f==NULL){ printf("file doesnt exist?!"); } int i=0; while (fscanf(f,"%x",num[i]) != EOF){ fscanf(f,"%x",num[i]); i++; } fclose(f); printf("%x",num[0]); }

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >