Is there a tool that would show me for a specific file on disk, how fragmented it is? (How many seeks does physical disk need to make if I were to read that file in a linear fashion)
Right now I am using fread() to read a file, but in other language fread() is inefficient i'v been told. Is this the same in C? If so, how would faster file reading be done?
In FTP, when I mget *, it only gets file with extension *.xxx and ignores those files without any extension, e.g. file name ACC001.
How can I get those files without extension?
I have a php script that has the following requirement command: require_once 'HTTP/OAuth.php'; the file HTTP/OAuth.php is in php's include_path that is .:/usr/lib/php.
Nevertheless in Eclipse the require_once line is marked with the following warning: Include filename: 'HTTP/OAuth.php' doesn't exist in project:
How can I make my project see the include_path so it can find the require_once file?
Thanks
ldj
I am trying to get the response from a server, which is now not giving any response. I tried file_get_contents(), cURL, and tried getting the headers, but apparently the server is not responding. There are no headers returned or any response of any kind. Also, this happens when I try from my web server - it works fine in my local machine.
The server I'm calling is an sms server, to use which they've given a url. The problem is only with this particular server. I get response while trying Google. So may be it's caused by the called server.
What I wanna know is what could be (or how to find out) the reasons...
Any advices?
I am trying to read .doc/.docx file with stream reader, but it give me output as unspecified character ie.
??[ ?L?f???C???.
I'm writing the file using a text editor. Here's a snippet of my code:
string filePath = baseUrl+ "Sample.docx";
using (StreamReader reader = new StreamReader(filePath, Encoding.UTF8))
{
txtBody.Text = reader.ReadToEnd();
}
I'm using VS 2010. Thank you.
Say I have a file in a SVN. How do I use PHP to check the file's revision number?
I see the SVN function list at http://www.php.net/manual/en/ref.svn.php but am not sure which one to use or the exact code to do it.
Thanks!
i have file with contents in list form such as
[1,'ab','fgf','ssd']
[2,'eb','ghf','hhsd']
[3,'ag','rtf','ssfdd']
i want to read that file line by line using f.readline and assign thn to a list so as to use it is the prog as a list for using list properties
tried like
k=[ ]
k=f.readline()
print k[1]
i xpected a result to show 2nd element in the list in first line
but it showed the first bit and gave o/p as '1'
how to get the xpected output..
please suggest
Im using c#.net windows form application. I have a xml file whose name is hello.xml and it goes like this
-
-
abc
hello how ru
-
def
i m fine
-
ghi
how abt u
How can i get the root node i.e into a text box. At this time I will have the xml file name. i.e hello.xml. Using this I should get the root node
I am manually copying some folders and files through C#, and I want to show the user that something is actually going on. Currently, the program looks as if its frozen, but it is actually copying files.
I would think there is already a built-in dialog or form that shows the process, similar to copying/moving files in windows explorer. Is there anything like that available, or will I have to create everything from scratch?
Also, would this be the best method to show the user that something is actively going on?
Thanks for the help!
The application is simple, an HTML form that posts to a Perl script. The problem is we sometimes have our customers upload very large files (gt 500mb) and their internet connections can be unreliable at times.
Is there any way to resume a failed transfer like in WinSCP or is this something that can't be done without support for it in the client?
My problem is that I have too many files in single directory. I cannot "ls" the directory, cos is too large. I need to move all files in better directory structure.
I'm using the last 3 digits from ID as folders in reverse way.
For example ID 2018972 will gotta go in /2/7/9/img_2018972.jpg.
I've created the directories, but now I need help with bash script. I know the IDs, there are in range 1,300,000 - 2,000,000. But I can't handle regular expressions.
I wan't to move all files like this:
/images/folder/img_2018972.jpg -> /images/2/7/9/img_2018972.jpg
I will appreciate any help on this subject. Thanks!
I am using curl for post web service call . In local i get data but when i shifted my code and web service to server i am not getting data.
When i call from rest client which is add on for firefox i get data.
when i hit through code i get following msg.
Error:- 1.when using curl for post it reply:- Not Found.
2. when using file_get_contents it gives:-failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
what can i do now
HI
I have an xml file with 500KB size which i need to send it to webservice, so i want to compress this data and send it to the webservice
i have heard of some base24Encoding something...
Can anyone throw more light on this
Suppose if i use GZipStream how can i send the file to the webservice
Thanks in Advance
PHP brings a class for ZIP file manipulation. It also allows the creation of directories with addEmptyDir() and the deletion of an entry with deleteName(). But the deletion does not work on directories (empty or not). Is there any way to delete empty folders in a ZIP file (prefered is buildin PHP functionality)?
I know that FTP does not support transferring and retaining file date/time stamps
Wondering if anyone has any ideas/scripts (Shell/perl) that would retain a transfered file's timestamp after a put operation?
Well, I would like to build a file hosting website just like other already did, but it is going to be something different by adding search engine, allowing download and upload in full speed for any user, and so on. Unfortunately the web hosting plans, which declared to support UNLIMITED SPACE rarely allows me to host files on those space. So what I need is the unlimited file storage service which could host all of my users' files.
I found Amazon S3, already provides such service, but could anybody recommends me for other better ?
Hi. how can I clear the .viminfo file.
I want to clear the Command Line History,File marks, Jumplist etc.,
other then Search String History
Is there any way to do this.
I have a wide screen and I would like to see the code I edit on multiple columns, like an article in a news paper. Ideally I would want the full screen filled with the content of the file I edit.
I am not interested in displaying multiple views of the same file in multiple windows, that's a different feature.
hi
i want to design a theme for postnuke cms.
and want to use css condition in the template files.
postnuke use smarty tag like
<!--[if $n eq ''] -->....<!--[/if]-->
so when i use
<!--[if lt IE 7]>....<![endif]-->
it gives some errors about tags.
what can i do?
A client has the admin ability to upload a PDF to their respective directory and have it listed on their website. All of this works dandy until a PDF reaches a certain file size that makes the server time out. This causes an error and the file uploaded will not succeed.
As mentioned in the title, we are using ColdFusion with a command. Is there any java/jquery/flash modules or applications that could resolve this issue?
Is it possible to write a regular expression for finding a typical file matching pattern.
e.g. File<13/04/2010.txt should be picked up and not any other file.
i.e. Starting file name will be File followed by some dates and then the file extension.
If so, can we specify this pattern in the config file?
Looking for the solution in C#
Thanks