fetch

Optimize feed fetching

Hello I'm working on a site now that have to fetch users feeds. But how can I best optimize fetching if I have a database with, lets say, 300 feeds. I'm going to set up a cron-job to which fetches the feeds, but should I do it like 5 every second minute or something? Any ideas on how to do this the best way in PHP? ...

Hibernate fetching strategy - when to use "join" and when to use "select"?

Most Hibernate associations support "fetch" parameter: fetch="join|select" with "select" being default value. How to decide which one to use for which association? I tried changing all from "select" to "join" application wide - number of generated queries decreased probably 10 times but performance stayed exactly the same (even bec...

how do oracle stored procedures (w/ cursors) work?

I have a following oracle stored procedure CREATE OR REPLACE PROCEDURE getRejectedReasons ( p_cursor IN OUT SYS_REFCURSOR) AS BEGIN OPEN p_cursor FOR SELECT * FROM reasons_for_rejection; END; However, when I run this stored procedure in sql-developer then I dont see anything. I just see something like this: Connecting to...

Linq for NHibernate and fetch mode of eager loading

Is there a way to set the fetchmode to eager for more than one object using linq for nhibernate. There seems to be an expand method which only allows me to set one object. However I need to set it for more than one object. Is this possible? Thanks ...

size of remote file is not known of the fetch run time

When I carried out a fetch command, the following messages were output. "size of remote file is not known" Will this be an error? Will it be what or the thing which disappears if I appoint an option? Or will it be all right even if I do not mind it? If there is a detailed person, please teach it ...

Core Data: Query objectIDs in a predicate?

Hi there, I am fetching a set of objects from a Core Data persistent store using a fetch request and a predicate. My current predicate simply checks whether an attribute is >= a certain value. This all works great, except that I want to finally exclude any objects that are currently held in an array. I basically need to be able to excl...

What does fetch in php do?

I don't understand the concept of the fetch function. I am doing a tutorial from 'PHP Solutions' book and i am using MySQL Improved to update something in the database. Here is the code: if (isset($_GET['article']) && !$_POST) { $sql = 'SELECT article_id, title, article FROM journal WHERE article_id = ?'; $stmt = $conn->stmt...

What mysqli function should I use?

Hello, I'm currently trying to extract data from a table, and am using this: $online = mysqli_fetch_field(mysqli_query($db, "SELECT `online` FROM `tbl_system` WHERE `property` = 'extranet'")); However, it's not working as echoing $online give "Array". Here's a var_dump from $online object(stdClass)#3 (11) { [...

Tool for fetching the Http Response from mobile device.

Hi I need a cellphone application that sends a http request and then saves the http response. The reason I want this is to make sure that the response sent from our server to the mobile is the same as the response the mobile receive. We are currently expecting that some mobile operators are modifying the response. So we would like to k...

Help me out with this MySql cursor code

Trying to migrate from MSSQL to MySQL. This Stored Proc is creating a temp table for some columns from a permanent table then using a cursor to update each record's RandNum column with a random number and selects the dataset. As I'm writing this I thought that I could bypass the cursor and just... SELECT Id, Title, DateStart, Rand() FRO...

Finding content between two words withou RegEx, BeautifulSoup, lXml ... etc

How to find out the content between two words or two sets of random characters? The scraped page is not guaranteed to be Html only and the important data can be inside a javascript block. So, I can't remove the JavaScript. consider this: <html> <body> <div>StartYYYY "Extract HTML", ENDYYYY </body> Some Java Scripts code STARTXXXX "E...

How to download via HTTP only piece of big file with ruby

I only need to download the first few kilobytes of a file via HTTP. I tried require 'open-uri' url = 'http://example.com/big-file.dat' file = open(url) content = file.read(limit) But it actually downloads the full file. ...

Force git to overwrite local files on pull.

The scenario is following: my team member is modifying the templates for a website we are working on he is adding some images to the images directory (but forgets to add them under source control) he is sending later the images by mail to me i'm adding the images under the source control and push them to github together with other chan...

Is there a way to use functions in NSPredicate predicateWithFormat:

I have store with entities that have coords (x, y, z). I want to fetch them by using predicate like @"sqrt(x*x + y*y + z*z) < distance". Is there any way to do this? I've tried to do thi with predicateWithFormat: I even wrote a lot of code that looks like NSExpression * dxExpression = [NSExpression expressionForFunction:@"from:subtr...

How to fetch HTML page with all its objects on Ruby

I need to fetch HTML page with all objects on it (stylesheets, javascripts, images) and store data in the database. It is possible to implement this by simple fetching files listed in src attributes, but maybe someone can suggest any helper gem for this. Also, is there way to package all this files to one (like web archieve), which can ...

Does "git fetch --tags" include "git fetch"?

A nice and simple question - is the function of "git fetch" a strict sub-set of "git fetch --tags"? I.e. if I run "git fetch --tags", is there ever a reason to immediately run "git fetch" straight afterward? What about "git pull" and "git pull --tags"? Same situation? ...

hibernate many-to-one hql query, when inner join fetch property not associated

I have a many-to-one association set up like this, in the hbm.xml: <many-to-one name="gigVenue" class="blah.blah.xxx" fetch="select" lazy="no-proxy" not-null="true" > <column name="N_VENUE_ID" precision="18" scale="0" not-null="true" /> </many-to-one> And I am using instrumentation to do true lazy loading. BUT when I run a hql query ...

iphone tabbar where to load data?

Hi, I have two tabbar items(views) that use the same data, whats the best solution for getting the data? Make two fetch request for the same data in each view controller. Make one fetch request in appDelegate, and use sharedApplication to get to the data in appDelegate. I can use KVO and notifications to notify the views if the data h...

Cloning a single path of a bare git repository

I am trying to add a post-commit hook to a bare repository, such that whenever a commit is made the changed files are automatically installed in a (hardcoded) directory. Is there a way to fetch a single file from the repository? git-clone does not appear to allow for specifying a path, and any other commands that I found (git-fetch, gi...

iphone fetchRequest sub entities?

If i fetch data from "parent" and assign it to a fetchresultscontroller, i still have to call [parent.images allObjects] in my cellForRowAtIndexPath to get to the child data. Is this a normal thing to do or can i get the real data from child right in my fetchedresultscontroller? ...