Search Results

Search found 72370 results on 2895 pages for 'file moving'.

Page 60/2895 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Removing file locks in Windows and Java

    - by Jack
    I have a Java program that opens a file using the RandomAccessFile class. I'd like to be able to rename that file while it is opened by Java. In Unix, this isn't a problem. Does anyone know how I can do this in Windows? Should I set Java to open it a certain way? Thanks in advance.

    Read the article

  • Reading lists from a file in Ruby

    - by Gjorgji
    Hi, I have a txt file which contains data in the following format: X1 Y1 X2 Y2 etc.. I want to read the data from this file and create two lists in ruby (X containing X1, X2 and Y containing Y1, Y2). How can I do this in Ruby? Thanks.

    Read the article

  • Upload a file to a web server in cocoa

    - by Cam
    Hello, I was wondering the best way to upload file to a web server in cocoa. I cant seem to get my curl code to work even though it works when run from terminal. curl code: system(@"curl -T /file.txt http://webserevertouploadto.com") Thanks for any help

    Read the article

  • view Large PDF file in iPhone SDK

    - by aRrAY
    I have followed some tutorial that teach me how to view PDF file in UIWebView, however I found that if the file size is large, it will be lag when I zoom the PDF, but it doesn't occur in Mobile Safari. So anyone know how to solve it?

    Read the article

  • file descriptors and open files

    - by amanda
    Hello, I have two quick questions: When do two file descriptors point to the same open file ? When do two open files point to the same inode ? Also, if you happen to have some good documentation with graphs explaining this, i'll be very grateful if you show me the link to it :) Thanks!

    Read the article

  • C# OOP File Structure?

    - by Soo
    Hey SO, I just started programming with objects recently and am trying to learn good habits early on. The way I plan to structure my application is to have two files: 1: Program.cs - This file will contain the main logic for the application 2: Class.cs - This file will contain all of the class definitions Pretty simple. What I'm wondering if I should have any more files for ... well, you tell me. Any help would be appreciated.

    Read the article

  • HTML File upload field style

    - by Steven1350
    I am trying to create a file upload field that has a little bit of style to it, but I seem to be having problems finding examples of this. I know part of the reason is that the field itself varies from browser to browser. Any ideas how to do this? Or is there a way to do this without using a file element of a form that can be styled?

    Read the article

  • Empty file fields

    - by user319319
    i must check all :file fields, all fields must be not empty. i use code function CheckFiles() { var t = $('.uploadElement:empty').size(); alert(t); } but t return all uploadElement elements count. how to get empty :file fields? sorry my english

    Read the article

  • Creating and writing file from a FileOutputStream in Java

    - by Althane
    Okay, so I'm working on a project where I use a Java program to initiate a socket connection between two classes (a FileSender and FileReceiver). My basic idea was that the FileSender would look like this: try { writer = new DataOutputStream(connect.getOutputStream()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } //While we have bytes to send while(filein.available() >0){ //We write them out to our buffer writer.write(filein.read(outBuffer)); writer.flush(); } //Then close our filein filein.close(); //And then our socket; connect.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); The constructor contains code that checks to see if the file exists, and that the socket is connected, and so on. Inside my FileReader is this though: input = recvSocket.accept(); BufferedReader br = new BufferedReader(new InputStreamReader(input.getInputStream())); FileOutputStream fOut= new FileOutputStream(filename); String line = br.readLine(); while(line != null){ fOut.write(line.getBytes()); fOut.flush(); line = br.readLine(); } System.out.println("Before RECV close statements"); fOut.close(); input.close(); recvSocket.close(); System.out.println("After RECV clsoe statements"); All inside a try-catch block. So, what I'm trying to do is have the FileSender reading in the file, converting to bytes, sending and flushing it out. FileReceiver, then reads in the bytes, writes to the fileOut, flushes, and continues waiting for more. I make sure to close all the things that I open, so... here comes the weird part. When I try and open the created text file in Eclipse, it tells me "An SWT error has occured ... recommended to exit the workbench... see .log for more details.". Another window pops up saying "Unhandled event loop exception, (no more handles)". However, if I try to open the sent text file in notepad2, I get ThisIsASentTextfile Which is good (well, minus the fact that there should be line breaks, but I'm working on that...). Does anyone know why this is happening? And while we're checking, how to add the line breaks? (And is this a particularly bad way to transfer files over java without getting some other libraries?)

    Read the article

  • How to check if ping responded or not in a batch file

    - by Ismail
    I want to continuously ping a server and see a message box when ever it responds i.e. server is currently down. I want to do it through batch file. I can show a message box as said here http://stackoverflow.com/questions/774175/how-can-i-open-a-message-box-in-a-windows-batch-file/774253#774253 and can ping continuously by ping <servername> -t But how do I check if it responded or not?

    Read the article

  • calculating time duration of a file

    - by RV
    Dupe of calculate playing time of a .mp3 file im reading a audio file(for ex:wav,mp3 etc) and get a long value as duration.now i want to convert that long value into correct time duration(like,00:05:32)

    Read the article

  • Large File Download - Connection With Server Reset

    - by daveywc
    I have an asp.net website that allows the user to download largish files - 30mb to about 60mb. Sometimes the download works fine but often it fails at some varying point before the download finishes with the message saying that the connection with the server was reset. Originally I was simply using Server.TransmitFile but after reading up a bit I am now using the code posted below. I am also setting the Server.ScriptTimeout value to 3600 in the Page_Init event. private void DownloadFile(string fname, bool forceDownload) { string path = MapPath(fname); string name = Path.GetFileName(path); string ext = Path.GetExtension(path); string type = ""; // set known types based on file extension if (ext != null) { switch (ext.ToLower()) { case ".mp3": type = "audio/mpeg"; break; case ".htm": case ".html": type = "text/HTML"; break; case ".txt": type = "text/plain"; break; case ".doc": case ".rtf": type = "Application/msword"; break; } } if (forceDownload) { Response.AppendHeader("content-disposition", "attachment; filename=" + name.Replace(" ", "_")); } if (type != "") { Response.ContentType = type; } else { Response.ContentType = "application/x-msdownload"; } System.IO.Stream iStream = null; // Buffer to read 10K bytes in chunk: byte[] buffer = new Byte[10000]; // Length of the file: int length; // Total bytes to read: long dataToRead; try { // Open the file. iStream = new System.IO.FileStream(path, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read); // Total bytes to read: dataToRead = iStream.Length; //Response.ContentType = "application/octet-stream"; //Response.AddHeader("Content-Disposition", "attachment; filename=" + filename); // Read the bytes. while (dataToRead > 0) { // Verify that the client is connected. if (Response.IsClientConnected) { // Read the data in buffer. length = iStream.Read(buffer, 0, 10000); // Write the data to the current output stream. Response.OutputStream.Write(buffer, 0, length); // Flush the data to the HTML output. Response.Flush(); buffer = new Byte[10000]; dataToRead = dataToRead - length; } else { //prevent infinite loop if user disconnects dataToRead = -1; } } } catch (Exception ex) { // Trap the error, if any. Response.Write("Error : " + ex.Message); } finally { if (iStream != null) { //Close the file. iStream.Close(); } Response.Close(); } }

    Read the article

  • gwt file permission

    - by Hoax
    I have a little GWT/AppEngine Project which uses RPC. Basically I need to get some data from a XML file that resides on the server. But when I use the RPC to read the file in my server-package I am getting a AccessControlException (access denied). Any ideas what the problem is? cheers hoax

    Read the article

  • What is the simplest way to download file in PHP

    - by silent
    Hi all, I need to download an image from some URL to my server. However, my server's config disallowed me to do it this way: getimagesize( $file ); Because, it generate error: Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in somefile.php on line 10 So, is there another way I can use that doesn't require external library?

    Read the article

  • how to userinput without typing to a batch file

    - by Blood hound
    I am trying to run a batch file which requires user input "y/n" to do further action , I want to call this batch file for automation , as during automation argument yes or no need to be passed without user intervention , any idea how to achieve it ? cmd /c setup.bat now if setup.bat is run " yes or no " need to be selected to get the desired result as now this setup.bat is called during automation, is there is anyway to pass "yes" parameter as an input to setup.bat

    Read the article

  • Moving default web site to another drive

    - by Chadworthington
    I set the default location from c:\inetpub\wwwroot to d:\inetpub\wwwroot but when I access my .NET 4.0 site get this error: Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. Source Error: Line 105: Set explicit="true" to force declaration of all variables. Line 106: --> Line 107: <compilation debug="true" strict="true" explicit="true" targetFramework="4.0"> Line 108: <assemblies> Line 109: <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> When I try to Manage the Basic Settings on the Site and click the "Test Settings" button, I see that I have a problem under "authorization:" The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that <domain>\<computer_name>$ has Read access to the physical path. Then test these settings again. 1) Do I need to grant rights to IIS to the new folder? Which user? I thought it was something like IIS_USER or something similar but I cannot determine the correct name of the user. 2) Also, do I need to set the default version of the framework somewhere at the Default Site level or at the Virtual folder level? How is this done in IIS6, I am used to IIS5 or whatever came with XP Pro. 3) My original site had a subfolder under wwwroot called "aspnet_client." How was this cleated? I manually copied it to the corresponding new location. My app was using seperate ASP specific databases for storing session state and role info, if that is relevant. Thanks

    Read the article

  • Dealing with a shutdown during a file write?

    - by Ken
    All, I'm working on a Real-time system, VxWorks I think, I'm saving application settings to a file. What's the best way to handle preserving the settings if the system shuts down or loses power in the middle of a file write? All I can think of is shuffling a few files around or reducing the frequency at which i Save variables in order to reduce incidents.

    Read the article

  • How can I view locking on a server file?

    - by JamesP
    We have a database file (foxpro) on a Windows share (2003 server). We're having some problems where the program that writes to this file has to retry as the file is locked. This all happens very quickly and within a few seconds the file is available, but the problem is it shouldn't be locked. Does anyone know how we can view what's locking it? Any tools available?

    Read the article

  • stderr to file; but without buffering

    - by l.thee.a
    I am trying to isolate a nasty bug, which brings down my linux kernel. I am printing messages to stderr and stderr is redirected to a log file. Is there a way to disable buffering on the file access? When kernel hangs, I am losing the messages in the buffer.

    Read the article

  • Removing a file from TortoiseHG data source

    - by Hossein Margani
    Hi! I am using TortoiseHG for source code control in Windows, I forgot to edit the ".hgignor" file, and now I have a huge folder ".hg" which I know it's because of DLL and EXE and PDB files which I do not need them. Now changing the ignor file does not remove those files. What should I do for deleting these files completely from my TortoiseHg data source? Thank you.

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >