Search Results

Search found 2646 results on 106 pages for 'fetch'.

Page 5/106 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Fetch HTML page and store it in MYSQL- How to

    - by codemaker
    Hi, What's the best way to store a formatted html page with CSS on to MYSQL database? Is it possible? What the column type should be? How to retrieve the stored formatted HTML and display it correctly using PHP? What if the page I would like to fetch has pics and videos, show I store the page as blob What's the best way to fetch a page using PHP-CURL,fopen,..-? Many questions guys but I really need your help to put me on the right way to do it. Thanks a lot.

    Read the article

  • PHP fetch all Twitter Followers and compare them to friends

    - by ArneRie
    Hi, iam looking for performant way to do the following: User login Fetch all Friends from Twitter Fetch all Followers from Twitter Display all Friends wich aren't Followers The Problem: How to do this in a performant way? An user can have up to 2 Million Friends or Followers. In the moment im Storing both inside an sqllite table an compare them through an loop. When the user comes back the table is cleared and process starts again. This works finde on 100 - 1000 Friends.. but will be tricky with 500000 Friends. I cant cache the lists because they can change every moment.. Does someone knows a good way to handle such big amount of data?

    Read the article

  • My $query->fetch() doesn't work

    - by Tae
    Question edited following the comments. It still doesn't work. Hi there, I'm trying to learn how PDO works, but my script: $database = new PDO('mysql:host=localhost;dbname=***', '***', '***'); $query = $database->prepare("SELECT nombre, tecnica, tamanno, estado FROM obra WHERE anno = ?"); $query->execute(array('2009')); while ($item = $query->fetch(PDO::FETCH_ASSOC)) { $item['nombre']; } Prints nothing. If I do: var_dump($query->fetch()) I get bool(false). After reading lots of examples I can't figure out what I'm doing wrong. Thanks in advance.

    Read the article

  • X++ Coming Out Of QueryRun In Fetch Method

    - by will
    I can't seem to find the resolution for this. I have modified the Fetch method in a report, so that if the queryRun is changed, and the new ID is fetched, then the while loop starts over and a new page appears and 2 elements are executed. This part works fine, the next part does not, in each ID there are several Records which I am using Element.Execute(); and element.Send(); to process. What happens is, the first ID is selected, the element (body) of the reports is executed and the element is sent as expected, however the while loop does not go onto the next ID? Here is the code; public boolean fetch() { APMPriorityId oldVanId, newVanId; LogisticsControlTable lLogisticsControlTable; int64 cnt, counter; ; queryRun = new QueryRun(this); if (!queryRun.prompt() || !element.prompt()) { return false; } while (queryRun.next()) { if (queryRun.changed(tableNum(LogisticsControlTable))) { lLogisticsControlTable = queryRun.get(tableNum(LogisticsControlTable)); if (lLogisticsControlTable) { info(lLogisticsControlTable.APMPriorityId); cnt = 0; oldVanId = newVanId; newVanId = lLogisticsControlTable.APMPriorityId; if(newVanId) { element.newPage(); element.execute(1); element.execute(2); } } if (lLogisticsControlTable.APMPriorityId) select count(recId) from lLogisticsControlTable where lLogisticsControlTable.APMPriorityId == newVanId; counter = lLogisticsControlTable.RecId; while select lLogisticsControlTable where lLogisticsControlTable.APMPriorityId == newVanId { cnt++; if(lLogisticsControlTable.APMPriorityId == newVanId && cnt <= counter) { element.execute(3); element.send(lLogisticsControlTable); } } } } return true; }

    Read the article

  • Simplepie - fetch feeds from database

    - by krike
    I want to fetch multiple feeds from the database and in so doing fetch all new content from those feeds it works but there is a problem and I have no idea what's causing it, this is the code: $feed_sql = mysqli_query($link, "SELECT feed from tutorial_feed WHERE approved=1"); $feeds = array(); $i = 0; while($feed_r = mysqli_fetch_object($feed_sql)): $feeds[$i] .= $feed_r->feed; $i++; endwhile; $feed = new SimplePie($feeds); $feed-handle_content_type(); foreach($feed-get_items(0, 100) as $item) : echo $item-get_permalink().""; endforeach; I first get Notice: Undefined offset: 0 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 1 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 2 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 3 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 4 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 5 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 6 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 7 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 8 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 9 in I:\wamp\www\cmstut\includes\cron.php on line 22 Notice: Undefined offset: 10 in I:\wamp\www\cmstut\includes\cron.php on line 22 and then it will start printing the permalinks to the new content based on the imported feeds, I know undefined offset means it does not exist but I don't get it, any help would be appreciated

    Read the article

  • Core Data confusion: fetch without tableview.

    - by Mr. McPepperNuts
    I have completed and reproduced Core Data tutorials using a tableview to display contents. However, I want to access an Entity through a fetch on a view without a tableview. I used the following fetch code, but the count returned is always 0. The data exists when the database is opened using SQLite tools. NSManagedObject *entryObj; XYZDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; NSManagedObjectContext *managedObjectContext = appDelegate.managedObjectContext; NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Quote" inManagedObjectContext:managedObjectContext]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"id" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [request setSortDescriptors:sortDescriptors]; [request setEntity: entity]; NSArray *results = [managedObjectContext executeFetchRequest:request error:nil]; if (results == nil) { NSLog(@"No results found"); entryObj = nil; }else { NSLog(@"results %d", [results count]); } [request release]; [sortDescriptors release]; count returned is always 0; it should be 5. Can anyone point me to a reference or tutorial regarding creating a controller not to be used with a tableview.

    Read the article

  • Mamimum page fetch with maximum bandwith

    - by Ehsan
    Hi I want to create an application like a spider I've implement fetching page as the following code in multi-thread application but there is two problem 1) I want to use my maximum bandwidth to send/receive request, how should I config my request to do so (Like Download Accelerator application and the like) cause I heard the normal application will use 66% of the available bandwidth. 2) I don't know what exactly HttpWebRequest.KeepAlive do, but as its name implies I think i can create a connection to a website and without closing the connection sending another request to that web site using existing connection. does it boost performance or Im wrong public PageFetchResult Fetch() { PageFetchResult fetchResult = new PageFetchResult(); try { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(URLAddress); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); Uri requestedURI = new Uri(URLAddress); Uri responseURI = resp.ResponseUri; if (Uri.Equals(requestedURI, responseURI)) { string resultHTML = ""; byte[] reqHTML = ResponseAsBytes(resp); if (!string.IsNullOrEmpty(FetchingEncoding)) resultHTML = Encoding.GetEncoding(FetchingEncoding).GetString(reqHTML); else if (!string.IsNullOrEmpty(resp.CharacterSet)) resultHTML = Encoding.GetEncoding(resp.CharacterSet).GetString(reqHTML); req.Abort(); resp.Close(); fetchResult.IsOK = true; fetchResult.ResultHTML = resultHTML; } else { URLAddress = responseURI.AbsoluteUri; relayPageCount++; if (relayPageCount > 5) { fetchResult.IsOK = false; fetchResult.ErrorMessage = "Maximum page redirection occured."; relayPageCount = 0; return fetchResult; } req.Abort(); resp.Close(); return Fetch(); } } catch (Exception ex) { fetchResult.IsOK = false; fetchResult.ErrorMessage = ex.Message; } return fetchResult; }

    Read the article

  • Convert NSString to fetch synthesized information.

    - by Max
    //COPY THIS CODE IN A FRESH PROJECT!!! //THIS 2 LINES ARE JUST EXAMPLES, IN REAL THEY ARE NOT STATIC! NSString *messagelevel1 = @"45"; NSString *messagelevel = @"1"; NSString *HuidigLevel = messagelevel; NSDecimalNumber *huidigleveldec = [[NSDecimalNumber alloc] initWithString: HuidigLevel]; float HuidigLevelRek = [huidigleveldec floatValue]; //HERE IS THE PROBLEM NSString* LevelTotaal=[[NSString alloc] initWithFormat:@"messagelevel%.f",HuidigLevelRek]; NSString*result = LevelTotaal; NSLog(@"%@",result); // THIS RESULT SHOULD RETURN THE SAME VALUE AS THE LINE UNDER THIS LINE! NSLog(@"%@",messagelevel1); I want the *result string behaves like the *huidiglevel string and fetch some information, but because the LevelTotaal is a NSString, It doesn't fetch this information. I really got no idea where to google for this problem, searching the Developer docs didn't helped either . Maybe you guys can help me out? Actually the second NSLog returns the value and to first NSLog just returns messagelevel1. To tell you in short ;) I hope you guys get what I'm saying!

    Read the article

  • What is the difference between .get() and .fetch(1)

    - by AutomatedTester
    I have written an app and part of it is uses a URL parser to get certain data in a ReST type manner. So if you put /foo/bar as the path it will find all the bar items and if you put /foo it will return all items below foo So my app has a query like data = Paths.all().filter('path =', self.request.path).get() Which works brilliantly. Now I want to send this to the UI using templates {% for datum in data %} <div class="content"> <h2>{{ datum.title }}</h2> {{ datum.content }} </div> {% endfor %} When I do this I get data is not iterable error. So I updated the Django to {% for datum in data.all %} which now appears to pull more data than I was giving it somehow. It shows all data in the datastore which is not ideal. So I removed the .all from the Django and changed the datastore query to data = Paths.all().filter('path =', self.request.path).fetch(1) which now works as I intended. In the documentation it says The db.get() function fetches an entity from the datastore for a Key (or list of Keys). So my question is why can I iterate over a query when it returns with fetch() but can't with get(). Where has my understanding gone wrong?

    Read the article

  • Cant fetch production db results using Google app engine remote_api

    - by Alon
    Hey, im trying to work out with /remote_api with a django-patch app engine app i got running. i want to select a few rows from my online production app locally. i cant seem to manage todo so, everything authenticates fine, it doesnt breaks on imports, but when i try to fetch something it just doesnt print anything. Placed the test python inside my local app dir. #!/usr/bin/env python # import os import sys # Hardwire in appengine modules to PYTHONPATH # or use wrapper to do it more elegantly appengine_dirs = ['myworkingpath'] sys.path.extend(appengine_dirs) # Add your models to path my_root_dir = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, my_root_dir) from google.appengine.ext import db from google.appengine.ext.remote_api import remote_api_stub import getpass APP_NAME = 'Myappname' os.environ['AUTH_DOMAIN'] = 'gmail.com' os.environ['USER_EMAIL'] = '[email protected]' def auth_func(): return (raw_input('Username:'), getpass.getpass('Password:')) # Use local dev server by passing in as parameter: # servername='localhost:8080' # Otherwise, remote_api assumes you are targeting APP_NAME.appspot.com remote_api_stub.ConfigureRemoteDatastore(APP_NAME, '/remote_api', auth_func) # Do stuff like your code was running on App Engine from channel.models import Channel, Channel2Operator myresults = mymodel.all().fetch(10) for result in myresults: print result.key() it doesnt give any error or print anything. so does the remote_api console example google got. when i print the myresults i get [].

    Read the article

  • Memcached: booking a fetch

    - by iBobo
    I would like to use getDelayed on the PHP Memcached extension but I think it's not implemented in the right way. Right now you ask for some keys and then retrieve all of them with fetch() and fetchAll(). But imagine a scenario where I need to retrieve 15 keys used in different parts of the page which I don't know in advance, but I can ask the various objects to give me the list. What I want is give the Memcached instance this list (each component would give its part) then later when I need them retrieve from the instance, but not all of them at once: each component would take the one it needs. Basically if I were to implement this I would prohibit using getDelayed alone and implement a bookGet($keys) method where you would add the keys to book (which actually calls getDelayed), and redefine get to handle these three cases: key is booked and retrieved - return the value; key is booked but not retrieved - go and force the fetch of the booked keys and return the correct value; key not booked - do a normal lookup. I want to know if this makes sense, your thoughts on the subject and if someone already implemented this or maybe PECL Memcached already works this way and actually the documentation doesn't explain it correctly.

    Read the article

  • Fetch videos from sony handycam to linux

    - by bstpierre
    I've got a Sony Handycam DCR-DVD101. When I plug connect the USB cable to my laptop (Ubuntu 10) it doesn't mount any storage device. If I run usb-devices, I see: T: Bus=02 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=054c ProdID=00c1 Rev=01.00 S: Manufacturer=SONY S: Product=Storage Device C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=2mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=05 Prot=50 Driver=usb-storage The driver says usb-storage, but I'm not sure how to get the device mounted. Is there a way to make this work? Update: checking dmesg, I see: [259072.576559] usb 2-1.1: new high speed USB device using ehci_hcd and address 6 [259072.687200] usb 2-1.1: configuration #1 chosen from 1 choice [259072.836188] Initializing USB Mass Storage driver... [259072.836476] scsi5 : SCSI emulation for USB Mass Storage devices [259072.836632] usb-storage: device found at 6 [259072.836636] usb-storage: waiting for device to settle before scanning [259072.836660] usbcore: registered new interface driver usb-storage [259072.836666] USB Mass Storage support registered. [259077.830410] usb-storage: device scan complete [259077.832343] scsi 5:0:0:0: CD-ROM SONY DDX-A1010 R1.0 PQ: 0 ANSI: 0 [259077.888167] sr1: scsi3-mmc drive: 0x/0x pop-up [259077.888446] sr 5:0:0:0: Attached scsi CD-ROM sr1 [259077.888593] sr 5:0:0:0: Attached scsi generic sg2 type 5 [259080.002079] sr 5:0:0:0: [sr1] Unhandled sense code [259080.002085] sr 5:0:0:0: [sr1] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [259080.002091] sr 5:0:0:0: [sr1] Sense Key : Blank Check [current] [259080.002097] sr 5:0:0:0: [sr1] Add. Sense: No additional sense information [259080.002104] sr 5:0:0:0: [sr1] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00 00 00 [259080.002117] end_request: I/O error, dev sr1, sector 0 [259080.002123] Buffer I/O error on device sr1, logical block 0 [259080.002128] Buffer I/O error on device sr1, logical block 1 Those I/O errors don't look good, is there any hope?

    Read the article

  • sudo apt-get install apache2 does not fetch apache

    - by dave
    Hello, Trying out sudo apt-get install apache2 This is what I get root@x27:/home/test# sudo apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package apache2 Appreciate help for using apt-get for apache Thanks Dave

    Read the article

  • sudo apt-get install apache2 does not fetch apache

    - by dave
    Hello, Trying out sudo apt-get install apache2 This is what I get root@x27:/home/test# sudo apt-get install apache2 Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package apache2 Appreciate help for using apt-get for apache Thanks Dave

    Read the article

  • Fetch MP3 ID3 tag under linux

    - by exic
    Hi, I have a few mp3 files which are not tagged. Winamp has a nice feature which I think is called "autotag" and which is very good at finding out artist and title for files. I'd like something like this for unix, so that I could possibly get artists and titles for my untagged files. Do you know some program which does this? Thanks.

    Read the article

  • Varnish : Non-Cache/Data Fetch + Load-Balance

    - by xperator
    Someone commented at my previous question and said it's possible to do this with Varnish: Instead of : Client Request Varnish LB Backend Varnish LB Client I want to have (Direct reply from backend to client, instead of going through the LB) : Client Request Varnish LB Backend Client This is not working : sub vcl_pass { if (req.http.host ~ "^(www.)?example.com$") { set req.backend = baz; return (pass); } }

    Read the article

  • Symfony "cannot fetch TableMap" error when using propel:build-all

    - by James Skidmore
    Cannot fetch TableMap for undefined table: order_product. Make sure you have the static MapBuilder registration code after your peer stub class definition. Even if I erase the entire schema, clear the cache, and delete everything but "vendor" in the lib folder, I still get the error. I also get the error when doing propel:build-filters or propel:build-forms. Thanks for your help in advance!

    Read the article

  • Web Part Error: This page has exceeded its data fetch limit for connected Web Parts

    - by user348515
    Hi Experts, I have a display form with two custom list forms and both are connected to each other and they display the results according to the filter. But when ever I sort on any field, it gives the following error: Web Part Error: This page has exceeded its data fetch limit for connected Web Parts. Try disconnecting one or more Web Parts to correct the problem. I appreciate any help. Thanks SP

    Read the article

  • Fetch Facebook ID with PyFacebook, "Session key is required"

    - by ensnare
    I'm trying to fetch the logged in user's ID with Facebook + PyFacebook via: #Establish connection to Facebook via API f = Facebook(config['app_conf']['pyfacebook.apikey'], config['app_conf']['pyfacebook.secret']) #Get the current Facebook ID facebook_id = f.users.getLoggedInUser() But I keep getting the error: FacebookError: Error 453: A session key is required for calling this method What am I doing wrong? Thanks.

    Read the article

  • Best way to fetch remote RSS through authenticated proxy and parse it

    - by grajea
    I'm trying to get a remote RSS through proxy and parse it. I'm using magpierss, but it doesn't allow reaching internet through a proxy (or I don't know how to do it). I assume the option is to, first, fetch the rss with curl functions, that allows proxy authenticating, but .... are there any class to do this in a easy way, or ... does magpie support using proxy, and how? Thanks in advance.

    Read the article

  • fetch value of ipaddress

    - by neha soni
    i want to get ipaddress of mycomputer in a variable this statement prints ipaddress of my computer but i want to assign it in a varible how can i fetch the value of ipaddress from inet_ntoa(inaddrr(ifr_addr.sa_data)) into an variable ip of char* type . printf("IP Address: %s\n", inet_ntoa(inaddrr(ifr_addr.sa_data)));

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >