Search Results

Search found 25343 results on 1014 pages for 'write protect'.

Page 2/1014 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Strange performance differences in read/write from/to USB flash drive

    - by Mario De Schaepmeester
    When copying files from my 8GB USB 2.0 flash drive with Windows 7 to a traditional hard drive, the average speed is between 25 and 30 MB/s. When doing the reverse, copying to the USB drive, the speed is 5MB/s average. I have tested this with about 4.5GB of files, a mixture of smaller and larger ones. The observations were the same on both FAT32 and exFAT file systems on the USB drive, NTFS on the internal hard disk. I don't think I can be mistaken in saying that flash memory has a lot higher performance than a spinning hard drive in both terms of reading and writing. For both memory types, reading should be faster than writing too. Now I wonder, how can it be that copying files from a fast read memory to a faster write memory is actually slower than copying files from a fast read memory to a slow write memory? I think that the files are stored in RAM before being copied over too, and there's caching as well, but I don't see how even that could tip the balance. It can only be in the advantage of writing to the USB drive, since it is "closer" to the SATA system than the USB port and it will receive data from the internal SATA HDD faster. Perhaps my way of thinking is all wrong or it just depends on the manufacturer of the USB pen. But I am curious.

    Read the article

  • Program to write for you?

    - by Richard Morton
    I need a program that can write what you input in it, and "writing" it back on another process, letter by letter, not copying and pasting it back. Basically, I have a insanely huge file that would take me about a month of non-stop keyboard typing and I can't simply control-C to the other program because it doesn't allow pasting text (go figure). I do realize it's quite an unusual question, but I need this to be done by a machine and not myself. Is there any way to be done?

    Read the article

  • Problem with "write" function in linux

    - by Dumitru Catalin
    I am trying to write 2 server/client programs under Linux, in which they communicate through named pipes. The problem is that sometimes when I try to write from the server into a pipe that doesn't exist anymore (the client has stopped), I get a "Resource temporarily unavailable" error and the server stops completely. I understand that this is caused by using a O_NONBLOCK parameter when opening the fifo chanel, indicating the point where the program would usually wait until it could write again in the file, but is there a way to stop this behavior, and not halt the entire program if a problem occurs (shouldn't the write command return -1 ad the program continue normally)? And another strange thing is that this error only occurs when running the programs outside the ide (eclipse). If I run both programs inside eclipse, on error the write function just returns -1 and the programs continues normally.

    Read the article

  • How to convert binary read/write to non-binary read/write in C++

    - by Phenom
    I have some C++ code from somewhere that reads and writes data in binary format. I want to see what it's reading and writing in the file, so I want to convert it's binary read and write to non-binary read and write. Also, when I convert the binary write to non-binary write, I want it to still be able to read in the information correctly. How can this be done? The write function: int btwrite(short rrn, BTPAGE *page_ptr) { // long lseek(), addr; long addr; addr = (long) rrn * (long) PAGESIZE + HEADERSIZE; lseek(btfd, addr, 0); return (write(btfd, page_ptr, PAGESIZE)); } The read function: int btread(short rrn, BTPAGE *page_ptr) { // long lseek(), addr; long addr; addr = (long)rrn * (long)PAGESIZE + HEADERSIZE; lseek(btfd, addr, 0); return ( read(btfd, page_ptr, PAGESIZE) ); }

    Read the article

  • mount: cannot remount block device /dev/sda5 read-write, is write-protected

    - by marc.riera
    So, this is it. Everything is working as usual except the disk is read only and dont want to change back. ^_^! thanks. root@NODE02:/tmp# df . Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda5 461490504 179502128 258545928 41% / root@NODE02:/tmp# mount -o rw,remount /dev/sda5 mount: cannot remount block device /dev/sda5 read-write, is write-protected root@NODE02:/tmp# touch helll touch: cannot touch `helll': Read-only file system It's not multipath. It's nothing special. Just a server with ubuntu 9.10. makes no sense for me, does it?

    Read the article

  • Differnce between linux write and sendfile syscall

    - by JosiP
    Hi Im programming webserver (C), which should send big files. My question is: What are the main differneces in two syscalls: write and sendfile. Does sendfile depends on size of socket system buffer ? I noticed that write often writes less then i requested. For example, if got many requests for one file: should i open it, copy into memory and use 'write', or maybe i can do 'sendfile' for each client ? thx in advance for all answers

    Read the article

  • Write data to an xml file.

    - by Bobby
    My aim is to write an XML file with few tags whose values are the regional language. I'm using Python to do this and using IDLE(Pythong GUI) for programming. While I try to write the words in an xmls file it gives the following error. UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128) For now, I'm not using any xml writer library instead I'm opening a file "test.xml" and writing the data into it. This error is encountered by the line: f.write("\t\" + data + "\"). If I replace the above write statement with print statement then it prints the data properly on Python Shell. I'm reading the data from an excel file which is not in the UTF8,16, or 32 encoding formats. Its in some other format. cp1252 is reading the data properly. Any help in getting this data writtent oan xml would be highly appreciated. Thanks in advance. Bob

    Read the article

  • write() causes fatal crash when filedescriptor becomes invalid

    - by ckrames1234
    I'm writing an iPhone App with a webserver in it. To handle a web request, I take the web request and write() to it the data that I want to send back. When I try to download a moderately sized file (3-6MB) it works fine, but if I cancel the download halfway through, the app crashes and leaves no trace of an error. I'm thinking that the file descriptor becomes invalid halfway through the write, and causes the crash. I really don't know if this is what causes the crash, i'm just assuming. I'm basing my webserver off of this example. NSString *header = @""; NSData *data = [NSData dataWithContentsOfFile:fullPath]; write (fd, [header UTF8String], [header length]); write(fd, [data bytes], [data length]); close(fd); Does anyone know how to fix this? I was thinking about chunking the data and then writing each part, but I don't think it would help.

    Read the article

  • Cannot write DVDs anymore, but can read them and write CDs

    - by YAS
    I'm stumped. I used to be able to write to DVDs and now I can't. I've tried different media (Memorex and Imations) I've tried different drives (internal and external) and even different OS's (Windows 7 and Linux Mint). Nothing I've done will work and it's a real problem not being able to burn DVD's. I'm on an Acer 6930 if that helps. Does anyone have any ideas?

    Read the article

  • Cannot write DVDs anymore (can still read them and write CDs) STUMPED

    - by YAS
    I'm stumped. I used to be able to write to DVDs and now I can't. I've tried different media (Memorex and Imations) I've tried different drives (internal and external) and even different OS's (Windows 7 and Linux Mint). Nothing I've done will work and it's a real problem not being able to burn DVD's. I'm on an Acer 6930 if that helps. Does anyone have any ideas?

    Read the article

  • Write-access for c# app in it's own exe dir in Windows 7

    - by fritz
    I know that user accounts in Windows 7 are limited by default, so a program cannot just write anywhere on the system (as it was possible in Win XP). But I thought that it would be possible that e.g. a c# app is allowed to write inside it's own exe-directory or it's subfolders at least (not everything is 'user settings' or should be written to "MyDocuments"...). So currently my c# app throws an UnauthorizedAccessException when trying to write inside the exe dir. Is there anything you can do in c# code to allow writing inside the exe dir?

    Read the article

  • Write STDOUT & STDERR to a logfile, also write STDERR to screen

    - by Stefan Lasiewski
    I would like to run several commands, and capture all output to a logfile. I also want to print any errors to the screen (or optionally mail the output to someone). Here's an example. The following command will run three commands, and will write all output (STDOUT and STDERR) into a single logfile. { command1 && command2 && command3 ; } > logfile.log 2>&1 Here is what I want to do with the output of these commands: STDERR and STDOUT for all commands goes to a logfile, in case I need it later--- I usually won't look in here unless there are problems. Print STDERR to the screen (or optionally, pipe to /bin/mail), so that any error stands out and doesn't get ignored. It would be nice if the return codes were still usable, so that I could do some error handling. Maybe I want to send email if there was an error, like this: { command1 && command2 && command3 ; } logfile.log 2&1 || mailx -s "There was an error" [email protected] The problem I run into is that STDERR loses context during I/O redirection. A '2&1' will convert STDERR into STDOUT, and therefore I cannot view errors if I do 2 error.log Here are a couple juicier examples. Let's pretend that I am running some familiar build commands, but I don't want the entire build to stop just because of one error so I use the '--keep-going' flag. { ./configure && make --keep-going && make install ; } > build.log 2>&1 Or, here's a simple (And perhaps sloppy) build and deploy script, which will keep going in the event of an error. { ./configure && make --keep-going && make install && rsync -av --keep-going /foo devhost:/foo} > build-and-deploy.log 2>&1 I think what I want involves some sort of Bash I/O Redirection, but I can't figure this out.

    Read the article

  • Read Response.write in another Page

    - by Sri Kumar
    Hello All, I have a page www.senderdomain.com/sender.aspx, from which i need to write a string to another page in other domain www.receiverdomain.com/receiver.aspx In sender.aspx i have written Response.Write("Hello"); Response.Redirect(Request.UrlReferrer.ToString()); It gets redirected to respective receiver.aspx page, but I am not sure how to get the text "Hello" in receiver.aspx page. Can any pl help on this?

    Read the article

  • How to write JavaScript to a separate window?

    - by George Edison
    I have opened a new window with JavaScript: var newwin = window.open('','preview','width=600,height=500'); Now I want to write some JavaScript to the window: newwin.document.write("<script type='text/javascript'>alert('Hi!');<" + "/script>"); newwin.document.close(); However, the script never gets executed. Am I doing something wrong?

    Read the article

  • write in file is not complete without quitting the IDLE(Python GUI)

    - by Yi-Ping
    I want to write something in a file. for example, fo=open('C:\Python\readline_test.txt','a') for i in range(3): st='abc'+'\n' fo.write(st) fo.close then I open this python file in IDLE, and click "Run Module". There is no error message but I find the writing is not complete if I didn't quit IDLE. How can I complete the file writing without quitting the IDLE? Thanks. (I use Python 2.6.2 on Windows XP.)

    Read the article

  • how to write or create (when no exist) a file using python and Google AppEngine

    - by zjm1126
    this is my code: f = open('text/a.log', 'wb') f.write('hahaha') f.close() and it is not create a new file when not exist how to do this , thanks updated class MyThread(threading.Thread): def run(self): f = open('a.log', 'w') f.write('hahaha') f.close() error is : Traceback (most recent call last): File "D:\Python25\lib\threading.py", line 486, in __bootstrap_inner self.run() File "D:\zjm_code\helloworld\views.py", line 15, in run f = open('a.log', 'w') File "d:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 1188, in __init__ raise IOError('invalid mode: %s' % mode) IOError: invalid mode: w

    Read the article

  • write file in network shared folder with UnauthorizedAccessException?

    - by sam
    hi the win mobile 6 code tries to write files on network shared folder, but always gets UnauthorizedAccessException. I have checked permission and security setting on the folder and the code can read the file but just cant write to it. The code runs under administrator account which has full control over the folder and files. It is in vs 2008 professional with device emulator.Any help please? thanks very much.

    Read the article

  • VB6: Slow Binary Write?

    - by Tom the Junglist
    Wondering why a particular binary write operation in VB is so slow. The function reads a Byte array from memory and dumps it into a file like this: Open Destination For Binary Access Write As #1 Dim startP, endP As Long startP = BinaryStart endP = UBound(ReadBuf) - 1 Dim i as Integer For i = startP To endP DoEvents Put #1, (i - BinaryStart) + 1, ReadBuf(i) Next Close #1 For two megabytes on a slower system, this can take up to a minute. Can anyone tell me why this is so slow?

    Read the article

  • response.write only working IE for ASP.NET

    - by slowlycooked
    I'm using uploadify (http://www.uploadify.com/) to upload video to my site then convert them into *.flv using ffmpeg and play preview. But it dosen't fully working with firefox, chrome or safari. uploadify provides a onComplete interface, so when the script (.ashx, .php) used on your site for saving uploaded files. you can use response.write("blabla") or (echo "blabla") to invoke the javascript function that registed as OnComplete. i have test with few video files like avi, mpg, mp4, they are less then 50mb,and they all worked with all 4 browsers. However, when i was trying to upload a 75mb mp4 file, it worked in IE, but didn't working in other three. I can see the .flv file has been create in the upload folder, i can see debug messsage output after response.write("blabla"), but the javascript function was not invoked. i.e. the preview didn't play. anyone knows why? is there a timeout or something on response.write so after a period of time it wont work? e.g. 75mb file took longer time to convert than other smaller size file i tried. thansk

    Read the article

  • How to protect your real time online shooter from potential bots

    - by Zaky German
    I'm looking to create a multiplayer top down shooter. While i've read about different topics, i can see them i've got some real challenges ahead, but i'm all up for it. One thing i can't understand is how am i supposed to be protecting the game from people who try to create bots? What i mean is, as far as i understand, it's impossible to protect the network traffic in a way that players won't be able to create programs that listen to what's going on and understand it. So what worries me is that people can create bots that listen to the current location of rival players, and send communication that mimic as if the player is shooting in the exact "perfect" location to win that match. So what kind of techniques are used to protect real time games from such bots? Also i'd like to mention that i've tried searching for discussions (as this sounds like something many people struggle with), but couldn't find anything about it specifically, only as a part of broader questions about networking in real time games. If i should have looked harder feel free to put me in my place :) Thanks alot!

    Read the article

  • document.write issue

    - by Dhana
    I inherited a piece of code that uses document.write to insert a certain div when the code is encountered. Unfortunately, this code is causing issues in IE where the code fails. Is there a way around this to insert a div on the page without it? I can't make a big change since this code is currently used by many clients(it's like google adsense kind of thing). Is there an alternative to document.write - I don't have a way to capture a div on the page since it's something plugged in by anyone.

    Read the article

  • Using write to print floating point numbers.

    - by Tom
    Hi, As an exercise to achieve something larger, i'm trying to use write to print a floating point number. I haven't done this in a while. I must be doing something wrong because I cant get it to work. Here is my code #include <unistd.h> int main(){ float f = 4.5; write(1,&f,sizeof float); return 0; } However, when running it im getting ?@ Any thoughts? Thanks in advance.

    Read the article

  • Most Efficient Way to Write to Fixed Width File (Ruby)

    - by Ruby Novice
    I'm currently working with extremely large fixed width files, sometimes well over a million lines. I have written a method that can write over the files based on a set of parameters, but I think there has to be a more efficient way to accomplish this. The current code I'm using is: def self.writefiles(file_name, positions, update_value) @file_name = file_name @positions = positions.to_i @update_value = update_value line_number = 0 @file_contents = File.open(@file_name, 'r').readlines while line_number < @file_contents.length @read_file_contents = @file_contents[line_number] @read_file_contents[@positions] = @update_value @file_contents[line_number] = @read_file_contents line_number += 1 end write_over_file = File.new(@file_name, 'w') line_number = 0 while line_number < @file_contents.length write_over_file.write @file_contents[line_number] line_number += 1 end write_over_file.close end For example, if position 25 in the file indicated that it is an original file the value would be set to "O" and if I wanted to replace that value I would use ClassName.writefiles(filename, 140, "X") to change this position on each line. Any help on making this method more efficient would be greatly appreciated! Thanks

    Read the article

  • The Best Ways to Lock Down Your Multi-User Computer

    - by Lori Kaufman
    Whether you’re sharing a computer with other family members or friends at home, or securing computers in a corporate environment, there may be many reasons why you need to protect the programs, data, and settings on the computers. This article presents multiple ways of locking down a Windows 7 computer, depending on the type of usage being employed by the users. You may need to use a combination of several of the following methods to protect your programs, data, and settings. How to Stress Test the Hard Drives in Your PC or Server How To Customize Your Android Lock Screen with WidgetLocker The Best Free Portable Apps for Your Flash Drive Toolkit

    Read the article

  • Controlling the scope of a document.write call coming from a third party

    - by pingrey
    Dear all, I'm writing a webpage that relies on an external javascript file (that I have no control of), which returns data by using document.write's. Is there any way to dynamically call the function without it overwriting the whole document? The most concise code I can think of is below: <html> <head> <script type="text/javascript"> function horriblefunction () { document.write("new text"); } </script> </head> <body> Starting Text... <div id="pleasewriteinme"></div> Other text... <button onclick="horriblefunction();">Click</button> </body> </html> The idea beginning that without altering "horriblefunction()" (as it's external) the new text could be placed in the div instead of overwriting the page. Is this possible or does the function have to be called inside the div as the page is created? Thanks for you help

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >