Search Results

Search found 40999 results on 1640 pages for 'duplicate files'.

Page 164/1640 | < Previous Page | 160 161 162 163 164 165 166 167 168 169 170 171  | Next Page >

  • Require_once to variable

    - by swamprunner7
    I want to call require_once("test.php") but not display result and save it into variable like this: //pseudocode $test = require_once('test.php'); //some operations like $test = preg_replace(…); echo $test; Is it possible?

    Read the article

  • Is there any memory restrictions on an ASP.Net application? HttpHandler?

    - by tpower
    I have an ASP.Net MVC application that allows users to upload images. When I try to upload a really large file (400MB) I get an error. I assumed that my image processing code (home brew) was very inefficient, so I decided I would try using a third party library to handle the image processing parts. Because I'm using TDD, I wanted to first write a test that fails. But when I test the controller action with the same large file it is able to do all the image processing without any trouble. The error I get is "Out of memory". I'm sure my code is probably using a lot more memory than it needs to but I just want to know why my test passes. The other difference is that I'm using SWFUpload which is not used with the test. Could this be the cause?

    Read the article

  • Show a Copying-files dialog/form while manually copying files in C#?

    - by Dinoo
    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!

    Read the article

  • Basic question on c++ header file inclusion ?

    - by siva
    What are the differences between below 3 programs ?. Is <iostream> a header file or C++ standard library ? 1 #include<iostream> using namespace std; int main() { return 0; } 2 #include<iostream> int main() { return 0; } 3 #include<iostream.h> int main() { return 0; } Thanks in advance.

    Read the article

  • PHP Zip Archive sporadically creating multiple files

    - by user516558
    I have a PHP script (running PHP 5.2 on Apache 2.2) that creates a zip archive of files for a user to download. Everything seems to work just fine; the only issue I have is that periodically multiple files will be created before the ZIP archive is successfully finished. Example: archive-name.zip archive-name.zip.a09600 archive-name.zip.b09600 archive-name.zip.c09600 This does not happen every single time; only periodically - the file is still created but sometimes these extra 'files' are left on the server after it finishes. The code that creates the ZIP archive is as follows: $zip_archive = new ZipArchive(); $zip_archive->open($archiveFullName,ZIPARCHIVE::CREATE); if(!file_exists($archiveFullName)) { foreach ($completed_file_arr as $zip_file) { $isFiller = substr($zip_file,-8) == "_err.txt"; if(!$isFiller) { $zip_archive->addFile($zip_file,$localname); } else $zip_archive->addFromString ($zip_file, "The requested source file could not be found."); } } while(!$zip_archive->close()) sleep(1); //ensure that the ZIP file finishes closing

    Read the article

  • reading a file word by word

    - by nalbina
    I can read from a file 1 character at a time, but how do i make it go just one word at a time? So, read until there is a space and take that as a string. This gets me the characters: while (!fin.eof()){ while (fin f ){ F.push_back ( f ); }

    Read the article

  • deleting unaccessed files using python

    - by damon
    My django app parses some files uploaded by the user.It is possible that the file uploaded by the user may remain in the server for a long time ,without it being parsed by the app.This can increase in size if a lot of users upload a lot of files. I need to delete those files not recently parsed by the app -say not accessed for last 24 hours.I tried like this import os import time dirname = MEDIA_ROOT+my_folder filenames = os.listdir(dirname) filenames = [os.path.join(dirname,filename) for filename in filenames] for filename in filenames: last_access = os.stat(filename).st_atime #secs since epoch rtime = time.asctime(time.localtime(last_access)) print filename+'----'+rtime This shows the last accessed times for each file..But I am not sure how I can test if the file access time was within the last 24 hours..Can somebody help me out?

    Read the article

  • C: theory on how to extract files from an archived file

    - by donok
    In C I have created a program which can archive multiple files into an archive file via the command line. e.g. $echo 'file1/2' > file1/2.txt $./archive file1.txt file2.txt arhivedfile $cat archivedfile file1 file2 How do I create a process so that in my archivedfile I have: header file1 end header file2 end They are all stored in the archive file one after another after another. I know that perhaps a header file is needed(containing filename, size of filename, start and end of file) for extracting these files back out into their original form, but how would I go about doing this. I am stuck on where and how to start. Please could someone help me on some logic as to how to approach extracting files back out of an archived file.

    Read the article

  • Is modifying a file without writing a new file possible in c++?

    - by Phenom
    Let's say I have a text file that is 100 lines long. I want to only change what is in the 50th line. One way to do it is open the file for input and open a new file for output. Use a for-loop to read in the first half of the file line by line and write to the second file line by line, then write what I want to change, and then write out the second half using a for-loop again. Finally, I rename the new file to overwrite the original file. Is there another way besides this? A way to modify the contents in the middle of a file without touching the rest of the file and without writing everything out again? If there is, then what's the code to do it?

    Read the article

  • Control the MultipleOutputFormat files sub-path

    - by iCode
    I need to control the sub-path of the different different files being managed by MultipleOutputFormat based on the reducer key. I basically want to set the sub path of the file based on the key given to the reducer. I can changed the file name by overwrting the generateFileNameForKeyValue method of MultipleOutputFormatbut how can I also change the sub-path of these files? I mean with just overriding the generateFileNameForKeyValue, I get mySetJobConfigOutputPath/fileNameBasedKey1.dat /fileNameBasedKey2.dat /fileNameBasedKey3.dat ... but I want to make it to be organize files like below mySetJobConfigOutputPath/path0ConfiguredInsideReducerBasedOnKey/fileNameBasedKey1.dat /path1ConfiguredInsideReducerBasedOnKey/fileNameBasedKey2.dat /fileNameBasedKey3.dat /path2ConfiguredInsideReducerBasedOnKey/fileNameBasedKey8.dat as seen, the sub-path and the file name are both figured out by the key inside the reducer. I know how to configure the file name but was wondering if I can configure the sub-path of the each file under the mySetJobConfigOutputPath folder?

    Read the article

  • How to replace same text in a text file

    - by user1688220
    i created a c# windows login form and i am saving username or password to a text file but every time i use same username or password that i have saved before it takes new place in that text file. But What i want is to replace the same username or password that is already saved in that text file. this is my code: private void button1_Click(object sender, EventArgs e) { try { FileStream fs = new FileStream("data.txt", FileMode.Append, FileAccess.Write); StreamWriter sw = new StreamWriter(fs); sw.Write("Email ID: "); sw.WriteLine(textBox1.Text); sw.Write("Password: "); sw.Write(textBox2.Text); sw.WriteLine(); sw.WriteLine(); sw.Flush(); sw.Close(); fs.Close(); } catch (Exception) { MessageBox.Show("Error", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } MessageBox.Show("DONE", "Done", MessageBoxButtons.OK, MessageBoxIcon.Information); textBox1.Clear(); textBox2.Clear(); }

    Read the article

  • $_FILES empty on image upload

    - by zvir
    i need help, i'm programing some kind of catalogue and i have a page where clients can upload their logo or images. every page i make is included in index.php and my url looks like something like this www.url.com/index.php?s=upload where "upload" is name of upload.php file. when i create form on that upload.php file and submit it, $_FILES array is empty. echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"index.php\" />\n"; echo "<input type=\"file\" name=\"image\">\n"; echo "<input type=\"hidden\" name=\"s\" value=\"upload\">\n"; echo "<input type=\"submit\" name=\"submit\" value=\"Spremi\">\n"; echo "</form>\n"; i tried everything and nothing works. $_POST items are returned but $_FILES are empty...

    Read the article

  • Uploading files using HTTP Post Request

    - by Nakago
    Hi All, I want to upload files to a server which is also owned by me. I could think of two ways, of how this can be achieved. Method1: Use HTTP POST request to upload the files. The standard way of uploading files. Method2: Its a two step process. First the client does a POST request with all the details of the file, to the server. Then the server issues Get request(s) onto the client to get the contents of the file. Here method2 seems to be more secure, as the server is in control. The server can request data from the server only when the server feels it to be appropriate, and restrict the amount of data that needs to be transferred. Still i am confused as i am not an expert in this area. Anyone with more hindsight thoughts on this can you please share. Thanks

    Read the article

  • Windows XP batch file concat

    - by dls
    I'm trying to accomplish the following ridiculous task: I have a text file containing a set of fully qualified filesnames. I want to iterate through the file and append each line to a common variable, that can be passed to a command line tool. For example, the file might be: C:\dir\test.txt C:\WINDOWS\test2.txt C:\text3.txt and I'd like to assign them to some variable 'a' such that: a = "C:\dir\test.txt C:\WINDOWS\test2.txt C:\text2.txt" A secondary question is - what is a good batch file reference? I'm finding some stuff in the Windows material, and a lot of home-grown websites, but nothing particularly complete. Thanks!

    Read the article

  • Enter custom file name to be read ?

    - by ZaZu
    Hello, I want to allow users to type the name of any .txt file to be read/written. This is my code : printf("Enter .txt file name\n"); scanf("%s",&fname); FILE *inputf; inputf=fopen(&fname,"w"); Problem is this method does not work (having &fname) as a parameter. I can imagine its because C needs "filename.txt" for it work ... even if I enter for example : "custom.txt", the program returns an error of "Storage block not big enough for this operation" What is the correct method to accomplish this ? Im using C and im pretty much using basic commands .. (not too advanced) Thanks alot !!!

    Read the article

  • Using TFS source control - how to remove files

    - by arame3333
    I am a lone developer, and I am now using TFS 2010, having until recently used VSS. I have not found it easy to get any books for beginners to help me use this. So I have now got my project in source control. But when I check in I get references to a number of files that I no longer use. How do I remove files from the TFS Source Control repository? So in the example below you can see lots of files from different projects that I do not want to see.

    Read the article

  • open program once with multiple files as arguments from explorer

    - by Jonathan
    I have a program that works when, a file is opened with it using the right click menu in explorer. But if I select multiple files and then right click and open with my program then it opens multiple instances of my program, instead of just passing the multiple files as arguments to a single instance. The program is written in vb.net but is not a windows form, it is just a module, so I can to tick the Single instance option in the properties in Visual Studio. So how do I open multiple files from explorer context menu in a single instance.

    Read the article

  • using different string files in android

    - by boreas
    I'm porting my iPhone app to android and I'm having a problem with the string files now. The app is a translation tool and users can switch the languages, so all the localized strings are in both languages and they are independent from what locale the OS is running. For iOS version I have different files like de.strings, en.strings and fr.strings and so on. For every target with specified language pair I read the strings from the string tables, e.g. for de-fr I will include de.strings and fr.strings in project and set the name of the string tables in the info-list file and read strings from them. In the end I have one project containing different targets (with different info-list files) and all are well configured. I'm intending to do the same on android platform, but Is only one strings.xml allowed per project? How do I set different build target? How do I specify per target which strings.xml it should read?

    Read the article

  • How to move many files in multiple different directories (on Linux)

    - by user1335982
    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!

    Read the article

  • two log4j files for EAR with two modules

    - by nicktmro
    Hi, I have an EAR that is made up of two modules. Both expose services and share common code. Imagine that the ear has a common.jar shared by a webservices.war and webapp.war. I use log4j to log the activities. I would like to be able to have two log files (webservices.log and webapp.log) capturing the events that are specific to each of them plus all the stuff that is handled by the common.jar. How should I configure my categories and my appenders to achieve this? At the moment I have the following packages: com.myapp for shared stuff com.myapp.webservices for the webservices and com.myapp.webapp for the webapp. My problem is that I don't know how I can capture the com.myapp (common stuff) in both log files by using a single log4j configuration file. I have tried setting up multiple configuration files but when JBoss would work OK Websphere would break and the other way round... Thank you

    Read the article

  • Nested for-loop, searching files

    - by user2961510
    I have two files: filetest.txt ============ SSISPACKAGE1.dtsx SSISPACKAGE2.dtsx SSISPACKAGE3.dtsx SSISPACKAGE4.dtsx SSISPACKAGE5.dtsx SSISPACKAGE6.dtsx SSISPACKAGE7.dtsx SSISPACKAGE8.dtsx filetest2.txt ============= \\central_test_server\SSIS_Packages\Daily.bat \\central_test_server\SSIS_Packages\Weekly.bat \\central_test_server\SSIS_Packages\Monthly.bat \\central_test_server\SSIS_Packages\Quarterly.bat \\central_test_server\SSIS_Packages\SemiAnnually.bat \\central_test_server\SSIS_Packages\Annually.bat What I need is to cycle through filetest.txt, then search the files identified in filetest2.txt for the filename and output to a file the results. I am trying to identify in well over 100 bat files where each of about 100 SSIS Packages are running. I'm doing this in Windows batch, have tried about 20 various approaches without success - any help would be greatly appreciated.

    Read the article

< Previous Page | 160 161 162 163 164 165 166 167 168 169 170 171  | Next Page >