Search Result

Collapse
18 results in 0.0060 seconds.
Keywords
Members
Tags
read
  •  

  • How do I use .htaccess to stop webserver listing all files in directory?

    Hi guys,

    Currently in my webserver I got a directory call: ..../htdocs/upload/

    Currently, all files are listed when users go to www.mysite.com/upload/

    The way it works, when user click on a file link in my system, they redirected to this directory like this:

    www.mysites.com/upload/invoice.txt

    So If I have

    Code:
    deny from all
    It stops listing all files but in the...
    See more | Go to post

  • Prasanna CRN
    started a topic Perl read() & write() with File Handle
    in Perl

    Perl read() & write() with File Handle

    Hi Friends,
    I am trying to write a script to split file with the size as an argument.

    Based on the size, i am trying to read for Input File & Dump it to output File.

    But, read() returns the number of bytes actually being read (for ex : file split size as 200 bytes), while printing, output file size is greater(213 bytes) than actual read. I could not guess the reason. Please help me with this.
    See more | Go to post

  • Leonne
    started a topic fstream.read() Not Reading Anything At All.
    in C

    fstream.read() Not Reading Anything At All.

    Hi guys.
    I'm trying to read the first line of an MP3 file (I edited this mp3 file to contain the text "I'm an MP3" right at the beginning of the file).

    This is what I'm trying to do:

    Code:
    #include <iostream>
    #include <string>
    #include <fstream>
    using namespace std;
    
    int main()
    {
        fstream mp3;
        mp3.open("05 Imagine.mp3",
    ...
    See more | Go to post

  • Ramsin
    started a topic Downloading (a webpage) in C++
    in C

    Downloading (a webpage) in C++

    Hi, I'm fairly new to socket/network programming.
    Code:
    #include <iostream>
    #include <cstring>
    #include <cstdlib>
    #include <fstream>
    #include <sys/socket.h>
    #include <sys/types.h>
    #include <netinet/in.h>
    #include <arpa/inet.h>
    
    using namespace std;
    int main() {
    	int sockfd;
    	sockaddr_in addr;
    	char rqt[]
    ...
    See more | Go to post

  • nervusvagus
    started a topic How to count letters in a text file?

    How to count letters in a text file?

    Following is a code that counts the number of letters in a text file named "alice_in_wonde rland.txt"
    So far I only have text: aaaaa bbbb cccc
    in the text file:


    Code:
    # countletters.py
    
    def display(i):
    	if i == 10: return 'LF'
    	if i == 13: return 'CR'
    	if i == 32: return 'SPACE'
    	return chr(i)
    	
    infile = open('alice_in_wonderland.txt', 'r')
    text = infile.read()
    ...
    See more | Go to post
    Last edited by nervusvagus; Jan 7 '11, 07:57 AM. Reason: update in error

  • Alex T
    started a topic How to get position of a search in the text file?
    in C

    How to get position of a search in the text file?

    Hello, I have a bit of a problem here: I am trying to make the search find the positions of a string in the text file.

    The .txt file is very large and the string comes up multiple times, so I need a way to delete part of the txt file up to the point I see the first occurence of the word

    Here is my code:

    Code:
    #include <iostream>
    #include <iomanip>
    #include <fstream>
    ...
    See more | Go to post

  • Alex T
    started a topic How to make a C++ program read numbers from a web site?
    in C

    How to make a C++ program read numbers from a web site?

    Let's say I have a website about statistics, which had 4 numbers. How would I make my c++ program open the website and read the numbers, then write them to a text file?

    For a start, I have only this idea, and have no clue about how I would begin. If you can help, please do.
    See more | Go to post

  • phpuser123
    started a topic what is the problem in the following code?
    in Java

    what is the problem in the following code?

    # import java.io.IOExcep tion;
    #
    # class Toread
    # {
    # public static void main(String args[])
    # {
    # int x;
    # System.out.prin tln("Enter a digit");
    # try
    # {
    # x= System.in.read( );
    # System.out.prin tln("Entered Value:"+x);
    # }
    #...
    See more | Go to post

  • Efficient way of setting up read/unread system

    Does anyone know a good resource explaining the most efficient way to setup a read/unread system?

    I have a system with about 50 users, and I would like to setup a system where they can view what items are new or unread.

    I imagine there a quite a few ways of doing this, and I think I could spend quite a bit of time on this, so I want to make sure I set it up the most efficiently from the start.

    Such questions...
    See more | Go to post

  • Thebuilderofdoom
    started a topic How to use brackets in Python?

    How to use brackets in Python?

    Code:
    nubr1 = 0
    s = open("C:/DsE2/T1.txt").read()
    
    while nubr1 <=5:
        lib1l[nubr1] = open("C:/DsE2/lib001.txt").readlines()[nubr1]
        lib2l[nubr1] = open("C:/DsE2/lib002.txt").readlines()[nubr1]
        s = s.replace( lib1l[nubr1] ,lib2l[nubr1] )
        nubr1 = nubr1 + 1
    
    
    f = open("C:/DsE2/T1.txt", 'w')
    f.write(s)
    f.close()
    is this...
    See more | Go to post
    Last edited by bvdet; Mar 15 '10, 02:29 AM. Reason: Add indentation

  • Thebuilderofdoom
    started a topic Go to a specific line in python?

    Go to a specific line in python?

    i want to go to line 34 in a .txt file and read it how would you do that? In python?
    See more | Go to post

  • elvan
    started a topic I cant use console.readline after console.read

    I cant use console.readline after console.read

    Code:
    using System;
    namespace namespace1
    {
        class class1
        {
            static void Main(String[] args)
            {
                Console.WriteLine("What is your initial?");
                int name1 = Console.Read();     
                char ch = Convert.ToChar(name1);
                Console.WriteLine("What is your name again?");
                string name2 = Console.ReadLine();
    ...
    See more | Go to post
    Last edited by tlhintoq; Feb 10 '10, 12:30 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]

  • PatriDa
    started a topic Reading from a binary file
    in C

    Reading from a binary file

    I need to read form a binary file, which stores data, an array of bytes, but without interpreting them (I mean: I cannot read them as int, or double....). I need them just as bytes. Later on, I will be able to interpret them as corresponds, because I will have information about the data type, so I can say "read them as int or as double".

    Can anyone help me, and explain me which is the best way to read them? I have thought to...
    See more | Go to post

  • harmikm
    started a topic Sequential read and update of table

    Sequential read and update of table

    Using OleDb, is it possible to sequentially read a (Access) table and update some records in it?

    The read (ExecuteReader) works fine, but when I attempt to update, I get a message telling me I have to close the reader connection first before updating, which defeats the purpose of the reader.

    The update examples in the documentation use select then update. In my application the records must be read in chronological order....
    See more | Go to post

  • Demon4231
    started a topic Reading XML nodes

    Reading XML nodes

    I have a XML file that stores information about an application I am trying to read and it looks like this:

    Code:
    <Data>[INDENT]     <Login UserName="Username" Password="Password"/>
         <Application Name="AppName1" Key="Key1" Owner="Owner1"/>
         <Application Name="AppName2" Key="Key2" Owner="Owner2"/>
         <Application Name="AppName4"[/]
    ...
    See more | Go to post
    Last edited by PRR; Sep 23 '09, 01:24 PM. Reason: Code tags added.
Working...