Search Results

Search found 9271 results on 371 pages for 'whole foods'.

Page 7/371 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Hibernate ScrollableResults Do Not Return The Whole Set of Results

    - by mlaverd
    Some of the queries we run have 100'000+ results and it takes forever to load them and then send them to the client. So I'm using ScrollableResults to have a paged results feature. But we're topping at roughly 50k results (never exactly the same amount of results). I'm on an Oracle9i database, using the Oracle 10 drivers and Hibernate is configured to use the Oracle9 dialect. I tried with the latest JDBC driver (ojdbc6.jar) and the problem was reproduced. We also followed some advice and added an ordering clause, but the problem was reproduced. Here is a code snippet that illustrates what we do: Criteria crit = sess.createCriteria(ABC.class); crit.add(Restrictions.eq("property", value)); crit.setFetchSize(pageSize); crit.addOrder(Order.asc("property")); ScrollableResults sr = crit.scroll(); ... ... do{ for (Object entry : page) sess.evict(entry); //to avoid having our memory just explode out of proportion page.clear(); for (int i =0 ; i < pageSize && ! metLastRow; i++){ if (resultSet.next()) page.add(sr.get(0)); else metLastRow = true; } metLastRow = metLastRow?metLastRow:sr.isLast(); sendToClient(page); }while(!metLastRow); So, why is it that I get the result set to tell me its at the end when it should be having so much more results?

    Read the article

  • The way to find out whole picture width in PGF (Latex)

    - by drasto
    I've got a latex macro that draws a picture using PGF and Tikz according to given parameters. The width of picture drawn depends on these parameters. PGF automatically calculates the resulting width of any picture drawn so the user does not have to set it explicitly(like for example when using latex build in picture environment). However I need to know the width of picture that will be drawn. Of cause I could calculate it as the PGF does but this is going to be quite some work(a lot of if statements...). Is there a way to ask PGF what is the width of picture that is to be drawn (some command I expect)? Either inside tikzpicture environment or just after it? Thanks for help.

    Read the article

  • Get data from database without refresh whole page

    - by stefanz
    Hello everybody. My project is about a school admin I have a page called : createClass.php, where user inserts grade, profile etc. When he press "submit" page called createdClass.php is loading. Inside this page I have all code which insert data into database and also an "if" structure which says : "Class already exists" if in database is another class with same specifications. Also in second page (createdClass.php) i have a small table which shows the place of each student. First time all cells are green (this means that place is free) and if i click one of them appear a popup window which let me to add info about student from that place. If a place is busy the cell will be red (take a look here : http://screencast.com/t/NzM2YzYxNjct). The big problem is that the cell will be red only after refresh the page (the place ask for data from database). If I press refresh appears "class already exists". To test the code i added in a comment all lines which verify and add respectively classroom . I think my problem can be solved with ajax. I'm waiting for an answer. Regards Stefan

    Read the article

  • Regex is capturing the whole string

    - by M28
    I am using the following regex: (public|private +)?function +([a-zA-Z_$][0-9a-zA-Z_$]*) *\\(([0-9a-zA-Z_$, ]*)\\) *{(.*)} To match the following string: public function messenger(text){ sendMsg(text); } private function sendMsg(text){ alert(text); } (There is no line breaks in the string, they are converted to whitespaces before the regex runs) I wanted it to capture both functions, but it is capturing: $1: "" $2: "messenger" $3: "text" $4: " sendMsg(text); } private function sendMsg(text){ alert(text); " By the way, I am using Javascript.

    Read the article

  • selenium RC doesnt run the whole test suite

    - by logiclife
    I'm trying to run an html testSuite with Selenium RC. The browser starts, the first test runs, and it stops. It doesnt continue to the second test case. I named both the test cases with .html extension. IAm using Firefox. If i run them manually , individually from the selenium RC test runner window they run ok. what am i missing, this seems pretty simple but yet iam not able to get this working. Iam using selenium RC 1.0.3 command here java -jar selenium-server.jar -firefoxProfileTemplate"C:\Users\sicky\AppData\Roaming\Mozilla\Firefox\Profiles\zvt0jj7c.default" -htmlsuite "*firefox" "https://4.17.8.9/" "C:\Users\sicky\Documents\selenium scripts\suite.html" "C:\Users\sicky\Documents\selenium scripts\results.html" What am i missing? Pls let me know

    Read the article

  • XSLT: Whole table columns count.

    - by kalininew
    Good afternoon, gentlemen. Please help us solve the problem, I do not have enough brains to solve it by myself. There is a table, you must define "simple" it or "complicated". Table "simple" if each row contain only two column, otherwise it is "complicated" table. How to do this means xslt.

    Read the article

  • jsTree causes that links on whole page are broken

    - by niao
    Greetings, I have the following problem. In my asp.net mvc page (which is a partial view) I create an instance of jsTree as follows: <script type="text/javascript"> $(function() { $("#industries").tree({ callback: { onselect: function(NODE, TREE_OBJ) { $("#SelectedIndustryROWGUID").val($(NODE).attr("id")); $("#resultMessage").append($(NODE).attr("rel")); } }, data: { type: "json", async: true, opts: { method: "GET", url: "/CreateMessage/GetIndustries/" } } }); }); this works fine but then, when I click on any link on the page, it does not work. The links are executed when I choose "open in new tab" option from context menu. Can someone please help me with this?

    Read the article

  • JPA query for getting the whole tree

    - by Javi
    Hello, I have a class which models all categories and they can be ordered hierarchically. @Entity @Table(name="categories") public class Category { @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="sequence") @SequenceGenerator(name="sequence", sequenceName="categories_pk_seq", allocationSize=1) @Column(name="id") private Long id; @Column private String name; @OneToOne @JoinColumn(name="idfather") private Category father; } I need to get all categories ordered hierarchically (I mean every father followed by its children and fathers ordered alphabetically on each level) as they could be made for example with PRIOR in oracle. Is it possible to do this with a JPA Query (not a SQL one)? Thanks.

    Read the article

  • Memory Problem - Release whole ViewController ?

    - by Sebastian
    Hi, I'm using a TabBarController with a few Tabs and I have memory problems when switching through the tabs and the contents. Is there a way to release and dealloc everything when I go to another ViewController ? So when I am in Tab#1 with ViewController #1 and I go to Tab#2 with ViewController #2, how can I free all the memory ViewController #1 took ? Thx ! Sebastian

    Read the article

  • Copy whole SQL Server database into JSON from Python

    - by Oli
    I facing an atypical conversion problem. About a decade ago I coded up a large site in ASP. Over the years this turned into ASP.NET but kept the same database. I've just re-done the site in Django and I've copied all the core data but before I cancel my account with the host, I need to make sure I've got a long-term backup of the data so if it turns out I'm missing something, I can copy it from a local copy. To complicate matters, I no longer have Windows. I moved to Ubuntu on all my machines some time back. I could ask the host to send me a backup but having no access to a machine with MSSQL, I wouldn't be able to use that if I needed to. So I'm looking for something that does: db = {} for table in database: db[table.name] = [row for row in table] And then I could serialize db off somewhere for later consumption... But how do I do the table iteration? Is there an easier way to do all of this? Can MSSQL do a cross-platform SQLDump (inc data)? For previous MSSQL I've used pymssql but I don't know how to iterate the tables and copy rows (ideally with column headers so I can tell what the data is). I'm not looking for much code but I need a poke in the right direction.

    Read the article

  • Don't want to JSON serialize the whole list of classes

    - by mjmcloug
    Hey, I've got a IList of Sites in my application and Site has a large amount of properties. I'm wanting to convert this list to JSON to be used in a dropdownlist similar to this var sites = SiteRepository.FindAllSites(); return new JsonResult() { Data = sites, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; the problem I have is that I only want to use the id and name properties of the site class. I was thinking a way round this would be to use an 'adaptor' class that would then only expose these two properties and I would then serialize that. The problem I have is I want to make the class generic so that it can handle any list of objects. Has anybody come across a similar situation and solved it?

    Read the article

  • \center environment centers the whole document in LaTeX

    - by Seamus
    I have the following line between my \maketitle and my \begin{abstract}: \center{ \textsc{Some text here} } This seems to cause the ENTIRE DOCUMENT to be formatted as centered. Why is this and how should I get around it? Part two: Is there a way to get some text to appear only when the [draft] option is active. For example, when the draft option is active, I want some text to appear between my title and abstract: "draft: do not cite without permission" or some such.

    Read the article

  • "Priming" a whole database in MSSQL for first-hit speed

    - by David Spillett
    For a particular apps I have a set of queries that I run each time the database has been restarted for any reason (server reboot usually). These "prime" SQL Server's page cache with the common core working set of the data so that the app is not unusually slow the first time a user logs in afterwards. One instance of the app is running on an over-specced arrangement where the SQL box has more RAM than the size of the database (4Gb in the machine, the DB is under 1.5Gb currently and unlikely to grow too much relative to that in the near future). Is there a neat/easy way of telling SQL Server to go away and load everything into RAM? It could be done the hard way by having a script scan sysobjects & sysindexes and running SELECT * FROM <table> WITH(INDEX(<index_name>)) ORDER BY <index_fields> for every key and index found, which should cause every used page to be read at least once and so be in RAM, but is there a cleaner or more efficient way? All planned instances where the database server is stopped are out-of-normal-working-hours (all the users are at most one timezone away and unlike me none of them work at silly hours) so such a process (until complete) slowing down users more than the working set not being primed at all would is not an issue.

    Read the article

  • .hgignore whole directory tree excepting one specific file

    - by John Mee
    Can anyone tell me the .hgignore pattern to track one specific file in a directory and to ignore everything else? I have a "media" directory which contains a "default.png", for obvious purposes, and the rest of the directory will hold user media. We want hg to ignore everything in the media directory excepting the default file.

    Read the article

  • Truncate portions of a string to limit the whole string's length in Ruby

    - by Horace Loeb
    Suppose you want to generate dynamic page titles that look like this: "It was all a dream, I used to read word up magazine" from "Juicy" by The Notorious B.I.G I.e., "LYRICS" from "SONG_NAME" by ARTIST However, your title can only be 69 characters total and this template will sometimes generate titles that are longer. One strategy for solving this problem is to truncate the entire string to 69 characters. However, a better approach is to truncate the less important parts of the string first. I.e., your algorithm might look something like this: Truncate the lyrics until the entire string is <= 69 characters If you still need to truncate, truncate the artist name until the entire string is <= 69 characters If you still need to truncate, truncate the song name until the entire string is <= 69 characters If all else fails, truncate the entire string to 69 characters Ideally the algorithm would also limit the amount each part of the string could be truncated. E.g., step 1 would really be "Truncate the lyrics to a minimum of 10 characters until the entire string is <= 69 characters" Since this is such a common situation, I was wondering if someone has a library or code snippet that can take care of it.

    Read the article

  • Why does XPath.selectNodes(context) always use the whole document in JDOM

    - by Simeon
    Hi, I'm trying to run the same query on several different contexts, but I always get the same result. This is an example xml: <root> <p> <r> <t>text</t> </r> </p> <t>text2</t> </root> So this is what I'm doing: final XPath xpath = XPath.newInstance("//t"); List<Element> result = xpath.selectNodes(thisIsThePelement); // and I've debuged it, it really is the <p> element And I always get both <t> elements in the result list. I need just the <t> inside the <p> I'm passing to the XPath object. Any ideas would be of great help, thanks.

    Read the article

  • Selecting a whole database over an individual table to output to file

    - by Daniel Wrigley
    :::::::: EDIT :::::::: New code for people to have a look at, one question I have with this is where do I set were the *.gz file is saved? $backupFile = $dbname . date("Y-m-d-H-i-s") . '.gz'; $command = "mysqldump --opt -h $dbhost -u $dbuser -p $dbpass $dbname | gzip > $backupFile"; system($command); Also why the hell can you not reply yo your own post with answering it? :( :::::::: EDIT :::::::: Ok Im having trouble finding out how to select a full database for backup as an *.sql file rather than only an individual table. On the localhost I have several databases with one named "foo" and it is that which I want to backup and not any of the individual tables inside the database "foo". The code to connect to the database; //Database Information $dbhost = "localhost"; $dbname = "foo"; $dbuser = "bar"; $dbpass = "rulz"; //Connect to database mysql_connect ($dbhost, $dbuser, $dbpass) or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); The code to backup the database; // Grab the time to know when this post was submitted $time = date('Y-m-d-H-i-s'); $tableName = 'foo'; $backupFile = '/sql/backup/'. $time .'.sql'; $query = "SELECT * INTO OUTFILE '". $backupFile ."' FROM ". $tableName .""; $result = mysql_query($query)or die("Database query died: " . mysql_error()); My brain is hurting near to the end of the day so no doubts i've missed something out very obvious. Thanks in advance to anyone helping me out.

    Read the article

  • PL/SQL Logical Operators evaluate whole function

    - by Chris
    I know in C like languages logical operators are evaluated one at a time so: false && really_expensive_function() is doesn't result in the function being called (I can't remember the CS name for this). Does the same happen in PL/SQL or do I need to break the IF parts out to separate blocks?

    Read the article

  • How to run an equation along whole column in excel vba

    - by Elad Sommer
    I want to run an excel vba which will go down column E and upon finding the value = "capa" will go two cell below, calculate the hex2dec value of that cell, present it by the cell with the value "capa" in column F and continue to search down column E. So far I've came with the below but it doesn't work: For Each cell In Range("E:E") If cell.Value = "Capa" Then ActiveCell.Offset.FormulaR1C1 = "=HEX2DEC(R[2]C[-1])" End If Next cell Thanks!

    Read the article

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