Search Results

Search found 30085 results on 1204 pages for 'read only'.

Page 25/1204 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Decompressing file with gzip produces file with no read-permissions on Windows 7

    - by Abiel
    I am attempting to decompress a .gz file using the GnuWin32 gzip program in Windows 7. I have full permissions on the compressed file, and my user account is an administrator. However, I end up not having read permissions on the decompressed file. To get read permissions I would have to manually change the permissions on it through right-clicking and selecting Properties Security. I am able to do this exact same thing with no permission problems in Windows XP, which leads me to believe that Windows 7's user account control system is causing problems. Does anyone know what I can do to make things work as I would expect (read permission on the decompressed file) in Windows 7? Thanks.

    Read the article

  • Get python tarfile to skip files without read permission

    - by chris
    I'm trying to write a function that backs up a directory with files of different permission to an archive on Windows XP. I'm using the tarfile module to tar the directory. Currently as soon as the program encounters a file that does not have read permissions, it stops giving the error: IOError: [Errno 13] Permission denied: 'path to file'. I would like it to instead just skip over the files it cannot read rather than end the tar operation. This is the code I am using now: def compressTar(): """Build and gzip the tar archive.""" folder = 'C:\\Documents and Settings' tar = tarfile.open ("C:\\WINDOWS\\Program\\archive.tar.gz", "w:gz") try: print "Attempting to build a backup archive" tar.add(folder) except: print "Permission denied attempting to create a backup archive" print "Building a limited archive conatining files with read permissions." for root, dirs, files in os.walk(folder): for f in files: tar.add(os.path.join(root, f)) for d in dirs: tar.add(os.path.join(root, d))

    Read the article

  • How to read an XML file with Java?

    - by Yatendra Goel
    I don't need to read complex XML files. I just want to read the following configuration file with a simplest XML reader <config> <db-host>localhost</db-host> <db-port>3306</db-port> <db-username>root</db-username> <db-password>root</db-password> <db-name>cash</db-name> </config> How to read the above XML file with a XML reader through Java?

    Read the article

  • file corruption on read/write 2.6.32-22-server (happens across many kernels)

    - by Jonathan
    Hi Guys, I'm having an issue where after the server has been up for a period of time (~week/few days) the server will start reading corrupt data. For instance when I run a sha1sum of a file after a fresh boot it remains the same. However after a while I will start to get segfaults and from then on whenever I read this file I get a different sha1sum. I've checked S.M.A.R.T with long tests and I've run an extended memtest86+(12 passes) My lspci is as follows: 00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge 00:01.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (int gfx) 00:06.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2) 00:07.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 3) 00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [AHCI mode] 00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller 00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller 00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller 00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller 00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller 00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller 00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c) 00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller 00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller 00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge 00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller 00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration 00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map 00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller 00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control 00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control 01:05.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3300 Graphics 01:05.1 Audio device: ATI Technologies Inc RS780 Azalia controller 02:00.0 Ethernet controller: Atheros Communications Atheros AR8121/AR8113/AR8114 PCI-E Ethernet Controller (rev b0) 03:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. Device 3403 I could really use some help on this, do you have any idea what could cause this? It's really frustrating me as it seems to trigger entirely randomly and will not go away until I reboot. I'm also use KVM for virtualization as well as MD for software RAID on this server and the processor is a Phenom II X4 965. I don't believe it's the software raid however as this affects files also hosted on non-raid partitions so I don't know.

    Read the article

  • how to read the txt file from the database(line by line)

    - by Ranjana
    i have stored the txt file to sql server database . i need to read the txt file line by line to get the content in it. my code : DataTable dtDeleteFolderFile = new DataTable(); dtDeleteFolderFile = objutility.GetData("GetTxtFileonFileName", new object[] { ddlSelectFile.SelectedItem.Text }).Tables[0]; foreach (DataRow dr in dtDeleteFolderFile.Rows) { name = dr["FileName"].ToString(); records = Convert.ToInt32(dr["NoOfRecords"].ToString()); bytes = (Byte[])dr["Data"]; } FileStream readfile = new FileStream(Server.MapPath("txtfiles/" + name), FileMode.Open); StreamReader streamreader = new StreamReader(readfile); string line = ""; line = streamreader.ReadLine(); but here i have used the FileStream to read from the Particular path. but i have saved the txt file in byt format into my Database. how to read the txt file using the byte[] value to get the txt file content, instead of using the Path value.

    Read the article

  • Socket read() hangs for a while when there is no data to read.

    - by janesconference
    Hi' I'm writing a simple http port forwarder. I read data from port 80, and pass the data to my lighttpd server, on port 8080. As long as I write() data on the socket on port 8080 (forwarding the request) there's no problem, but when I read() data from that socket (forwarding the response), the last read() hangs a lot (about 1 or 2 seconds) before realizing there's no more data and returning 0. I tried to set the socket to non-blocking, but this doesn't work, as sometimes it returns EWOULDBLOCKING even if there's some data left (lighttpd + cgi can be quite slow). I tried to set a timeout with select(), but, as above, a slow cgi could timeout the socket when there's actually some data to transmit. How would you do?

    Read the article

  • How To Read Data using Ip Address

    - by DATT OZA
    I am doing punch card reader programming.. Establish connection with BioAccess V2 Device... socket successdully connected but data can't read... so how to read data ? Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream,ProtocolType.Tcp); var ipaddress = IPAddress.Parse("192.168.000.111"); IPAddress add = new IPAddress(ipaddress.GetAddressBytes()); EndPoint ep = new IPEndPoint(add, 5005); sock.Connect(ep); if(sock.connected) { } now what i have to do in IF BLOCK to read data ?

    Read the article

  • samba windows gvim & "READ ERRORS"

    - by l.thee.a
    I have a samba server on my embedded box. I was planning to use it to edit files easily. However when I open files on my windows machine, I get read errors. I have tried textpad, gvim and kate(andLinux). On gvim I first get "write error in swap file" and it is replaced by "[READ ERRORS]". If I access the same file through pyNeighborhood (ubuntu) I can read/write/delete etc. Samba security is set to share and guest user is root. Also if I move the file to my ubuntu samba server, I get no problems. Any ideas? PS: I am using smbd 3.0.25b.

    Read the article

  • Read a remote zipped xml with just XSL

    - by Emaguel
    Hello there I want to know if it's possible for an XSLT file to read data from an XML located within folders of a remote zip(from the server at work), without any external processors (saxon and so forth) and without downloading it. Failing that, I'll resort to just reading the information from the zip... which brings me to my other (newb)issue. I currently have an XSLT that accesses and gets the data from the downloaded and extracted XML file, but I can't do this without extracting it. I've read that with Altova and xslt 2.0 it is possible to read from within a zip file using the document() function, though, as of yet I have not been able achieve this. this is how I'm trying to do it: document('name.zip|zip/folder/folder2/iwantthis.xml') It just doesn't seem to find the file. I'd be almost eternally grateful if you show me the error of my ways and guide me into XSLThood. Thank you kindly

    Read the article

  • how to read the txt file from database(byte[] to filestream)

    - by Ranjana
    i have stored the txt file to sql server database . i need to read the txt file line by line to get the content in it. my code : DataTable dtDeleteFolderFile = new DataTable(); dtDeleteFolderFile = objutility.GetData("GetTxtFileonFileName", new object[] { ddlSelectFile.SelectedItem.Text }).Tables[0]; foreach (DataRow dr in dtDeleteFolderFile.Rows) { name = dr["FileName"].ToString(); records = Convert.ToInt32(dr["NoOfRecords"].ToString()); bytes = (Byte[])dr["Data"]; } FileStream readfile = new FileStream(Server.MapPath("txtfiles/" + name), FileMode.Open); StreamReader streamreader = new StreamReader(readfile); string line = ""; line = streamreader.ReadLine(); but here i have used the FileStream to read from the Particular path. but i have saved the txt file in byt format into my Database. how to read the txt file using the byte[] value to get the txt file content, instead of using the Path value.

    Read the article

  • Read the audio input level peak in Cocoa

    - by Kenneth Ballenegger
    I'm trying to make an audio-sensitive animation, and for that purpose, I'm looking for a way to look up the current audio level. I'm looking for the peak within a set amount of time. (Think the red bar that stays on for a second or so, on an audio meter.) I've searched around for for something like this, and the only thing I could find was how to read a movie's audio levels, and how Quartz Compositions have access to this thru their iTunes Visualizer protocol. I'm looking for a way to read this from the microphone, although I'm also interested if you know how to read this from an audio file. Thanks!

    Read the article

  • const read only local copies

    - by robUK
    Hello gcc 4.4.4 c89 I am just wondering is it worth passing a const into a function. i.e. void do_something(const char *dest, const int size) The size is a read-only so I don't want to change it. However, some developers never have this as const has it is a local copy that is being used. The pointer is const as you can change the value in the calling routine. I always have a const on read-only local copies, as it confirms to anyone reading my code that it is a read-only variable. And also, when coding I don't make the mistake of changing it without realizing. Many thanks for any suggestions,

    Read the article

  • how can read data in image uri

    - by satyamurthy
    hi sir i am implementing image upload then i got image uri how can read data in image uri File Img = new File(selectedImage.getPath()+inFileType); System.out.println("2............."+Img); FileInputStream is = null; try { is = new FileInputStream(Img); is.read(buffer); BufferedInputStream bis = new BufferedInputStream(is); Bitmap bm = BitmapFactory.decodeStream(is); bis.close(); is.close(); this code implementing i got uri how can read data

    Read the article

  • ff extension: how to read a cookie name and value on the current page

    - by encryptor
    My extension works on a application, which requires user login. Once the user has logged in, I need to read the cookies and use them in my xmlhttprequests. So initially i need to check if the cookie is set, if not, I direct the user to the login page. Once logged in, I need to read the cookies and send it as part of mt further requests. Can someone plese help me on how to read cookies from a xmlhttprequest or otherwise (if we dont even know the name of the cookie) there is to function as getRequestHeader.. but what i need is something like that

    Read the article

  • how change nginx temp & log folder or disable logging completely

    - by Ehsan Khodarahmi
    I'm running nginx 1.3.5 under windows seven, I need to execute nginx directly from a read-only media (CD or DVD), but when I want to run it, it fails with this error: nginx: [alert] could not open error log file: CreateFile() "logs/error.log" fail ed (5: Access is denied) 2012/08/28 13:52:46 [emerg] 5604#2864: CreateDirectory() "J:\nginx-1.3.5/temp/client_body_temp" failed (5: Access is denied) where J is my CD-ROM drive letter. I've changed nginx.conf to disable logging completely, but seems anyway it still tries to build a file named 'error.log' in '/logs' folder & some extra temporary contents in '/temp' folder at the startup, so I want to change 'logs' & 'temp' directory path to windows temp folder (%temp%), but I dont have any idea that how can I do it. Also I want to know why nginx still creates 'logs/error.log' after disableing error logging ?

    Read the article

  • How to read in a negative double with scanf() in C

    - by rize
    I'm learning basics of C and writing a simple first order equation solver. I want the input to be exactly ax+b=c or ax-b=c, where a, b, c are double type. I'm employing scanf() to read in user input and to check if it's of the correct form. However, if I enter a negative double, -4.6 say, as the "a" in the equation, scanf() won't read the a,b,c correctly. I'm using %lf inside scanf(). How do I read a negative double, then? Many thanks. My code: if (scanf("%lfx+%lf=%lf", &a, &b, &c)) more code If I use as the input "-6.2x+3.4=-5.9", the value 3.4 will be assinged to variable a, while b and c remain as they were and "more code" is run.

    Read the article

  • How to read a textfile using C#.Net

    - by user203127
    Hi, I have a text file. I want read that file. But In that if the line starts with 6 then i want read that file otherwise leave that line and go to next line. If the line starts with 6 then i want to read that line from position 6 to 15 and 45 to 62. I want to implement this code in C#.NET. How to write that code? Can anyone Help me.

    Read the article

  • Have parameters in Dao methods to get entities the most efficient way for read-only access

    - by Blankman
    Allot of my use of hibernate, at least for that data that is presented on many parts of the web application, is for read-only purposes. I want to add some parameters to my Dao methods so I can modify the way hibernate pulls the data and how it handles transactions etc. Example usage: Data on the front page of my website is displayed to the users, it is read-only, so I want to avoid any session/entity tracking that hibernate usually does. This is data that is read-only, will not be changed in this transaction, etc. What would be the most performant way to pull the data? (the code below is c#/nhibernate, I'm implementing this in java as I learn it) public IList<Article> GetArticles() { return Session.CreateCriteria(typeof(Article)) // some where cluase }

    Read the article

  • [macosx]does dlopen call open and read functions?

    - by zbencik
    Hello, I've intercepted(interposed) dlopen function under MacOS X and some other functions. I see how my applications calls dlopen in the log, but don't find anything related to open/read functions after dynamic library was dlopened. How does the system accesses and reads the dynamic library file? I've looked at the source code of dyld, and it does call open/read on dlopen. Can anybody let me know what I'm missing? intercepted functions: dlopen, open, read, write, access, all stat functions, close, etc. thanks, any help is highly appreciated.

    Read the article

  • How to read an image from disk and block until its read?

    - by Shizam
    I'm loading 5 images from disk but I want the 1st image I read to show as soon as possible. Right now I do UIImage *img = [UIImage imageWithContentsOfFile:path]; in a for loop but since imageWithContentsOfFile:path isn't blocking all 5 images wind up getting read from disk before the first one will appear (because they're all using up I/O). I confirmed this by just load one and it appeared on screen faster than if I load all 5. I'd like to load the 1st image and block until its fully read and shown before loading the next 4 or load the 1st one and be notified when its done before loading the next 4 but I can't figure out a way to do it. None of the 'WithContentsOfFile' methods for data or image block and they don't notify or have delegate methods. Any suggestions? Thanks

    Read the article

  • Reading Excel Files In C# Always Results In System.__ComObject?

    - by Soo
    This is the code I'm using to read an xls file: Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(filePath, 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0); Microsoft.Office.Interop.Excel.Sheets excelSheets = excelWorkbook.Worksheets; Microsoft.Office.Interop.Excel.Worksheet excelSheet = (Microsoft.Office.Interop.Excel.Worksheet)excelSheets.get_Item(1); MessageBox.Show(excelSheet.Cells[1,1].ToString()); Which results in a message box with: System.__ComObject Not sure what's going on, I'd really appreciate any help, thanks!

    Read the article

  • C sharp: read last "n" lines of log file

    - by frictionlesspulley
    need a snippet of code which would read out last "n lines" of a log file. I came up with the following code from the net.I am kinda new to C sharp. Since the log file might be quite large, I want to avoid overhead of reading the entire file.Can someone suggest any performance enhancement. I do not really want to read each character and change position. var reader = new StreamReader(filePath, Encoding.ASCII); reader.BaseStream.Seek(0, SeekOrigin.End); var count = 0; while (count <= tailCount) { if (reader.BaseStream.Position <= 0) break; reader.BaseStream.Position--; int c = reader.Read(); if (reader.BaseStream.Position <= 0) break; reader.BaseStream.Position--; if (c == '\n') { ++count; } } var str = reader.ReadToEnd();

    Read the article

  • how to read a file in other directory in python

    - by mazen.r.f
    i have a file its name is 5_1.txt in a directory i named it direct , how can i read that file using the instruction read. i verified the path using : os.getcwd() os.path.exists(direct) the result was True x_file=open(direct,'r') and i got this error : Traceback (most recent call last): File "<pyshell#17>", line 1, in <module> x_file=open(direct,'r') IOError: [Errno 13] Permission denied i don't know why i can't read the file ? any suggestion ? thanks .

    Read the article

  • Read random lines from huge CSV file in Python

    - by jbssm
    I have this quite big CSV file (15 Gb) and I need to read about 1 million random lines from it. As far as I can see - and implement - the CSV utility in Python only allows to iterate sequentially in the file. It's very memory consuming to read the all file into memory to use some random choosing and it's very time consuming to go trough all the file and discard some values and choose others, so, is there anyway to choose some random line from the CSV file and read only that line? I tried without success: import csv with open('linear_e_LAN2A_F_0_435keV.csv') as file: reader = csv.reader(file) print reader[someRandomInteger] A sample of the CSV file: 331.093,329.735 251.188,249.994 374.468,373.782 295.643,295.159 83.9058,0 380.709,116.221 352.238,351.891 183.809,182.615 257.277,201.302 61.4598,40.7106

    Read the article

  • Read Xlement fully using LinQ

    - by Ramya
    Hi, I have an XElement which I am getting after parsing an xml. This XElement needs to be read only when the need arises so, I have stored it in a list for future use. I have to read this XElement using LinQ. XDocument doc = XDocument.Parse(DataManager.offeringElements[index].DataElem.ToString()); var docNode = from dataNode in doc.Descendants("DataLinks") select new { Offering = dataNode .Element("link").Value, linkUrl = dataNode.Element("link").Attribue ("href").Value }; the Xelement has the following nodes a. Management b. Analytics c. Development My problem is that I am not able to read all the three nodes.I am able to get only the first node. Where am I going wrong?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >