Search Results

Search found 17924 results on 717 pages for 'z order'.

Page 250/717 | < Previous Page | 246 247 248 249 250 251 252 253 254 255 256 257  | Next Page >

  • Lazy load pages in UIScrollView

    - by jean
    I have a UIScrollView that contains large images and am using paging to scroll between images. In order to save memory, I am loading only one image before and after the currently visible one and loading/releasing new images after a scroll has completed. The problem occurs when one scrolls quickly and scrollViewDidEndDecelerating is not called. How can I detect continuous scrolling? I could check item location on every scrollViewDidScroll but this seems a bit heavy...

    Read the article

  • count columns group by

    - by zhangzhong
    I hava the sql as below: select a.dept, a.name from students a group by dept, name order by dept, name And get the result: dept name -----+--------- CS | Aarthi CS | Hansan EE | S.F EE | Nikke2 I want to summary the num of students for each dept as below: dept name count -----+-----------+------ CS | Aarthi | 2 CS | Hansan | 2 EE | S.F | 2 EE | Nikke2 | 2 Math | Joel | 1 How shall I to write the sql?

    Read the article

  • Advanced Django query with subselects and custom JOINS

    - by Bryan Ward
    I have been investigating this number theoretic function (found in the Height model) and I need to query for things based on the prime factorization of the primary key, or id. I have created a model for Factors of the id which maintains all of the prime factors. class Height(models.Model): b = models.IntegerField(null=True, blank=True) c = models.IntegerField(null=True, blank=True) d = models.FloatField(null=True, blank=True) class Factors(models.Model): height = models.ForeignKey(Height, null=True, blank=True) factor = models.IntegerField(null=True, blank=True) degree = models.IntegerField(null=True, blank=True) prime_id = models.IntegerField(null=True, blank=True) For example, if id=24, then the associated entries in the factors table would be height_id=24,factor=2,degree=3,prime_id=0 height_id=24,factor=3,degree=1,prime_id=1 the prime_id keep track of the relative order of the primes. Now let p < q < r < s all be prime numbers and a,b,c,d be positive integers. Then I want to be able to query for all Heights of the form id=(p**a)*(q**b)*(r**c)*(s**d). Now this is simple in the case that all of p,q,r,s,a,b,c,d are known in that I can just run Height.objects.get(id=(p**a)*(q**b)*(r**c)*(s**d)) But I need to be able to query for something like (2**a)*(3**2)*(r**c)*(s**d) where r,s,a,d are unknown and all Heights of such form will be returned. Furthermore, not all of the rows in Height will have exactly four prime factors, so I need to make sure that I am not matching rows of the form id=(p**a)*(q**b)*(r**c)*(s**d)*(t**e)... From what I can tell, the following MySQL query accomplishes this, but I would like to do it through the Django ORM. I also don't know if this MySQL query is the proper way to go about doing things. SELECT h.*,count(f.height_id) AS factorsCount FROM height AS h LEFT JOIN factors AS f ON ( f.height_id = h.id AND f.height_id IN (SELECT height_id FROM factors where prime_id=1 AND factor=2 AND degree=1) AND f.height_id IN (SELECT height_id FROM factors where prime_id=2 AND factor=3 AND degree=2) AND f.height_id IN (SELECT height_id FROM factors where prime_id=3 AND factor=5 AND degree=1) AND f.height_id IN (SELECT height_id FROM factors where prime_id=4 AND factor=7 ANd degree=1) ) GROUP BY h.id HAVING factorsCount=4 ORDER BY h.id; Any ideas or suggestions for things to try?

    Read the article

  • Good Package for Fitting Polynomial Trend Lines

    - by Rev316
    Given a simple data set, I would like to be able to calculate a trending formula given it's a second order polynomial regression. In fact, it would be great if one could even forecast X periods during calculation (similar to what Excel does). I'm looking for a portable C/C++ package that's relatively easy to use, and allows it to spit out the "best-fit" (highest R^2 value) curve. Any suggestions? Thanks!

    Read the article

  • SQL: Daily Average of Logins Per Hour

    - by jerrygarciuh
    This query is producing counts of logins per hour: SELECT DATEADD(hour, DATEDIFF(hour, 0, EVENT_DATETIME), 0), COUNT(*) FROM EVENTS_ALL_RPT_V1 WHERE EVENT_NAME = 'Login' AND EVENT_DATETIME >= CONVERT(DATETIME, '2010-03-17 00:00:00', 120) AND EVENT_DATETIME <= CONVERT(DATETIME, '2010-03-24 00:00:00', 120) GROUP BY DATEADD(hour, DATEDIFF(hour, 0, EVENT_DATETIME), 0) ORDER BY DATEADD(hour, DATEDIFF(hour, 0, EVENT_DATETIME), 0) ...with lots of results like this: Datetime COUNT(*) ---------------------------------- 2010-03-17 12:00:00.000 135 2010-03-17 13:00:00.000 129 2010-03-17 14:00:00.000 147 What I need to figure out is how to query the average logins per hour for a given day. Any help?

    Read the article

  • VBScript Regular Expressions to check IP address validity with some adtional characters

    - by yael
    How to create VB script Irregular expression syntax to check the VPparam (IP address validity) When the last octatat of the IP address is a range between ip's (x-y) and between each IP we can put the "," separator in order to add another IP example of VBparam VBparam=172.17.202.1-20 VBparam=172.17.202.1-10,192.9.200.1-100 VBparam=172.17.202.1-10,192.9.200.1-100,180.1.1.1-20 THX yael

    Read the article

  • Symfony Basic API Http Authentication

    - by Daniel Hertz
    Can someone point me in the right direction in regards to making an api use basic http authentication? I am creating a restful api with symfony but would like to require users to be logged in to get certain data. I would also like many of these methods be dependent on the the username in the authentication process in order to get some of the data (using the username from the credentials to get all of a users friends) Thanks!

    Read the article

  • Ruby Rss parser and event trigger

    - by fenec
    I'm using RSS library so i can parse Atom and RSS in Ruby and Rails and store it in a model. I've looked at the standard RSS library, but is there one library that will auto-detect that there is a new rss feed so i can update my database ? what are the best practice to trigger an instruction in order to store the new rss feed ? should i use threads to handle that problem ?is it going to be slow? thank you for your help

    Read the article

  • iPhone cocos2d CCTMXTiledMap tile transitions

    - by Jeff Johnson
    I am using cocos2d on the iPhone and am wondering if it is possible to use a texture mask in order to create tile transitions / fringe layer. For example, a grass tile and a dirt tile, I would want a tile that had both grass and dirt in it... Has anyone done this, or is the only way to create one tile for every possible transition?

    Read the article

  • python cx_Freeze egg problem

    - by bandana
    im trying to build an executable (for 32bit windows xp) from a python script (which uses lots of eggs) i considered py2exe(0.6.9), PyInstaller (1.4) and cx_Freeze (4.1.2) py2exe doesnt like eggs for breakfast PyInstaller doesnt like python 2.6 for lunch) so i went with cx_Freeze (supposed to support eggs seamlessly since 4.0b1). but for some reason it doesnt. what parameters do i pass in order for files inside an egg to be recognized?

    Read the article

  • MongoDB Norm query nested objects

    - by Howard
    Does anyone have a sample of how to query for nested/inner objects in MongoDB using NORM (C#)? For example, if a typical document in a collection looks like Order/OrderItems, how can I look up a specific OrderItem by OrderItem.Quantity 10.

    Read the article

  • Submit by pressing enter in a windows form

    - by Avik
    In order to transfer text from one textbox to another, I have created a submit button. However it would be preferable to use the functionality of the 'enter' key. I am not sure but i think the ascii code is 13.Anyway how do I go about this task at hand?

    Read the article

  • Toplink Exception, whats wrong?

    - by java_dude
    Hey, I've got an excpetion when I generate this EJB SQL Statement. Exception Description: Syntax error parsing the query [SELECT h FROM Busmodul h WHERE LOWER(h.modulNummer) LIKE :modulnummer AND h.einbauort.id = :einbauort_fk AND h.plattform.id = :plattform_fk ORDER BY TRIM(TRAILING '-' FROM CONCAT('0', h.modulNummer))], line 1, column 150: syntax error at [TRIM]. Internal Exception: line 1:150: expecting IDENT, found 'TRIM' Whats the meaning of IDENT. Any Ideas what I am doing wrong? Regards

    Read the article

  • what is the purpose of this mysql query ?

    - by Harbhag
    SELECT id, CONCAT(lastname,', ',firstname) AS fullname, lastname, firstname FROM " . TABLE_CONTACT . " WHERE CONCAT(firstname,' ', lastname) LIKE '%$goTo%' OR CONCAT(firstname,' ', middlename,' ', lastname) LIKE '%$goTo%' OR nickname LIKE '%$goTo%' ORDER BY fullname"; Can anyone please tell me what is purpose of above query ? I am new to mysql so unable to understand it. Thanks

    Read the article

  • How can I use MPTVOutWindow iPhone undocumented class?

    - by Leg10n
    Hi, I'm an iPhone developer, now I'm developing a game and I just found about the iPhone 2.2 being able to reproduce video on a TV Screen trhough MPTVOutWindow class. After googling I've found a lot of blogs with the News, however none of them give any information on the class, what should I do to implement the class in order to display ouput on the TV?

    Read the article

  • Nhibernate - How to get rid of unwanted text cast

    - by Nicolas Cornu
    Hello, I am using Nhibernate 2 and PostgreSql The above code generate a query with a cast on expression res = _session.CreateCriteria(typeof(C)) .Add(Restrictions.Eq("Exp", Exp)) .AddOrder(new Order("Fr", false)) .SetMaxResults(MW) .List<C>(); Exp is a character varying(30) In the query: SELECT ... FROM table WHERE Exp = 'text':: text ... I want to get rid of cast 'text":: text beacause the index is not used. Nicolas

    Read the article

  • Optimize this MySQL query?

    - by HipHop-opatamus
    The following query takes FOREVER to execute (30+ hrs on a Macbook w/4gig ram) - I'm looking for ways to make it run more efficiently. Any thoughts are appreciated! CREATE TABLE fc AS SELECT threadid, title, body, date, userlogin FROM f WHERE pid NOT IN (SELECT pid FROM ft) ORDER BY date; (table "f" is ~1 Gig / 1,843,000 row, table "ft" is 168mb, 216,000 rows) )

    Read the article

  • Looking for efficient scaling patterns for Silverlight application with distributed text-file data s

    - by Edward Tanguay
    I'm designing a Silverlight software solution for students and teachers to record flashcards, e.g. words and phrases that students find while reading and errors that teachers notice while teaching. Requirements are: each person publishes his own flashcards in a file on a web server, e.g. http://:www.mywebserver.com/flashcards.txt other people subscribe to that person's flashcards by using a Silverlight flashcard reader that I have developed and entering the URLs of flashcard files they want to subscribe to, URLs and imported flashcards being saved in IsolatedStorage the flashcards.txt file has the following simple format: title, then blocks of question/answers: Jim Smith's flashcards from English class 53-222, winter semester 2009 ==fla Das kann nicht sein. That can't be. ==fla Es sei denn, er kommt nicht. Unless he doesn't come. The user then makes public the URL to his flashcard file and other readers begin reading in his flashcards. In order to lower the bar for non-technical users to contribute, it will even be possible for them to save this text in a Google Document, which they publish and distribute the URL. The flashcard readers will then recognize it is a google document and perform the necessary screen scraping to get at the raw text. I have two technical questions about this approach: What is a best way to plan now for scalability issues: e.g. if your reader is subscribed to 10 flashcard files that are each 200K, it will have to download 2MB of text just to find out if any new flashcards are available. Or can I somehow accurately and consistently get at the last update date/time of text files on servers and published google docs? Each reader will have the ability to allow the person to test himself on imported flashcards and add meta information to them, e.g. categorize them, edit them, etc. This information will be stored in IsolatedStorage along with the important flashcards themselves. What is a good pattern to allow these readers to share and synchronize this meta data, e.g. so when you are looking at a flashcard you can see that 5 other people have made corrections to it. The best solution I can think of now is that the Silverlight readers will have to republish their data to a central database, but then there is the problem of uniquely identifying each flashcard, the best approach seems to be URL + position-in-file, or even better URL + original text of both question and answer fields, but both of these have their obvious drawbacks. The main requirement is that the bar for participation is kept as low as possible, i.e. type text in a google document, publish it, distribute the URL, and you're publishing within the flashcard community. So I want to come up with the most efficient technical solutions in order to compensate for the lack of database, lack of unique ids, etc. For those who have designed or developed similar non-traditional, distributed database projects like this, what advice, experience or best-practice tips you can share on the above two points?

    Read the article

  • Override the default row error behavior for a DataGridView

    - by Pat
    I have a DataGridView that is bound to a DataTable. When a row in the table has an error (row.RowError is not empty), the DGV helpfully displays an error icon and tooltip with the error text. Instead of, or in addition to, this behavior, I would like to change the entire row color. What event does the DGV subscribe to in order to handle errors and/or how can I override the DGV's default behavior?

    Read the article

  • C# multi CPU for ThreadPool.QueueUserWorkItem

    - by ikurtz
    I have a program that uses: ThreadPool.QueueUserWorkItem(new WaitCallback(FireAttackProc), fireResult); On Windows7 and Vista it works fine. When I try to run it on XP the result is a bit different from the others. I was just wondering in order to execute QueueUserWorkItem properly do I need a dual CPU system? The XP I tried to test on had .Net 3.5 installed. Inputs most welcome.

    Read the article

  • Row as XML in SP

    - by user171523
    From SP i need to get a row as as XML (Includeing all fileds.) Is there any way we can get like below. Declare @xmlMsg varchar(4000) select * into #tempTable from dbo.order for xml raw select @xmlMsg = 1 from #tempTable print '@xmlMsg' + @xmlMsg Row i would like to get it as XML output.

    Read the article

  • Parsing a file with hierarchical structure in Python

    - by Kevin Stargel
    I'm trying to parse the output from a tool into a data structure but I'm having some difficulty getting things right. The file looks like this: Fruits Apple Auxiliary Core Extras Banana Something Coconut Vegetables Eggplant Rutabaga You can see that top-level items are indented by one space, and items beneath that are indented by two spaces for each level. The items are also in alphabetical order. How do I turn the file into a Python list that's something like ["Fruits", "Fruits/Apple", "Fruits/Banana", ..., "Vegetables", "Vegetables/Eggplant", "Vegetables/Rutabaga"]?

    Read the article

  • C# Sharp: Partial Classes

    - by dcolumbus
    This is quick confirmation question: In order to make partial classes work, I initially thought that there would be a main Class public class ManageDates and then you would create partial classes like public partial class ManageDates to extend the ManageDates class. But from some experiementing, I've come to find out that if you're going to use partial classes, each individual class must be declared public partial class [ClassName] ... Am I correct in this conclusion?

    Read the article

< Previous Page | 246 247 248 249 250 251 252 253 254 255 256 257  | Next Page >