Search Results

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

Page 194/1640 | < Previous Page | 190 191 192 193 194 195 196 197 198 199 200 201  | Next Page >

  • PHP Force Download Causing 0 Byte Files

    - by Alex
    Hey, I'm trying to force download files from my web server using PHP. I'm not a pro in PHP but I just can't seem to get around the problem of files downloading in 0 bytes in size. CODE: $filename = "FILENAME..."; header("Content-type: $type"); header("Content-Disposition: attachment;filename=$filename"); header("Content-Transfer-Encoding: binary"); header('Pragma: no-cache'); header('Expires: 0'); set_time_limit(0); readfile($file); Can anybody help? Thanks.

    Read the article

  • CEF and the localized strings in *.pak files

    - by Vitaly
    I develop an application that uses the chromium embedded framework's control. I write in C++. I would like to use CEF mechanizm to localize an application if it exists. Can i embed the application's customized strings into CEF .pak files (en-US.pak and so on) so that i can retrieve these locolized strings in run-time? If so how can i embed them and how can i retrieve a given embedded string in my application code? If .pak files is not a case then is there other ability to localize an application through CEF? Could you please share any idea? Thanks

    Read the article

  • Handling static files with Django / lighttpd

    - by ptikobj
    I know that there is already a question (actually some more) about this, but the answers to them didn't help me out very much, as I am pretty new to lighttpd. I have one folder which contains .pdf-files. When doing a HttpResponseRedirect to the locations of one of those .pdf-files, the user should be able to download the .pdf file (or view it in the browser). Right now, Django just redirects to my "home" html page, without showing any pdf-file. Somehow, I will have to tell lighttpd that Django shouldn't handle this directory anymore. Is this the only thing I need to do? If yes, how should i do it?

    Read the article

  • How to properly set path to media files in Django

    - by sasquatch90
    Hello. I've got a new project, and currently I'm trying to set it correctly. But somehow I can't make my media files work. Here's my current setting : MEDIA_ROOT = os.path.normpath( '/home/budzyk/rails/fandrive/site_media/' ) templates setting work on the other hand : TEMPLATE_DIRS = ( "/home/budzyk/rails/fandrive/templates", ) Catalog with media files is ../fandrive/site-media/ so why it's not working ? Here's my base.html template with styles imported, and firebug window when my page is loaded : <head> <title>{% block title %}{% endblock %}</title> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/style.css" /> {% block pagecss %}{% endblock %} <script type="text/javascript" src="{{ MEDIA_URL }}jquery/jquery-1.4.2.min.js"></script> </head> <body> <div id="wrapper"> http://img237.imageshack.us/img237/4909/21205809.jpg

    Read the article

  • When and How to Delete temporary uploaded but uncommitted files in ASP.NET

    - by slowlycooked
    I'm using EO Ajax toolkits for upload files, the file is uploaded to server. when user click save then it will update the database for what been uploaded or changed. Now i need a clean up process that when user uploaded a file to server, but then close his/her browser before click the save button. in this case how should i programe so that the file user just uploaded is deleted, because it's now useless and not assosiated with any database. thanks. maybe i should upload all files to a temp folder, only when user click saver the file can be moved to target folder, at each session end the temp folder is get deleted.

    Read the article

  • Finding files with bash and copy to another location and reducing depth of folders

    - by Kevin F
    I'm trying to recover a mates hard drive, there is no structure what so ever so music and images are everywhere but in named folders sometimes 5 folders deep, I've managed to write a one-liner that finds the files and copies them to a mounted drive but it preserves the file structure completely. What I'm after is a bit of code that searches the drive and copies to another location and copies just the parent folder with the mp3/jpg files within and not the complete path. The other issue I have is the music is /folder/folder/folder/Artist/1.mp3..2.mp3..10.mp3 etc etc so I have to preserve the folder 'Artist' to give him any hope of finding his tracks again. What I have working currently: find /media/HP/ -name *.mp3 -fprintf /media/HP/MUSIC/Script.sh 'mkdir -p "/media/HP/MUSIC/%h" \n cp "%h/%f" "/media/HP/MUSIC/%h/"\n' I then run the script.sh and it does all the copying. Many Thanks

    Read the article

  • Grep for multiple patterns over multiple files

    - by prelic
    I've been googling around, and I can't find the answer I'm looking for. Say I have a file, text1.txt, in directory mydir whose contents are: one two and another called text2.txt, also in mydir, whose contents are: two three four I'm trying to get a list of files (for a given directory) which contain all (not any) patterns I search for. In the example I provided, I'm looking for output somewhere along the lines of: ./text1.txt or ./text1.txt:one ./text1.txt:two The only things I've been able to find are concerning matching any patterns in a file, or matching multiple patterns in a single file (which I tried extending to a whole directory, but received grep usage errors). Any help is much appreciated. Edit-Things I've tried grep "pattern1" < ./* | grep "pattern2" ./* "ambiguous redirect" grep 'pattern1'|'pattern2' ./* returns files that match either pattern

    Read the article

  • GIt Deployment + Configuration Files + Heroku

    - by Andrew
    I'm using Heroku to host a Rails app, which means using Git to deploy to Heroku. Because of the "pure Git workflow" on Heroku, anything that needs to go upstream to the server has to be configured identically on my local box. However I need to have certain configuration files be different depending on whether I'm in the local setup or deployed on Heroku. Again, because of the deployment method Heroku uses I can't use .gitignore and a template (as I have seen suggested many times, and have used in other projects). What I need is for git to somehow track changes on a file, but selectively tell git not to override certain files when pulling from a particular repo -- basically to make certain changes one-way only. Can this be done? I'd appreciate any suggestions!

    Read the article

  • How do I write a Java text file viewer for big log files

    - by Hannes de Jager
    I am working on a software product with an integrated log file viewer. Problem is, its slow and unstable for really large files because it reads the whole file into memory when you view a log file. I'm wanting to write a new log file viewer that addresses this problem. What are the best practices for writing viewers for large text files? How does editors like notepad++ and VIM acomplish this? I was thinking of using a buffered Bi-directional text stream reader together with Java's TableModel. Am I thinking along the right lines and are such stream implementations available for Java?

    Read the article

  • Archive tar files to a different location inperl

    - by user314261
    Hi, I am a newbee in Perl. I am reading a directory having some archive files and uncompressing the archive files one by one. Everything seems well however the files are getting uncompressed in the folder which has the main perl code module which is running the sub modules. I want the archive to be generated in the folder I specify. This is my code: sub ExtractFile { #Read the folder which was copied in the output path recursively and extract if any file is compressed my $dirpath = $_[0]; opendir(D, "$dirpath") || die "Can't open dir $dirpath: $!\n"; my @list = readdir(D); closedir(D); foreach my $f (@list) { print " \$f = $f"; if(-f $dirpath."/$f") { #print " File in directory $dirpath \n ";#is \$f = $f\n"; my($file_name, $file_dirname,$filetype)= fileparse($f,qr{\..*}); #print " \nThe file extension is $filetype"; #print " \nThe file name is is $file_name"; # If compressed file then extract the file if($filetype eq ".tar" or $filetype eq ".tzr.gz") { my $arch_file = $dirpath."/$f"; print "\n file to be extracted is $arch_file"; my $tar = Archive::Tar->new($arch_file); #$tar->extract() or die ("Cannot extract file $arch_file"); #mkdir($dirpath."/$file_name"); $tar->extract_file($arch_file,$dirpath."/$file_name" ) or die ("Cannot extract file $arch_file"); } } if(-d $dirpath."/$f") { if($f eq "." or $f eq "..") { next; } print " Directory\n";# is $f"; ExtractFile($dirpath."/$f"); } } } The method ExtractFile is called recursively to loop all the archives. When using $tar-extract() it uncompresses in the folder which calls this metohd. when I use $tar-extract_file($arch_file,$dirpath."/$file_name" ) I get an error : No such file in archive: '/home/fsang/dante/workspace/output/s.tar' at /home/fsang/dante/lib/Extraction.pm line 80 Please help I have checked that path and input output there is no issue with it. Seems some usage problem I am not aware of for $tar-extract_file(). Many thanks for anyone resolving this issue. Regards, Sakshi

    Read the article

  • Download multiple files in background in Android

    - by Addev
    Basically I'm trying to make a little app for watching offline content. So there's a moment where the user selects to download the contents (and the app should download about 300 small files and images). I'd like to show the user how does the process go if he enters the proper activity. Showing a list of all the files, telling what has been already downloaded, in progress or waiting for download. My problem is that I really don't know what approach to take for achieve this. Since the download should last until finished I imagine the solution is an Service, but whats best? an IntentService, a Bound Service or an Standard Service calling a startService() for each download? And how can I keep my objects updated for displaying them later? should I use a database or objects in memory? Thanks

    Read the article

  • Ignore designer and generated files in Resharper analysis

    - by RaYell
    I've been using Resharper for a few days and I really like this tool, but there's one thing that annoys me about it and I wonder if it can be changed. I'm getting lots of issue notifications from generated code (almost 1400 in my project). I'd want to set those files as ignored so they won't be checked as you can do with StyleCop and CodeAnalysis. Unfortunatelly it looks like Resharper ignores Generated Code settings from it's options because I'm still getting the same notifications. I've tried setting a file mask (i.e. for *.resx) and add files manually to generated, but still it doesn't change anything. I don't know if it matters but I'm using VS 2010.

    Read the article

  • PHP class referencing confusion across multiple files

    - by DssTrainer
    I have an index.php file that has 3 includes <?php require_once('mod.php'); $mod = new Mod(); require_once('start.php'); require_once('tools.php'); ....some code.... ?> I need to be able to reference the $mod object inside the start.php and tools.php. How do I pass that object to be referenced by those 2 other require files? Basically the mod.php is a class that has an array list generated in its __construct(). I want to use that array list data inside the startup.php and tools.php file but not sure how to pass in the existing one without calling "new" inside both of those files separately which doesn't do what I need since it resets everything. Thanks!

    Read the article

  • bash script to find/grep particular string in xml files in particular folders

    - by user3702188
    i have a problem at work, where i need to simplify the process how i searrh for logs. I would like to ask for help from experts here. We have different services for every channel. The structure is following: - root/channel_1/service_1/2014-05-21/file_54544654541.xml - root/channel_1/server2_2/2014-05-20/file_74272172.xml - root/channel_1/service_3/2014-05-22/file_45456546.xml - root/channel_2/service_4/2014-05-23/file_78754456.xml - root/channel_2/service_5/2014-05-24/file_546546546.xml my main problem is to find particular string in these xml files. Lets say, i know the channel name but i dont know the service name under which my particular string should be present. Also i know the date. So in search i want to enter the channel name the date and string. The search would be going via all service folders and looking for string only in all xml files under particular date folder and particular channel. any ideas for quickest and easiest solution to achieve this? Either by bash or perl? Any help would be appreciated thanks

    Read the article

  • ftp connects but files aren't visible browsing

    - by YsoL8
    Hello If this should be on that other site, please don't shoot me, as I can't remember the name or the url. I have an ftp account in Dreamweaver that connects to the remote site and appears to be uploading files as normal. But when I browse to the location I can't see any new files or changes to the index page. (I've uploaded index.php and connect.php). I'm getting a 404 page. I suspect the host directory is wrong, but looking at the file tree, I can't see the folder I'm supposed to be using, so I'm uploading to the apparent site root. Any guidance on this?

    Read the article

  • Creating files on a time (hourly) basis

    - by Yaniv
    Hi there, I experimenting with twitter streaming API, I use Phirehose to connect to twitter and fetch the data but having problems storing it in files for further processing. Basically what I want to do is to create a file named date("YmdH")."."txt" for every hour of connection. Here is how my code looks like right now (not handling the hourly change of files) public function enqueueStatus($status) $data = json_decode($status,true); if(isset($data['text'])/*more conditions here*/) { $fp = fopen("/tmp/$time.txt"); fwirte ($status,$fp); fclose($fp); } Help is as always much appreciated :)

    Read the article

  • SVN files edited thru FTP, How do I fix the edited files so they work thru SVN again?

    - by Bobby
    Basically, a 3rd party analyst we brought on to make some improvements to our site decided to edit files directly on the live server threw FTP. Any time we make changes to those pages threw SVN we have PHP parse errors. Things should be edited threw the SVN and committed. We have our working copies setup so we can edit them how ever we want while having them running under apache for testing. We commit all of our changes to a local repository, then commit from there to the live server. The code on the live server that causes the parse error has " .mine" and " .rxxxx", and my question is, how can I revert those files back to before they were edited thru FTP so I can update them threw SVN again?

    Read the article

  • php most memory efficient way to return files

    - by bumperbox
    so i have a bunch of files, some can be up to 30-40mb and i want to use php to handle security of the files, so i can control who has access to them that means i have a script sort of like this rough example $has_permission = check_database_for_permission($user, filename); if ($has_permission) { header('Content-Type: image/jpeg'); readfile ($filename); exit; } else { // return 401 error } i would hate for every request to load the full file into memory, as it would soon chew up all the memory on my server with a few simultaneous requests so a couple of questions is readfile the most memory efficient way of doing this? is there some better method of achieving the same outcome, that i am overlooking? server: apache/php5 thanks

    Read the article

  • Get standard application for txt files (.NET)

    - by iDog
    Possible Duplicate: Finding the default application for opening a particular file type on Windows Hello, in my application I want to open a text file, which has no .txt extension. Is there any way to get the standard application for .txt files in .NET (C#)? Sure I could use "notepad", but there might be some people (like me), who prefer another (their standard) editor. Thank you very much. Edit: The registry key "[HKEY_CLASSES_ROOT]\txtfile\shell\open\command" references notepad, but that's not my standard app for txt files. How do I get the my current standard app for .txt?

    Read the article

  • Changing a project's files based on solution in Visual Studio 2008

    - by emddudley
    In one C# solution I have several projects that share a CommonAssemblyInfo.cs file, so that certain assembly attributes are shared across all projects. This works fine so long as I only have one CommonAssemblyInfo.cs file. However I have several solutions (applications) which use these projects, and each solution has its own version of CommonAssemblyInfo.cs. How can I make the projects use a different CommonAssemblyInfo.cs file depending on which solution they are in? In the end I want my assemblies to have attributes specific to the solution they were compiled from. I don't think I can make them files Solution files because they can't all be in the same directory with the same filename. I can't use pre-build events because I don't have a particular project which is always built first. I would prefer not to use a build script because I would like to be able to build and run the solutions through the Visual Studio environment.

    Read the article

  • displaying the different uploaded files as thumbnails or any other way

    - by user1529342
    I have written code to upload the files of different types using php, and also i am saving their location information and date in database table. i made a query to display list of files i have uploaded...and resulting output on a html page as follows 1.uploads/clouds.png date and time 2.uploads/resume.pdf dare and time .......so on is there any different any way to display them by their file types as like an operating systems do..... or any better way.... I am curious to know it... Thanks for any help...

    Read the article

< Previous Page | 190 191 192 193 194 195 196 197 198 199 200 201  | Next Page >