Search Results

Search found 2310 results on 93 pages for 'downloading'.

Page 10/93 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Need help in downloading file with header() function

    - by riccardo
    Hi. I'm trying to explain as best as I can, sorry for my English. I have a list of links, each linked to a php file with an id by parameters (ex. download.php?id=1 or ?id=2 and so on). This file create a new instance of a class witch return the correct header of the files so it displays the save dialog box of the browser. Now I need to check if the files is already downloaded in past (The first time you downloaded it I add a field on the mysql db). This checks go ahead if you haven't download the files, else return false. Here is the problem, when it returns false or something else the browser redirect me to the download.php file, so I get a blank page or what I'm echoing. I need that if the file is already download it show me a js alert for advice ppl. Hope you can understand what i mean. Thanks for help

    Read the article

  • Custom changeable handler when a Service finishes downloading a file

    - by jax
    I have a Service that downloads a file from the internet. What I want is for the response (an InputStream in this case) to be handled by a custom handler that can be switched (like a strategy pattern) but I can't figure out how to do this. So basically the User of the API would be able to plug in different handlers for the response, some would parse XML, others might save files etc. I realise I could pass through the activity context and execute the method from this (given some interface) but I don't want to do this obviously, in case the Activity is closed in the meantime while the file is still downloaded. How might I do this?

    Read the article

  • Memory optimization while downloading

    - by lboregard
    hello all i have the following piece of code, that im looking forward to optimize, since i'm consuming gobs of memory this routine is heavily used first optimization would be to move the stringbuilder construction out of the download routine and make it a field of the class, then i would clear it inside the routine can you please suggest any other optimization or point me in the direction of some resources that could help me with this (web articles, books, etc). i'm thinking about replacing the stringbuilder by a fixed (much larger) size buffer ... or perhaps create a larger sized stringbuilder thanks in advance. StreamWriter _writer; StreamReader _reader; public string Download(string msgId) { _writer.WriteLine("BODY <" + msgId + ">"); string response = _reader.ReadLine(); if (!response.StartsWith("222")) return null; bool done = false; StringBuilder body = new StringBuilder(256* 1024); do { response = _reader.ReadLine(); if (OnProgress != null) OnProgress(response.Length); if (response == ".") { done = true; } else { if (response.StartsWith("..")) response = response.Remove(0, 1); body.Append(response); body.Append("\r\n"); } } while (!done); return body.ToString(); }

    Read the article

  • Downloading files in ASP.Net MVC web applications

    - by kingrichard2005
    Hello, I'm working on a project that requires the ability to let a user download a pdf from a static location on the server. I'm reading the instructions from this website, it's an old post and I notice they specify in an update that Microsoft's MVC framework has long since included and Action Result that allows the same functionality they discuss thus rendering it obsolete, I've looked a bit online but haven't been able to find any resources that discuss this built-in functionality. If anyone has any links or other information that discuss this it would be very helpful. Thanks.

    Read the article

  • PHP IIS problems downloading file says it is corrupt

    - by Matt
    Hi, I am running PHP on IIS 6 with mssql. I have uploaded a file to my webserver through a php script. Upon checking the file on the server the file is ok and not corrupt. However, when i then have a link on my website to try and download the file, it says the file is corrupt. I know the file isnt corrupt as i can view it perfectly if i look at the file on the server. Is seems like this is a common problem as a similar problem was posted here: http://www.bigresource.com/Tracker/Track-php-1pAakBhT/ Any help would be much appreciated. Thanks, M My download code is as follows: $filesize = $rows->filesize; $filepath = $rows->filepath; header("Content-Disposition: attachment; filename=$filename"); header("Content-length: $filesize"); header("Content-type: application/pdf"); header("Cache-control: must-revalidate"); header("Content-Description: PHP Generated Data"); readfile($filepath);

    Read the article

  • Doing some downloading without blocking you app

    - by Code
    Hi guys, I'm working on my first app that's doing a few different web connections at once. My first screen is my Menu. And at the bottom of viewDidLoad of MenuViewController i call a method that gets and parses a .xml file that is located on my webserver. Also at the bottom of viewDidLoad i do FootballScores = [[FootBallScores alloc] init]; and FootballScores makes a connection to a html page which it loads into a string and then parses out data. Now since both of these are getting called at the bottom of viewDidLoad of the class thats is responsible for the main menu(first screen in the app) it means the app is kinda slow to load. What is the right way to do the above? Should i remove the 2 pieces of code from my viewDidLoad and replace with maybe dataGetterOne = [NSTimer scheduledTimerWithTimeInterval:1.000 target:self selector:@selector(xmlParser) userInfo:nil repeats:NO]; dataGetterTwo = [NSTimer scheduledTimerWithTimeInterval:2.000 target:self selector:@selector(htmlParser) userInfo:nil repeats:NO]; This would mean that the methods get called later on and the viewDidLoad gets to finish before the i try get the data from the web servers. Making 2 connections to we bservers a second apart to quick? Can the iphone handle having 2 connections open at once? I'm really unsure of anything bad/dangerous I am doing in regards to connections. Many Thanks -Code

    Read the article

  • Downloading a web page and all of its resource files in Python

    - by Mark
    I want to be able to download a page and all of its associated resources (images, style sheets, script files, etc) using Python. I am (somewhat) familiar with urllib2 and know how to download individual urls, but before I go and start hacking at BeautifulSoup + urllib2 I wanted to be sure that there wasn't already a Python equivalent to "wget --page-requisites http://www.google.com". Specifically I am interested in gathering statistical information about how long it takes to download an entire web page, including all resources. Thanks Mark

    Read the article

  • Downloading From Google Docs

    - by jeremynealbrown
    Hello, I am using the gdata-java-client Version 2 with for and Android app that allows users to download documents from their Google Docs account. Currently I am able to authenticate, request and display a list of all the user's documents. From here I would like to open each type of document in a specific Activity. If it's a spreadsheet or a csv file, open it in one activity and if it is a text document open it in another activity. This is where things are getting hazy. First I need to determine what type of document the user selected in order download the file in the appropriate format by appending exporFormat=(csv,xls,doc,txt) to the query string. I don't see any indication in the original list of documents as to what kind of file the each entry is. Secondly as a test I can just append a raw string to the end of the query string. As an example, a query might look like this: https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=0AsE_6_YIr797dHBTUWlHMUFXeTV4ZzJlUGxWRnJXanc&exportFormat=xls Notice that at the end of the string is the hardcoded export format. This query returns a HTTPResponse with a 200 OK message. However if I look at the response.content or use response.parseAsString I see what appears to be a Google Docs home page has html text. I don't get this result when I try to download a text document. When I request a text document the response.content is the body of the text file. If I copy and paste this uri into a browser I get the requested file as a download. To summarize, this question is two-fold: 1. How do I determine the type( plain text, .doc, .csv, .xls ) of a document from the initial list of user documents. 2. How do I download the actual .csv or spreadsheet files? Thanks in advance.

    Read the article

  • WatiN downloading a file from webpage

    - by user541597
    I have the following code which does a couple of webpage redirections and then clicks an tag which has a javascript fuction as the href. When it is called a file is download. My problem is I want to be able to download the file without being prompted to cancel, save or open. Please help I am using IE9 using (var browser = new IE("http:url.aspx")) { browser.TextField(Find.ByName("ctl00$ContentPlaceHolder1$Login1$UserName")).TypeText("cpereyra"); browser.TextField(Find.ByName("ctl00$ContentPlaceHolder1$Login1$Password")).TypeText("Maxipereyra15"); browser.Button(Find.ByName("ctl00$ContentPlaceHolder1$Login1$LoginButton")).Click(); browser.GoTo("http://it-motivity-cmc/Movation/MyPage/MyDashboard.aspx?dynamicdashboardid=ab000000-7dea-11c9-b596-d01e04bebb94"); while (browser.Eval("document.readyState") != "complete") { Thread.Sleep(1000); } Div div = browser.Div("ctl00_ContentPlaceHolder1_wrapper_vis_zone1_1"); div.Link(link => link.Text == "Export to CSV").Click(); }

    Read the article

  • .htaccess - deny downloading of files

    - by user317005
    I keep several fonts in the directory "/fonts/" on my server which I then load into my css files via @font-face. However, I want to make sure that people cannot download the file just by simply going to http://www.domain.com/fonts/fontname.ttf. Can I somehow prevent this, and still be able to load the font files into my css files? Because I think putting deny from all into the .htaccess file will even prevent the css files for correctly loading the fonts. I hope this makes sense.

    Read the article

  • Downloading and Reading

    - by Jan Evans
    First I am a complete novice and need answers in plain and simple terms. I am trying to get the users manual for my Samsung galaxy s4 phone. Samsung "help" sent me a link to click but when I received it it was in Spanish tho the doc I'd said "english". The Samsung support line timed me out because I couldn't type fast enough when I told them I received it in Spanish. I explored the translator and didn't see how to translate a doc. Asked Google how to get the manual they gave a different doc I'd and sent it to clipboards. How can I read it? Now what? Tried to send this message and asking me for a tag and I have no idea what that means so I just clicked one. That's why I need the manual so desperately. It would be so much easier for me to get a paper copy of it but they want

    Read the article

  • Reducing lag when downloading large amount of data from webpage

    - by Mahir
    I am getting data via RSS feeds and displaying each article in a table view cell. Each cell has an image view, set to a default image. If the page has an image, the image is to be replaced with the image from the article. As of now, each cell downloads the source code from the web page, causing the app to lag when I push the view controller and when I try scrolling. Here is what I have in the cellForRowAtIndexPath: method. NSString * storyLink = [[stories objectAtIndex: storyIndex] objectForKey: @"link"]; storyLink = [storyLink stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSString *sourceCode = [NSString stringWithContentsOfURL:[NSURL URLWithString:storyLink] encoding:NSUTF8StringEncoding error:&error]; NSString *startPt = @"instant-gallery"; NSString *startPt2 = @"<img src=\""; if ([sourceCode rangeOfString:startPt].length != 0) { //webpage has images // find the first "<img src=...>" tag starting from "instant-gallery" NSString *trimmedSource = [sourceCode substringFromIndex:NSMaxRange([sourceCode rangeOfString:startPt])]; trimmedSource = [trimmedSource substringFromIndex:NSMaxRange([trimmedSource rangeOfString:startPt2])]; trimmedSource = [trimmedSource substringToIndex:[trimmedSource rangeOfString:@"\""].location]; NSURL *url = [NSURL URLWithString:trimmedSource]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *image = [UIImage imageWithData:data]; cell.picture.image = image; Someone suggested using NSOperationQueue. Would this way be a good solution? EDIT: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"FeedCell"; LMU_LAL_FeedCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if (cell == nil) { NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"LMU_LAL_FeedCell" owner:self options:nil]; cell = (LMU_LAL_FeedCell*) [nib objectAtIndex:0]; } int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1]; NSString *untrimmedTitle = [[stories objectAtIndex: storyIndex] objectForKey: @"title"]; cell.title.text = [untrimmedTitle stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; CGSize maximumLabelSize = CGSizeMake(205,9999); CGSize expectedLabelSize = [cell.title.text sizeWithFont:cell.title.font constrainedToSize:maximumLabelSize]; //adjust the label to the the new height. CGRect newFrame = cell.title.frame; newFrame.size.height = expectedLabelSize.height; cell.title.frame = newFrame; //position frame of date label CGRect dateNewFrame = cell.date.frame; dateNewFrame.origin.y = cell.title.frame.origin.y + cell.title.frame.size.height + 1; cell.date.frame = dateNewFrame; cell.date.text = [self formatDateAtIndex:storyIndex]; dispatch_queue_t someQueue = dispatch_queue_create("cell background queue", NULL); dispatch_async(someQueue, ^(void){ NSError *error = nil; NSString * storyLink = [[stories objectAtIndex: storyIndex] objectForKey: @"link"]; storyLink = [storyLink stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSString *sourceCode = [NSString stringWithContentsOfURL:[NSURL URLWithString:storyLink] encoding:NSUTF8StringEncoding error:&error]; NSString *startPt = @"instant-gallery"; NSString *startPt2 = @"<img src=\""; if ([sourceCode rangeOfString:startPt].length != 0) { //webpage has images // find the first "<img src=...>" tag starting from "instant-gallery" NSString *trimmedSource = [sourceCode substringFromIndex:NSMaxRange([sourceCode rangeOfString:startPt])]; trimmedSource = [trimmedSource substringFromIndex:NSMaxRange([trimmedSource rangeOfString:startPt2])]; trimmedSource = [trimmedSource substringToIndex:[trimmedSource rangeOfString:@"\""].location]; NSURL *url = [NSURL URLWithString:trimmedSource]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImage *image = [UIImage imageWithData:data]; dispatch_async(dispatch_get_main_queue(), ^(void){ cell.picture.image = image; }); }) //error: expected expression } return cell; //error: expected identifier } //error extraneous closing brace

    Read the article

  • Detected when everything has finished downloading

    - by oshirowanen
    Using only HTML, CSS, and Javascript, has the web development world got to a stage where it is possible to display a loading message on the screen until absolutely everything has downloaded before the web page is displayed on the screen? For example, display "loading", until all html, css, javascript, images etc etc have downloaded and can be displayed without the user seeing bits of the website still appearing after the load message has gone?

    Read the article

  • downloading security related problem in php

    - by pareek-rohit
    hi i have to upload a video.but i want to gives permission only authenticate user to download .but i have a problem in that.because if any body type the video detail in browser.(ex http://sitename/folder_name/videoname) then browser download that video.but i don't want this .please suggest me how can i resolve this problem.either i should generate the video name randomly or make a temporary folder in which video reside only for specific time,after this video will be delete. Or if any other ideas you have please let me know Thanks in advance

    Read the article

  • Downloading game assests to SD card on Android

    - by hgpc
    I'm developing an Android game that has to download some assets to the SD card to keep the size of the app as small as possible. I was thinking of using an uncompressed zip file to bundle all the assets. A requirement from the client is to protect these assets as much as possible. Being part of the apk is considered enough protection, but if I do this the apk size will be enormous. If I just put a zip bundle in the SD card, then anyone can unzip it and explore its contents. Is there a simple way to do this without retorting to horrid DRM? Obviously if someone really wants to check the resources of an Android game, they can. I'm just looking for a simple solution to avoid making this very easy.

    Read the article

  • Downloading Large JSON File to local file using Java

    - by user1279675
    I'm attempting to download a JSON from the following URL - http://api.crunchbase.com/v/1/companies.js - to a local file. I'm using Java 1.7 and the following JSON Libraries - http://www.json.org/java/ - to attempt to make it work. Here's my code: public static void download(String address, String localFileName) { OutputStream out = null; URLConnection conn = null; InputStream in = null; try { URL url = new URL(address); out = new BufferedOutputStream( new FileOutputStream(localFileName)); conn = url.openConnection(); in = conn.getInputStream(); byte[] buffer = new byte[1024]; int numRead; long numWritten = 0; while ((numRead = in.read(buffer)) != -1) { out.write(buffer, 0, numRead); numWritten += numRead; System.out.println(buffer.length); System.out.println(" " + buffer.hashCode()); } System.out.println(localFileName + "\t" + numWritten); } catch (Exception exception) { exception.printStackTrace(); } finally { try { if (in != null) { in.close(); } if (out != null) { out.close(); } } catch (IOException ioe) { } } } When I run the code everything seems to work until midway through the loop the program seems to stop and not continue reading the JSON Object. Does anyone know why this would stop reading? How could I fix the issue?

    Read the article

  • downloading full page text from a web domain

    - by user362808
    Howdy, folks! First time here -- thought I'd field a question on behalf of a coworker. Somebody in my lab is doing a content analysis (e.g. reading an article or transcript line by line and identifying relevant themes) of the web presences of various privatized neuroimaging centers (e.g. http://www.canmagnetic.com/). She's been c/ping entire site maps by hand, and I know I could slap something together with Python to follow links and dump full text (with line numbers) for her, but I've never actually done anything quite like this. Any ideas for how I'd get started? Cheers, -alex

    Read the article

  • Downloading image from server without file extension (NSData to UIImage)

    - by Msencenb
    From my server I'm pulling down a url that is supposed to simply be a profile image. The relevant code for pulling down the image from the urls is this: NSString *urlString = [NSString stringWithFormat:@"%@%@",kBaseURL,profile_image_url]; profilePic = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlString]]]; My url is in the format (note no file extension on the end since its dynamically rendered) localhost:8000/people/1/profile_image If I load the url in my browser the image displays; however the code above for pulling down the UIImage does not work. I've verified that the code does pull an image from a random site on the interwebs. Any thoughts on why this is happening?

    Read the article

  • Downloading files from an http server in python

    - by cellular
    Using urllib2, we can get the http response from a web server. If that server simply holds a list of files, we could parse through the files and download each individually. However, I'm not sure what the easiest, most pythonic way to parse through the files would be. When you get a whole http response of the generic file server list, through urllib2's urlopen() method, how can we neatly download each file?

    Read the article

  • Downloading file using FTP client in BlackBerry

    - by AMUL
    Hi i am new to blackberry (7.0) environment. Recently i have been trying to download a file from the server on to the sdcard of the simulaotr through a FTP client. After searching a lot, i have not been able to find a reference for how to code a FTP. Can anyone please help or provide me a link where i can get a sample code of how to download a file using FTP. Also when i was working in Android environment previously, i made use of external jar file of FTP. But in Blackberry that same jar file is of no use. So please help me its part of my project...

    Read the article

  • Downloading Spring Framework 3.2.x

    - by PM 77-1
    I'm looking at springsource community download site. It shows that 3.2.4 is the latest general release. Its zip file has dist suffix and the content is different than the latest in 3.1 branch 3.1.4 (which does not have dist ending). 3.1.4 has the following directories: dist projects src dist folder contains org.springframework...* jars. 3.2.4 has the following directories: docs libs schema lib folder contains spring-... jars Was there a major change between 3.1 and 3.2 releases? According to this accepted answer there was but I was not able to find anything about it. Does anybody have any particulars? Should I get 3.1.4 for now?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >