Search Results

Search found 11542 results on 462 pages for 'download'.

Page 138/462 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • ob_start() -> ob_flush() doesn't work

    - by MB34
    I am using ob_start()/ob_flush() to, hopefully, give me some progress during a long import operation. Here is a simple outline of what I'm doing: <?php ob_start (); echo "Connecting to download Inventory file.<br>"; $conn = ftp_connect($ftp_site) or die("Could not connect"); echo "Logging into site download Inventory file.<br>"; ftp_login($conn,$ftp_username,$ftp_password) or die("Bad login credentials for ". $ftp_site); echo "Changing directory on download Inventory file.<br>"; ftp_chdir($conn,"INV") or die("could not change directory to INV"); // connection, local, remote, type, resume $localname = "INV"."_".date("m")."_".date('d').".csv"; echo "Downloading Inventory file to:".$localname."<br>"; ob_flush(); flush(); sleep(5); if (ftp_get($conn,$localname,"INV.csv",FTP_ASCII)) { echo "New Inventory File Downloaded<br>"; $datapath = $localname; ftp_close($conn); } else { ftp_close($conn); die("There was a problem downloading the Inventory file."); } ob_flush(); flush(); sleep(5); $csvfile = fopen($datapath, "r"); // open csv file $x = 1; // skip the header line $line = fgetcsv($csvfile); $y = (feof($csvfile) ? 2 : 5); while ((!$debug) ? (!feof($csvfile)) : $x <= $y) { $x++; $line = fgetcsv($csvfile); // do a lot of import stuff here with $line ob_flush(); flush(); sleep(1); } fclose($csvfile); // important: close the file ob_end_clean(); However, nothing is being output to the screen at all. I know the data file is getting downloaded because I watch the directory where it is being placed. I also know that the import is happening, meaning that it is in the while loop, because I can monitor the DB and records are being inserted. Any ideas as to why I am not getting output to the screen?

    Read the article

  • How to invoke the getView method in the baseAdapter in Android from another WebService Bean?

    - by greysh
    The adapter in my code as follows, I extends the base adapter: @Override public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder vHolder; // if (convertView == null) { vHolder = new ViewHolder(); convertView = mInflater.inflate(R.layout.home_item, null); vHolder.albumIcon = (ImageView) convertView .findViewById(R.id.albumIcon); try { Bitmap icon = aws.getAlbumImg(itemInfolist.get(position) .getAlbumInfoCol().get(0).getAlbumID(), 0); if (icon != null) { vHolder.albumIcon.setImageBitmap(icon); } else { vHolder.albumIcon.setImageBitmap(BitmapFactory.decodeResource( context.getResources(), R.drawable.album)); } } catch (Exception e) { vHolder.albumIcon.setImageBitmap(BitmapFactory.decodeResource( context.getResources(), R.drawable.album)); } convertView.setTag(vHolder); return convertView; } However, I download the imagine asynchronously, When invoke Bitmap icon = aws.getAlbumImg(itemInfolist.get(position).getAlbumInfoCol().get(0).getAlbumID(), 0); Some pictures which haven't downloaded will use the default image, after these picutures have downloaded in another Web Service Bean, I want the Web Service bean sends a message to invoke the getView method in this adapter in order to implement the auto refresh function. But if I change the Web Service Download Bean as follows,it will cause the exception 03-19 07:46:33.241: ERROR/AndroidRuntime(716): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. HomeAdapter mHomeAdapter; public AlbumWS(HomeAdapter homeAdapter) { mHomeAdapter = homeAdapter; } And after download, public boolean getAlbumImgWS(final ArrayList albumIDs) { new Thread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub AlbumInfoWS aiws = new AlbumInfoWS(); for (int i = 0; i < albumIDs.size(); ++i) { if (ABSCENTALBUMIMGS.contains(albumIDs.get(i))) { continue; } if (FunctionUtil.isExist(albumIDs.get(i))) { continue; } String urlPath = aiws.getAlbumImage("en_US", Config.IMG_ATTIBUTETYPE, albumIDs.get(i)); boolean ret = FunctionUtil.simpleDownload(Config.HOST + urlPath, "/data/data/com.greysh.amped/img/" + albumIDs.get(i) + ".jpg"); if (!ret) { if (!ABSCENTALBUMIMGS.contains(albumIDs.get(i))) { ABSCENTALBUMIMGS.add(albumIDs.get(i)); } } mHomeAdapter.notifyDataSetChanged(); } } }).start(); return true; }

    Read the article

  • How to work around a site forbidding me to scrape their images with PHP

    - by Petruza
    I'm scraping a site, searching for JPGs to download. Scraping the site's HTML pages works fine. But when I try getting the JPGs with CURL, copy(), fopen(), etc., I get a 403 forbiden status. I know that's because the site owners don't want their images scraped, so I understand a good answer would be just don't do it, because they don't want you to. Ok, but let's say it's ok and I try to work around this, how could this be achieved? If I get the same URL with a browser, I can open the image perfectly, it's not that my IP is banned or anything, and I'm testing the scraper one file at a time, so it's not blocking me because I make too many requests too often. From my understanding, it could be that either the site is checking for some cookies that confirm that I'm using a browser and browsing their site before I download a JPG. Or that maybe PHP is using some user agent for the requests that the server can detect and filter out. Anyway, have any idea?

    Read the article

  • session set for some Actions in Zend framework

    - by user202127
    I'm working on a website , in CV part users have some articles that only logged in users can download them.I want to make changes to the log in Action or preDispatch() to set session for guess users to download the articles, can some one tell me how it can be or give me some reference links. here is my preDispatch(): public function preDispatch() { $userInfo=$this->_auth->getStorage()->read(); $identity= $this->_auth->getIdentity(); if(!$this->_auth->hasIdentity()) { return $this->_helper->redirector('login','login'); } if(!isset($userInfo["member_id"]) || strlen($userInfo["member_id"])==0) { return $this->_helper->redirector('forbidden','login'); } $this->_accessType=2; }

    Read the article

  • Ability to Choose From Multiple SQLite DBs for Iphone Application

    - by Mark
    I am working on the design and implementation of an iPhone application ( a newbie, but I am getting the hang of it) where a person can download specific contact information about teachers based on their majors. The information is currently on different edu websites. And I have exported the information into SQLite databases. Is it possible to develop the application that when it is first initiated, it can give the user the option of which particular SQLite database they want for their application? Or if not, would it be better to merge all the DBs into one DB, and allow the user the option of downloading specific information from the SQLite db. I see that the db's can be downloaded into an app, but have yet to find a solution where there can be an option to download from different SQLite dbs. Thanks!

    Read the article

  • VB.Net HTTPWebRequest Speed is slow comparing Python URLOpen

    - by regexhacks
    Hi I am coding a web-crawler which will crawl the websites and selectively parse different sections of a web site. I am a .Net developer so the choice was obvious that I did it in .Net but the speed was very slow which included downloading and parsing of HTMLPages Then I tried to just download the contents first using .Net and then same domains using python but the python was very impressive in downloading data. I have achieved downloading using python but the later part is not that easy to code in python, which obviously i don't want to do. The same batch of domain which took 100 seconds in Python was taking 20 minutes in .Net based crawler I tried http://www.eqlit.com/ to download and in took 8 seconds in Python and same was taking 100 Seconds in .Net crawler Does anyone anyone have any idea why this is slow in .Net but fast in python?

    Read the article

  • Automatic program update and Windows 7

    - by Mmarquee
    Hi We have a suite of programs that check for new versions at startup, and then download new versions to run if required. This is obviously a problem in Windows 7, when it is locked down as a 'standard user', as they can't write to the c:\program files directory and below. Anyone seen a example of an application that gets around with issue ? Our applications are written in Delphi, but an example in any language would be useful. Thanks in advance Update: We already have a system for determing whether a new version exists, the only problem is the download and install (if required), as this requires elevation. I can't think of a way that doesn't require an elevation prompt, or our users to reduce their security settings. Update 2 : I've asked a subsequent question, rather than adding a new one here

    Read the article

  • How do I make a project built into a downloadable Cd?

    - by Dcurvez
    hi all I just got finished making my first project in visual studio 2008. what I want to do is put it on a CD and let another person run it. I went to the clean and build and publish and all went well. When I took it to my friends house to put it on her computer..i never got a "download" and "install" screen. We were able to see it and use it on her computer (which is good cuz she doesnt have Visual on her machine) but I wanted her to be able to use it without keeping the CD in the drive. Is there some setup or something I have to do to make my program download and install? The whole shibang was all done with starting a new windows application..and then just adding windows forms to the original. Thanks :)

    Read the article

  • I need to view the docx file from mysql database on screen and highlight the keyword

    - by Jensen Aw
    I would like to ask could I collect the doxc file that i had upload before and display only on screen but not download and also i would like to highlight the keywords? I have successfully upload and download the docx file and it look prefect. But how if I would like to just display on screen in php or html format and highlight the keyword. The problem I got now is when I collect the docx file from mysql and echo on page it gave me all messy words and I've try a lot of methods still couldn't get the docx file print on screen. Anyone please help me, I'm totally lost and hopeless...

    Read the article

  • Crossthread exception and invokerequired solution doesn't change my control value

    - by Pilouk
    EDIT Solution : Here i'm setting my byref value in each object then i'm running a backgroundworker Private Sub TelechargeFichier() Dim DocManquant As Boolean = False Dim docName As String = "" Dim lg As String = "" Dim telechargementFini As Boolean = False lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1478") prgBar.Maximum = m_listeFichiers.Count For i As Integer = 0 To m_listeFichiers.Count - 1 m_listeFichiers(i).Set_ByRefLabel(lblMessage) m_listeFichiers(i).Set_ByRefPrgbar(prgBar) m_listeThreads.Add(New Thread(AddressOf m_listeFichiers(i).DownloadMe)) Next m_bgWorker = New BackgroundWorker m_bgWorker.WorkerReportsProgress = True AddHandler m_bgWorker.DoWork, AddressOf DownloadFiles m_bgWorker.RunWorkerAsync() ''Completed 'lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1383") 'Me.DialogResult = System.Windows.Forms.DialogResult.OK End Sub Here is my downloadFiles function : Note that each start will do the downloadMe function see below too Private Sub DownloadFiles(sender As Object, e As DoWorkEventArgs) For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Start() Next For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Join() Next End Sub I have multiple thread that each will download a ftp file. I would like that each file that have been completed will set a value to a progress bar and a label from my UI thread. For some reason invokerequired never change to false. Here is my little function that start all the thread Private Sub TelechargeFichier() Dim DocManquant As Boolean = False Dim docName As String = "" Dim lg As String = "" Dim telechargementFini As Boolean = False lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1478") prgBar.Maximum = m_listeFichiers.Count For i As Integer = 0 To m_listeFichiers.Count - 1 m_listeFichiers(i).Set_ByRefLabel(lblMessage) m_listeFichiers(i).Set_ByRefPrgbar(prgBar) m_listeThreads.Add(New Thread(AddressOf m_listeFichiers(i).DownloadMe)) Next For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Start() Next For i As Integer = 0 To m_listeThreads.Count - 1 m_listeThreads(i).Join() Next 'Completed lblMessage.Text = EasyDealChangeLanguage.Instance.GetStringFromResourceName("1383") Me.DialogResult = System.Windows.Forms.DialogResult.OK End Sub Here my property that hold the Byref control from the UI thread. This is in my object which content the addressof function that will download the file (DownloadMe) Public Sub Set_ByRefPrgbar(ByRef prgbar As ProgressBar) m_prgBar = prgbar End Sub Public Sub Set_ByRefLabel(ByRef lbl As EasyDeal.Controls.EasyDealLabel3D) m_lblMessage = lbl End Sub Here is the download function : Public Sub DownloadMe() Dim ftpReq As FtpWebRequest Dim ftpResp As FtpWebResponse = Nothing Dim streamInput As Stream Dim fileStreamOutput As FileStream Try ftpReq = CType(WebRequest.Create(EasyDeal.Controls.Common.FTP_CONNECTION & m_downloadFtpPath & m_filename), FtpWebRequest) ftpReq.Credentials = New NetworkCredential(FTP_USER, FTP_PASS) ftpReq.Method = WebRequestMethods.Ftp.DownloadFile ftpResp = ftpReq.GetResponse streamInput = ftpResp.GetResponseStream() fileStreamOutput = New FileStream(m_outputPath, FileMode.Create, FileAccess.ReadWrite) ReadWriteStream(streamInput, fileStreamOutput) Catch ex As Exception 'Au pire la fichier sera pas downloader Finally If ftpResp IsNot Nothing Then ftpResp.Close() End If Dim nomFichier As String = m_displaynameEN If EasyDealChangeLanguage.GetCurrentLanguageTypes = EasyDealChangeLanguage.EnumLanguageType.Francais Then nomFichier = m_displaynameFR End If If m_lblMessage IsNot Nothing Then EasyDealCommon.TH_SetControlText(m_lblMessage, String.Format(EasyDealChangeLanguage.Instance.GetStringFromResourceName("1479"), nomFichier)) End If If m_prgBar IsNot Nothing Then EasyDealCommon.TH_SetPrgValue(m_prgBar, 1) End If End Try End Sub Here is the crossthread invoke solution function : Public Sub TH_SetControlText(ByVal ctl As Control, ByVal text As String) If ctl.InvokeRequired Then ctl.BeginInvoke(New Action(Of Control, String)(AddressOf TH_SetControlText), ctl, text) Else ctl.Text = text End If End Sub Public Sub TH_SetPrgValue(ByVal prg As ProgressBar, ByVal value As Integer) If prg.InvokeRequired Then prg.BeginInvoke(New Action(Of ProgressBar, Integer)(AddressOf TH_SetPrgValue), prg, value) Else prg.Value += value End If End Sub The problem is the invokerequired never get to false it actually goes in to beginInvoke but never end in the Else section to set the value.

    Read the article

  • jboss web services to tranfer files

    - by mengmenger
    I dont have any experience for web services. please give me some suggestion about the task below. the task is: users will send a txt file (size should less than 20K ) from a .NET application, I need to write a web services which runs by jboss 5.x to read this file and edit this file and send the file back to .NET UI to display the edited version. question is that if the txt file is just test string or binary string, are there any restriction of the string length? if it's binary string, can I need to use BinaryReader class to read it? or not need special reader to read it? (this could be a dumn question :P) what if the .NET application can save the file on either the .NET application server or some shared server location, send a download URL to web serivces, can web services download it and read it? JBoss will be run on Linux sever. After edit the file, how do I send it back? Thanks for your help!

    Read the article

  • Need help specifying a ending while condition

    - by johnthexiii
    I have written a Python script to download all of the xkcd comic images. The only problem is I can't tell it to stop when it gets to the last one... Here is what I have so far. import re, mechanize from urllib import urlretrieve from BeautifulSoup import BeautifulSoup as bs baseUrl = "http://xkcd.com/1/" #Specify the first comic page br = mechanize.Browser() #Create a browser response = br.open(baseUrl) #Create an initial response x = 1 #Assign an initial file name while (SomeCondition): soup = bs(response.get_data()) #Create an instance of bs that contains the response data img = soup.findAll('img')[1] #Get the online file path of the image localFile = "C:\\Comics\\xkcd\\" + str(x) + ".jpg" #Come up with a local file name urlretrieve(img["src"], localFile) #Download the image file response = br.follow_link(text = "Next >") #Store the response of the next button x += 1 #Increase x by 1 print "All xkcd comics downloaded" #Let the user know the images have been downloaded Initially what I had was something like while br.follow_link(text = "Next >") != br.follow_link(text = ">|"): but by doing this I actually send skip to the last page before the script has a chance to perform the intended purpose.

    Read the article

  • Image URL has the contentType "text/html"

    - by user1503025
    I want to implement a method to download Image from website to laptop. public static void DownloadRemoteImageFile(string uri, string fileName) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); if ((response.StatusCode == HttpStatusCode.OK || response.StatusCode == HttpStatusCode.Moved || response.StatusCode == HttpStatusCode.Redirect) && response.ContentType.StartsWith("image", StringComparison.OrdinalIgnoreCase)) { //if the remote file was found, download it using (Stream inputStream = response.GetResponseStream()) using (Stream outputStream = File.OpenWrite(fileName)) { byte[] buffer = new byte[4096]; int bytesRead; do { bytesRead = inputStream.Read(buffer, 0, buffer.Length); outputStream.Write(buffer, 0, bytesRead); } while (bytesRead != 0); } } } But the ContentType of request or response is not "image/jpg" or "image/png". They're always "text/html". I think that's why after I save them to local, they has incorrect content and I cannot view them. Can anyone has a solution here? Thanks

    Read the article

  • IIS serving corrupted MSI

    - by CF_Maintainer
    Hello, I am trying to put an .msi for download in a virtual directory setup with IIS. The download works fine but when I try and install the .msi, it says it is missing a _cabinet file. Me and a coworker had this issue will the installer downloaded fine & ran correctly on another coworker's machine. Am I missing anything? Is it a better approach to send the .msi as a byte[] via a webservice and assemble it on the client side?

    Read the article

  • How to open a selected file in android?

    - by Karthick
    In windows text files are displayed with notepad icon. When we double click the particular file it open’s the notepad and displays the file. Like that I need to open the file from the download folder in android. I have used the intent-filter for register my ics file’s mime type. When I select the file in the download folder it just opens my application only. At that time I need to open / read the selected file. How to do this? I am new to android Can anyone help me?

    Read the article

  • How to access a file in local system using javascript?

    - by Ka-rocks
    I'm using JQuery mobile frame work. I'm having a server which host a website. The user can connect to website through mobile browser and download files(.doc, .xls, .pdf etc) from that website. I need to open the file which is saved in the user's mobile programmatically using java script. I tried to open using location.href="file://sdcard/download/test.doc". But it didn't work. It showed permission denied. Is there any way to this? Please help. Thanks in advance.

    Read the article

  • Have a workaround for the 1,000 file limit in a directory on windows mobile 5?

    - by nateday76
    I need to download more than 1,000 files into a windows mobile 5 directory located on the storage card. If i copy the files onto the storage card via my desktop there is no problem. But when i try to download the files from the handheld device I get a disk full error, even though there is plenty of room due to the 1,000 file limit. Has anyone run into this and found a workaround? I'm going to try zipping all of the files then decompressing on the device but not sure that this will work.

    Read the article

  • How to complete a git clone for a big project on an unstable connection?

    - by LaPingvino
    I am trying to git clone the LibreOffice codebase, but at the moment I have an internet connection by mobile phone of about 300kbps and it's just anything but stable. I can get the connection back any moment, but then the git clone process already stopped working, and no way to get it running again. Is there some way to have a more failure-resistant git clone download? One option I considered myself is to download someone else's .git directory, but that is overly dependent of others and doesn't seem like the best possible solution to me.

    Read the article

  • FTP: check whether file is closed

    - by Andrey
    Hello! My FTP client (apache commons ftpclient) needs to download file from FTP. The problem is that an external service may not have finished writing to this file before I start downloading. Is there any way to determine via FTP whether the file is already closed (i.e. there is no writing handlers opened)? The problem is that I cannot synchronize with that external service. But I mustn't download file which is not finished yet (a large JPEG). Thanks in advance!

    Read the article

  • Mobile web apps - Is this the right approach?

    - by Pasta
    I need to build a cross platform mobile app (iphone, android, etc). The app is for a company like a cellular operator (Tmobile, ATT). The app needs to do the following: Show previous bills (cached so that it does not have to download everytime) Need an internet connection to download newer bills, view recent data, etc. Can I build a mobile web app to handle this? I understand that there is offline storage and iPhone has good support for web apps (full screen, good icons, offline, etc). Will a web app be the best approach to take as the app requires to be online? The app will not be used by lots of people, just customers of the website who don't want to use an existing website. We are all web developers and a mobile web app looks like the best way to approach this.

    Read the article

  • Running the script for the 2-nd time, the messages are not retrieved from the mail server

    - by Max Li
    I read the mails from my gmail account with the code following below. import poplib pop_conn = poplib.POP3_SSL('pop.gmail.com') pop_conn.user('user') # result: '+OK send PASS' pop_conn.pass_('password') # result: '+OK Welcome.' print pop_conn.list()[1] pop_conn.quit() It shows me 1 message as expected. However, if I run this script for the second time, I get 0 messages as result. On the server the message is still there and unread. How can I get all the messages also running the script for the second time? For me it behaves as an email client that doesn't download the same mail twice. Is there some flag to force the program to download everything again? I use python 2.7.x on ubuntu 12.10

    Read the article

  • Keeping iPhone App private after AppStore approval for beta testing.

    - by Stack
    I have messed around with AD-HOC distribution quite a bit and got it working too. The problem I am facing is all the people who I want to use as beta testers are "normal people" who never even sync their iPhone to iTunes on a computer. So, you can understand how technically challenged these people are, which is fine with me because that is the audience I want to use for testing. All these guys can do for me is if I can give them an AppStore link they will download it on their iPhone and test it for me. So, basically AD-HOC distribution (UDIDs, mobileprovision file and all that crap) is out of question for me. My Question is after AppStore approves my app, is there a way for me to be under the radar so that normal public can not download the app until I am ready. From past experience I know that the moment you put an app out there, in first week you get 100s of downloads and I dont want that to happen until my beta testing is finished.

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >