Search Results

Search found 70140 results on 2806 pages for 'file io'.

Page 23/2806 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Unset the system immutable bit in Mac OS X

    - by skylarking
    In theory I believe you can unlock and remove the system immutable bit with: chflags noschg /Path/To/File But how can you do this when you've set the bit as root? I have a file that is locked, and even running this command as root will not work as the operation is not permitted. I tried logging in as Single-User mode to no avail. I seem to remember that even though you are in as root you are in at level '1'. And to be able to remove the system-immutable flag you need to be logged in at level '0'. Does this have something to do with this issue?

    Read the article

  • VMware Server guest systems are extremely slow with IO load on host (Ubuntu 8.04)

    - by Dennis G.
    We are experiencing performance issues with a VMware Server 2.x installation on an Ubuntu 8.04 host. When the host system is generating IO load (for example, copying large files as part of a backup operation), the guests (also Ubuntu 8.04) become extremely unresponsive and slow (simple Apache HTTP requests taking 5 seconds instead of the usual 200ms). We tried optimizing various aspects of the VMs, but the issue remains. Is there a known bug with VMware performance under linux if host IO load is high? Is there a way to fix this? Is this only an issue with Ubuntu systems, or have you seen it on other systems before? Thanks!

    Read the article

  • Linux IO scheduler on databases with RAID

    - by Raghu
    Hi, I have a linux database(MySQL) server(Dell 2950) with a 6-disk RAID 10. The default IO scheduler on it is CFQ. However, from what I have read and heard, there is no need for a scheduler like CFQ when reordering/scheduling is also done by underlying RAID controller; on the contrary since it does not account underlying RAID configuration into account performance may actually degrade with CFQ. The primary concern is to reduce CPU usage and improve throughput. Also, I have seen recommendations of using noop/deadline IO scheduler for databases primarily because of the nature of their R/W access.

    Read the article

  • Reliable file copy (move) process - mostly Unix/Linux

    - by mfinni
    Short story : We have a need for a rock-solid reliable file mover process. We have source directories that are often being written to that we need to move files from. The files come in pairs - a big binary, and a small XML index. We get a CTL file that defines these file bundles. There is a process that operates on the files once they are in the destination directory; that gets rid of them when it's done. Would rsync do the best job, or do we need to get more complex? Long story as follows : We have multiple sources to pull from : one set of directories are on a Windows machine (that does have Cygwin and an SSH daemon), and a whole pile of directories are on a set of SFTP servers (Most of these are also Windows.) Our destinations are a list of directories on AIX servers. We used to use a very reliable Perl script on the Windows/Cygwin machine when it was our only source. However, we're working on getting rid of that machine, and there are other sources now, the SFTP servers, that we cannot presently run our own scripts on. For security reasons, we can't run the copy jobs on our AIX servers - they have no access to the source servers. We currently have a homegrown Java program on a Linux machine that uses SFTP to pull from the various new SFTP source directories, copies to a local tmp directory, verifies that everything is present, then copies that to the AIX machines, and then deletes the files from the source. However, we're finding any number of bugs or poorly-handled error checking. None of us are Java experts, so fixing/improving this may be difficult. Concerns for us are: With a remote source (SFTP), will rsync leave alone any file still being written? Some of these files are large. From reading the docs, it seems like rysnc will be very good about not removing the source until the destination is reliably written. Does anyone have experience confirming or disproving this? Additional info We will be concerned about the ingestion process that operates on the files once they are in the destination directory. We don't want it operating on files while we are in the process of copying them; it waits until the small XML index file is present. Our current copy job are supposed to copy the XML file last. Sometimes the network has problems, sometimes the SFTP source servers crap out on us. Sometimes we typo the config files and a destination directory doesn't exist. We never want to lose a file due to this sort of error. We need good logs If you were presented with this, would you just script up some rsync? Or would you build or buy a tool, and if so, what would it be (or what technologies would it use?) I (and others on my team) are decent with Perl.

    Read the article

  • Parsing xml file that comes in as one object per line

    - by Casey
    I haven't been here in so long, I forgot my prior account! Anyways, I am working on parsing an xml document that comes in ugly. It is for banking statements. Each line is a <statement>all tags</statement>. Now, what I need to do is read this file in, and parse the XML document at the same time, while formatting it more human readable too. Point beeing, Original input looks like this: <statement><accountHeader><fiAddress></fiAddress><accountNumber></accountNumber><startDate>20140101</startDate><endDate>20140228</endDate><statementGroup>1</statementGroup><sortOption>0</sortOption><memberBranchCode>1</memberBranchCode><memberName></memberName><jointOwner1Name></jointOwner1Name><jointOwner2Name></jointOwner2Name></summary></statement> <statement><accountHeader><fiAddress></fiAddress><accountNumber></accountNumber><startDate>20140101</startDate><endDate>20140228</endDate><statementGroup>1</statementGroup><sortOption>0</sortOption><memberBranchCode>1</memberBranchCode><memberName></memberName><jointOwner1Name></jointOwner1Name><jointOwner2Name></jointOwner2Name></summary></statement> <statement><accountHeader><fiAddress></fiAddress><accountNumber></accountNumber><startDate>20140101</startDate><endDate>20140228</endDate><statementGroup>1</statementGroup><sortOption>0</sortOption><memberBranchCode>1</memberBranchCode><memberName></memberName><jointOwner1Name></jointOwner1Name><jointOwner2Name></jointOwner2Name></summary></statement> I need the final output to be as follows: <statement> <name></name> <address></address> </statement> This is fine and dandy. I am using the following "very slow considering 5.1 million lines, 254k data file, and about 60k statements takes around 8 minutes". foreach(String item in lines) { XElement xElement = XElement.Parse(item); sr.WriteLine(xElement.ToString().Trim()); } Then when the file is formatted this is what sucks. I need to check every single tag in transaction elements, and if a tag is missing that could be there, I have to fill it in. Our designer software will default prior values in if a tag is possible, and the current objects does not have. It defaults in the value of a prior one that was not Null. "I know, and they swear up and down it is not a bug... ok?" So, that is also taking about 5 to 10 minutes. I need to break all this down, and find a faster method for working with the initial XML. This is a preprocess action, and cannot take that long if not necessary. It just seems redundant. Is there a better way to parse the XML, or is this the best I can do? I parse the XML, write to a temp file, and then read that file in, to the output file inserting the missing tags. 2 IO runs for one process. Yuck.

    Read the article

  • Silverlight changes the io.Stream to byte[]

    - by Sai
    I have created a WCF service for uploading images , which accepts System.IO.Stream as input parameter and am using streaming. When I added the service reference in Silverlight project then it automatically changed the parameter of my WCF method from System.IO.Stream to byte[]. Can anyone suggest if there is a way around this so that I can get System.IO.Stream type rather than byte[]. Thanks in advance

    Read the article

  • Copy mdf file and use it in run time

    - by Anibas
    After I copy mdf file (and his log file) I tries to Insert data. I receive the following message: "An attempt to attach an auto-named database for file [fileName].mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. When I copied the file manual everything worked normally. Is it correct the order File.Copy leaves the file engaged?

    Read the article

  • Java IO (javase 6)- Help me understand the effects of my sample use of Streams and Writers...

    - by Daddy Warbox
    BufferedWriter out = new BufferedWriter( new OutputStreamWriter( new BufferedOutputStream( new FileOutputStream("out.txt") ) ) ); So let me see if I understand this: A byte output stream is opened for file "out.txt". It is then fed to a buffered output stream to make file operations faster. The buffered stream is fed to an output stream writer to bridge from bytes to characters. Finally, this writer is fed to a buffered writer... which adds another layer of buffering? Hmm...

    Read the article

  • Designing a database file format

    - by RoliSoft
    I would like to design my own database engine for educational purposes, for the time being. Designing a binary file format is not hard nor the question, I've done it in the past, but while designing a database file format, I have come across a very important question: How to handle the deletion of an item? So far, I've thought of the following two options: Each item will have a "deleted" bit which is set to 1 upon deletion. Pro: relatively fast. Con: potentially sensitive data will remain in the file. 0x00 out the whole item upon deletion. Pro: potentially sensitive data will be removed from the file. Con: relatively slow. Recreating the whole database. Pro: no empty blocks which makes the follow-up question void. Con: it's a really good idea to overwrite the whole 4 GB database file because a user corrected a typo. I will sell this method to Twitter ASAP! Now let's say you already have a few empty blocks in your database (deleted items). The follow-up question is how to handle the insertion of a new item? Append the item to the end of the file. Pro: fastest possible. Con: file will get huge because of all the empty blocks that remain because deleted items aren't actually deleted. Search for an empty block exactly the size of the one you're inserting. Pro: may get rid of some blocks. Con: you may end up scanning the whole file at each insert only to find out it's very unlikely to come across a perfectly fitting empty block. Find the first empty block which is equal or larger than the item you're inserting. Pro: you probably won't end up scanning the whole file, as you will find an empty block somewhere mid-way; this will keep the file size relatively low. Con: there will still be lots of leftover 0x00 bytes at the end of items which were inserted into bigger empty blocks than they are. Rigth now, I think the first deletion method and the last insertion method are probably the "best" mix, but they would still have their own small issues. Alternatively, the first insertion method and scheduled full database recreation. (Probably not a good idea when working with really large databases. Also, each small update in that method will clone the whole item to the end of the file, thus accelerating file growth at a potentially insane rate.) Unless there is a way of deleting/inserting blocks from/to the middle of the file in a file-system approved way, what's the best way to do this? More importantly, how do databases currently used in production usually handle this?

    Read the article

  • Parse a text file into multiple text file

    - by Vijay Kumar Singh
    I want to get multiple file by parsing a input file Through Java. The Input file contains many fasta format of thousands of protein sequence and I want to generate raw format(i.e., without any comma semicolon and without any extra symbol like "", "[", "]" etc) of each protein sequence. A fasta sequence starts form "" symbol followed by description of protein and then sequence of protein. For example ? lcl|NC_000001.10_cdsid_XP_003403591.1 [gene=LOC100652771] [protein=hypothetical protein LOC100652771] [protein_id=XP_003403591.1] [location=join(12190..12227,12595..12721,13403..13639)] MSESINFSHNLGQLLSPPRCVVMPGMPFPSIRSPELQKTTADLDHTLVSVPSVAESLHHPEITFLTAFCL PSFTRSRPLPDRQLHHCLALCPSFALPAGDGVCHGPGLQGSCYKGETQESVESRVLPGPRHRH Like above formate the input file contains 1000s of protein sequence. I have to generate thousands of raw file containing only individual protein sequence without any special symbol or gaps. I have developed the code for it in Java but out put is : Cannot open a file followed by cannot find file. Please help me to solve my problem. Regards Vijay Kumar Garg Varanasi Bharat (India) The code is /*Java code to convert FASTA format to a raw format*/ import java.io.*; import java.util.*; import java.util.regex.*; import java.io.FileInputStream; // java package for using regular expression public class Arrayren { public static void main(String args[]) throws IOException { String a[]=new String[1000]; String b[][] =new String[1000][1000]; /*open the id file*/ try { File f = new File ("input.txt"); //opening the text document containing genbank ids FileInputStream fis = new FileInputStream("input.txt"); //Reading the file contents through inputstream BufferedInputStream bis = new BufferedInputStream(fis); // Writing the contents to a buffered stream DataInputStream dis = new DataInputStream(bis); //Method for reading Java Standard data types String inputline; String line; String separator = System.getProperty("line.separator"); // reads a line till next line operator is found int i=0; while ((inputline=dis.readLine()) != null) { i++; a[i]=inputline; a[i]=a[i].replaceAll(separator,""); //replaces unwanted patterns like /n with space a[i]=a[i].trim(); // trims out if any space is available a[i]=a[i]+".txt"; //takes the file name into an array try // to handle run time error /*take the sequence in to an array*/ { BufferedReader in = new BufferedReader (new FileReader(a[i])); String inline = null; int j=0; while((inline=in.readLine()) != null) { j++; b[i][j]=inline; Pattern q=Pattern.compile(">"); //Compiling the regular expression Matcher n=q.matcher(inline); //creates the matcher for the above pattern if(n.find()) { /*appending the comment line*/ b[i][j]=b[i][j].replaceAll(">gi",""); //identify the pattern and replace it with a space b[i][j]=b[i][j].replaceAll("[a-zA-Z]",""); b[i][j]=b[i][j].replaceAll("|",""); b[i][j]=b[i][j].replaceAll("\\d{1,15}",""); b[i][j]=b[i][j].replaceAll(".",""); b[i][j]=b[i][j].replaceAll("_",""); b[i][j]=b[i][j].replaceAll("\\(",""); b[i][j]=b[i][j].replaceAll("\\)",""); } /*printing the sequence in to a text file*/ b[i][j]=b[i][j].replaceAll(separator,""); b[i][j]=b[i][j].trim(); // trims out if any space is available File create = new File(inputline+"R.txt"); try { if(!create.exists()) { create.createNewFile(); // creates a new file } else { System.out.println("file already exists"); } } catch(IOException e) // to catch the exception and print the error if cannot open a file { System.err.println("cannot create a file"); } BufferedWriter outt = new BufferedWriter(new FileWriter(inputline+"R.txt", true)); outt.write(b[i][j]); // printing the contents to a text file outt.close(); // closing the text file System.out.println(b[i][j]); } } catch(Exception e) { System.out.println("cannot open a file"); } } } catch(Exception ex) // catch the exception and prints the error if cannot find file { System.out.println("cannot find file "); } } } If you provide me correct it will be much easier to understand.

    Read the article

  • Reading data from text file in C

    - by themake
    I have a text file which contains words separated by space. I want to take each word from the file and store it. So i have opened the file but am unsure how to assign the word to a char. FILE *fp; fp = fopen("file.txt", "r"); //then i want char one = the first word in the file char two = the second word in the file

    Read the article

  • Efficient file buffering & scanning methods for large files in python

    - by eblume
    The description of the problem I am having is a bit complicated, and I will err on the side of providing more complete information. For the impatient, here is the briefest way I can summarize it: What is the fastest (least execution time) way to split a text file in to ALL (overlapping) substrings of size N (bound N, eg 36) while throwing out newline characters. I am writing a module which parses files in the FASTA ascii-based genome format. These files comprise what is known as the 'hg18' human reference genome, which you can download from the UCSC genome browser (go slugs!) if you like. As you will notice, the genome files are composed of chr[1..22].fa and chr[XY].fa, as well as a set of other small files which are not used in this module. Several modules already exist for parsing FASTA files, such as BioPython's SeqIO. (Sorry, I'd post a link, but I don't have the points to do so yet.) Unfortunately, every module I've been able to find doesn't do the specific operation I am trying to do. My module needs to split the genome data ('CAGTACGTCAGACTATACGGAGCTA' could be a line, for instance) in to every single overlapping N-length substring. Let me give an example using a very small file (the actual chromosome files are between 355 and 20 million characters long) and N=8 import cStringIO example_file = cStringIO.StringIO("""\ header CAGTcag TFgcACF """) for read in parse(example_file): ... print read ... CAGTCAGTF AGTCAGTFG GTCAGTFGC TCAGTFGCA CAGTFGCAC AGTFGCACF The function that I found had the absolute best performance from the methods I could think of is this: def parse(file): size = 8 # of course in my code this is a function argument file.readline() # skip past the header buffer = '' for line in file: buffer += line.rstrip().upper() while len(buffer) = size: yield buffer[:size] buffer = buffer[1:] This works, but unfortunately it still takes about 1.5 hours (see note below) to parse the human genome this way. Perhaps this is the very best I am going to see with this method (a complete code refactor might be in order, but I'd like to avoid it as this approach has some very specific advantages in other areas of the code), but I thought I would turn this over to the community. Thanks! Note, this time includes a lot of extra calculation, such as computing the opposing strand read and doing hashtable lookups on a hash of approximately 5G in size. Post-answer conclusion: It turns out that using fileobj.read() and then manipulating the resulting string (string.replace(), etc.) took relatively little time and memory compared to the remainder of the program, and so I used that approach. Thanks everyone!

    Read the article

  • opening and viewing a file in php

    - by Christian Burgos
    how do i open/view for editing an uploaded file in php? i have tried this but it doesn't open the file. $my_file = 'file.txt'; $handle = fopen($my_file, 'r'); $data = fread($handle,filesize($my_file)); i've also tried this but it wont work. $my_file = 'file.txt'; $handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); $data = 'This is the data'; fwrite($handle, $data); what i have in mind is like when you want to view an uploaded resume,documents or any other ms office files like .docx,.xls,.pptx and be able to edit them, save and close the said file. edit: latest tried code... <?php // Connects to your Database include "configdb.php"; //Retrieves data from MySQL $data = mysql_query("SELECT * FROM employees") or die(mysql_error()); //Puts it into an array while($info = mysql_fetch_array( $data )) { //Outputs the image and other data //Echo "<img src=localhost/uploadfile/images".$info['photo'] ."> <br>"; Echo "<b>Name:</b> ".$info['name'] . "<br> "; Echo "<b>Email:</b> ".$info['email'] . " <br>"; Echo "<b>Phone:</b> ".$info['phone'] . " <hr>"; //$file=fopen("uploadfile/images/".$info['photo'],"r+"); $file=fopen("Applications/XAMPP/xamppfiles/htdocs/uploadfile/images/file.odt","r") or exit("unable to open file");; } ?> i am getting the error: Warning: fopen(Applications/XAMPP/xamppfiles/htdocs/uploadfile/images/file.odt): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/uploadfile/view.php on line 17 unable to open file the file is in that folder, i don't know it wont find it.

    Read the article

  • Copied a file with winscp; only winscp can see it

    - by nilbus
    I recently copied a 25.5GB file from another machine using WinSCP. I copied it to C:\beth.tar.gz, and WinSCP can still see the file. However no other app (including Explorer) can see the file. What might cause this, and how can I fix it? The details that might or might not matter WinSCP shows the size of the file (C:\beth.tar.gz) correctly as 27,460,124,080 bytes, which matches the filesize on the remote host Neither explorer, cmd (command line prompt w/ dir C:\), the 7Zip archive program, nor any other File Open dialog can see the beth.tar.gz file under C:\ I have configured Explorer to show hidden files I can move the file to other directories using WinSCP If I try to move the file to Users/, UAC prompts me for administrative rights, which I grant, and I get this error: Could not find this item The item is no longer located in C:\ When I try to transfer the file back to the remote host in a new directory, the transfer starts successfully and transfers data The transfer had about 30 minutes remaining when I left it for the night The morning after the file transfer, I was greeted with a message saying that the connection to the server had been lost. I don't think this is relevant, since I did not tell it to disconnect after the file was done transferring, and it likely disconnected after the file transfer finished. I'm using an old version of WinSCP - v4.1.8 from 2008 I can view the file properties in WinSCP: Type of file: 7zip (.gz) Location: C:\ Attributes: none (Ready-only, Hidden, Archive, or Ready for indexing) Security: SYSTEM, my user, and Administrators group have full permissions - everything other than "special permissions" is checked under Allow for all 3 users/groups (my user, Administrators, SYSTEM) What's going on?!

    Read the article

  • C++, Ifstream opens local file but not file on HTTP Server

    - by fammi
    Hi, I am using ifstream to open a file and then read from it. My program works fine when i give location of the local file on my system. for eg /root/Desktop/abc.xxx works fine But once the location is on the http server the file fails to open. for eg http://192.168.0.10/abc.xxx fails to open. Is there any alternate for ifstream when using a URL address? thanks. part of the code where having problem: bool readTillEof = (endIndex == -1) ? true : false; // Open the file in binary mode and seek to the end to determine file size ifstream file ( fileName.c_str ( ), ios::in|ios::ate|ios::binary ); if ( file.is_open ( ) ) { long size = (long) file.tellg ( ); long numBytesRead; if ( readTillEof ) { numBytesRead = size - startIndex; } else { numBytesRead = endIndex - startIndex + 1; } // Allocate a new buffer ptr to read in the file data BufferSptr buf (new Buffer ( numBytesRead ) ); mpStreamingClientEngine->SetResponseBuffer ( nextRequest, buf ); // Seek to the start index of the byte range // and read the data file.seekg ( startIndex, ios::beg ); file.read ( (char *)buf->GetData(), numBytesRead ); // Pass on the data to the SCE // and signal completion of request mpStreamingClientEngine->HandleDataReceived( nextRequest, numBytesRead); mpStreamingClientEngine->MarkRequestCompleted( nextRequest ); // Close the file file.close ( ); } else { // Report error to the Streaming Client Engine // as unable to open file AHS_ERROR ( ConnectionManager, " Error while opening file \"%s\"\n", fileName.c_str ( ) ); mpStreamingClientEngine->HandleRequestFailed( nextRequest, CONNECTION_FAILED ); } }

    Read the article

  • Fragment method and socket.io

    - by Tolgay Toklar
    I have a method,this method updates an array list in fragment.I can call this method in main activity like this public void getFromUser(String message) { addMessageToFragment("ok"); } public void addMessageToFragment(String message) { Log.w("Step 1",message); frgObj.addMessageToList("asd"); } getFromUser is calling from fragment(when user presses the button) this is working as well.But I am using socket.io in my app,when I try to call this method from socket.io,app is not working. public void on(String event, IOAcknowledge ack, Object... args) { try{ addMessageToFragment("ok"); } catch (JSONException e) {} } When this callback function calls,app is giving this errors: 08-19 11:57:24.813: W/System.err(4962): io.socket.SocketIOException: Exception was thrown in on(String, JSONObject[]). 08-19 11:57:24.813: W/System.err(4962): Message was: 5:::{"name":"listele","args":[{"mesaj":"123","gonderen":"781722165-tolgay007-DKSMIcIYGahPuKXriM83","alici":"tolgay007","blck_id":"781722165-tolgay007","out_username":"Anony-781722","ars_status":1,"longinf":"3aqghef","a_status":1}]} 08-19 11:57:24.813: W/System.err(4962): at io.socket.IOConnection.transportMessage(IOConnection.java:702) 08-19 11:57:24.813: W/System.err(4962): at io.socket.WebsocketTransport.onMessage(WebsocketTransport.java:82) 08-19 11:57:24.813: W/System.err(4962): at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:361) 08-19 11:57:24.813: W/System.err(4962): at org.java_websocket.WebSocketImpl.deliverMessage(WebSocketImpl.java:565) 08-19 11:57:24.813: W/System.err(4962): at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:331) 08-19 11:57:24.813: W/System.err(4962): at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:152) 08-19 11:57:24.813: W/System.err(4962): at org.java_websocket.client.WebSocketClient.interruptableRun(WebSocketClient.java:247) 08-19 11:57:24.823: W/System.err(4962): at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:193) 08-19 11:57:24.823: W/System.err(4962): at java.lang.Thread.run(Thread.java:841) 08-19 11:57:24.823: W/System.err(4962): Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6094) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewRootImpl.focusableViewAvailable(ViewRootImpl.java:2800) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.ViewGroup.focusableViewAvailable(ViewGroup.java:650) 08-19 11:57:24.823: W/System.err(4962): at android.view.View.setFlags(View.java:8878) 08-19 11:57:24.823: W/System.err(4962): at android.view.View.setFocusableInTouchMode(View.java:6114) 08-19 11:57:24.823: W/System.err(4962): at android.widget.AdapterView.checkFocus(AdapterView.java:718) 08-19 11:57:24.823: W/System.err(4962): at android.widget.AdapterView$AdapterDataSetObserver.onChanged(AdapterView.java:813) 08-19 11:57:24.823: W/System.err(4962): at android.widget.AbsListView$AdapterDataSetObserver.onChanged(AbsListView.java:6280) 08-19 11:57:24.823: W/System.err(4962): at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:37) 08-19 11:57:24.823: W/System.err(4962): at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50) 08-19 11:57:24.823: W/System.err(4962): at android.widget.ArrayAdapter.notifyDataSetChanged(ArrayAdapter.java:286) 08-19 11:57:24.823: W/System.err(4962): at com.impact.ribony.ConversationFragment.addMessageToList(ConversationFragment.java:91) 08-19 11:57:24.823: W/System.err(4962): at com.impact.ribony.MainActivity.addMessageToFragment(MainActivity.java:344) 08-19 11:57:24.823: W/System.err(4962): at com.impact.ribony.MainActivity$2.on(MainActivity.java:183) 08-19 11:57:24.823: W/System.err(4962): at io.socket.IOConnection.on(IOConnection.java:908) 08-19 11:57:24.883: W/System.err(4962): at io.socket.IOConnection.transportMessage(IOConnection.java:697) I didn't understand this error.What can be cause this error ?

    Read the article

  • NULL pointer dereference in swiotlb_unmap_sg_attrs() on disk IO

    - by Inductiveload
    I'm getting an error I really don't understand when reading or writing files using a PCIe block device driver. I seem to be hitting an issue in swiotlb_unmap_sg_attrs(), which appears to be doing a NULL dereference of the sg pointer, but I don't know where this is coming from, as the only scatterlist I use myself is allocated as part of the device info structure and persists as long as the driver does. There is a stacktrace to go with the problem. It tends to vary a bit in exact details, but it always crashes in swiotlb_unmap_sq_attrs(). I think it's likely I have a locking issue, as I am not sure how to handle the locks around the IO functions. The lock is already held when the request function is called, I release it before the IO functions themselves are called, as they need an (MSI) IRQ to complete. The IRQ handler updates a "status" value, which the IO function is waiting for. When the IO function returns, I then take the lock back up and return to request queue handling. The crash happens in blk_fetch_request() during the following: if (!__blk_end_request(req, res, bytes)){ printk(KERN_ERR "%s next request\n", DRIVER_NAME); req = blk_fetch_request(q); } else { printk(KERN_ERR "%s same request\n", DRIVER_NAME); } where bytes is updated by the request handler to be the total length of IO (summed length of each scatter-gather segment).

    Read the article

  • Problem with File uplolad in javascript.

    - by Nikhil
    I have used javascript to upload more than one file. when user clicks on 'add more' javascript appends new object to older div using innerHTML. Now the problem is if I select a file and then click on "add more" then new file button exist but older selected file removes and two blank file buttons display. I want this old file must be selected when user add new file button. If anybody can, Help Plz!!! tnX.

    Read the article

  • System.IO.File.ReadAllText(path) does not read the html file.

    - by Harikrishna
    I want to read the html file.And for that I use System.IO.File.ReadAllText(path).It can read all the html file but there is one file which is not read through this function. I have also used using (StreamReader reader = File.OpenText(fileName)) { text = reader.ReadToEnd(); But still there is same problem. What is the reason can be there ? And for that what can be the solution ? Or any other way to read the file ?

    Read the article

  • Ubuntu 13.XX unable to mount USB HDD. Tried everything. I/O error boot sector/file system

    - by XaviGG
    I know that there are many posts related but none of them helped me. I will jump to the last test because it is the one that should work, but it does not. An external HDD with single partition slow NTFS formatted in Windows, empty and clean. Checked for errors, it tells that not errors where found. Moving to Ubutnu 13.04... Gparted throws the first error when trying to read the disk: Input/output error It appears as unknown the content of the disk. Unable to create partition table or format it, getting the same error when trying. If I try to mount it in the terminal it tells me the same, specifying that also there is an I/O error reading the boot sector. I have this problem since I upgraded (always with fresh install) to 13.04. I thought it will be solved by the 13.10 but it has the same behavior. I tried with two different HDD (HD and SSHD) that work perfectly in Windows 7. In 13.04 at least I got a trying of mounting where the icon of the drive started showing and disappearing until finally it disappeared. But now it doesn't even try. Possible causes: -The HDD was my old main HDD, so it had WIN,RECOVERY,SYSTEM,UBU,SWAP partitions. Maybe the way or place where the partition table is defined is not the best for an external HDD but I don't know a lot in that topic. I would appreciate a lot if someone can give me a guideline to convert one of these HDD in a working external HDD. No files to recover, nothing to care about. Just format completely the disk and be able to use it for storing backups without having to move the files first to the windows partition, load windows and then copy them to the external HDD. Because I want to use a file comparator for the backups. Thanks a lot Edit 1: I found an option in Windows to convert it to a dynamic HDD that warns me that I wont be able to run O.S. after changing. I suppose that is what I need because in the current mode I cannot safely extract it. But it tells me an error that it couldn't change the mode.

    Read the article

  • Fork in Perl not working inside a while loop reading from file

    - by Sag
    Hi, I'm running a while loop reading each line in a file, and then fork processes with the data of the line to a child. After N lines I want to wait for the child processes to end and continue with the next N lines, etc. It looks something like this: while ($w=<INP>) { # ignore file header if ($w=~m/^\D/) { next;} # get data from line chomp $w; @ws = split(/\s/,$w); $m = int($ws[0]); $d = int($ws[1]); $h = int($ws[2]); # only for some days in the year if (($m==3)and($d==15) or ($m==4)and($d==21) or ($m==7)and($d==18)) { die "could not fork" unless defined (my $pid = fork); unless ($pid) { some instructions here using $m, $d, $h ... } push @qpid,$pid; # when all processors are busy, wait for child processes if ($#qpid==($procs-1)) { for my $pid (@qpid) { waitpid $pid, 0; } reset 'q'; } } } close INP; This is not working. After the first round of processes I get some PID equal to 0, the @qpid array gets mixed up, and the file starts to get read at (apparently) random places, jumping back and forth. The end result is that most lines in the file get read two or three times. Any ideas? Thanks a lot in advance, S.

    Read the article

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