limit

desc limit 50 equivalent in Core Data / NSPredicate

Hi, I'm working on an iPhone and I'm using Core Data as my store. What I'd like to do is list the top 50 entities in descending order by their height. I'm struggling to find out the syntax for the predicate. ...

How can I test a comet ajax site on a single host and work around browser simultaneous connection limit?

I am using the comet long-polling technique with apache, php, jquery. I've got a basic comet update running and it works great. I'm now attempting to build a more complex comet script, and I want a better way to debug. My comet scripts use $.ajax() with a long timeout, and the server side just sleeps until it either runs up to the time...

How to deal with the 200MB limit of Godaddy database?

Hello. For the 'unlimited plan', Godaddy's web hosting offers 'unlimited' databases (SQL Server & MySQL). However what beats me is the maximum size of each database, which is 200MB. I am not sure if this is a challenge to many out there but it would be for me as the time passes. So what I am looking for is a mechanism to be able to grow...

Java memory allocation limit

I have a loop that spawns a lot of threads. These threads contains, among other things, 2 (massive) StringBuilder objects. These threads then run and do their thing. However, I noticed that after a certain amount of threads, I get strange crashes. I know this is because of these StringBuilder, because when I reduce their initial capacit...

Doctrine order by relation table with limit

I have two tables "series" and "programs" with programs being many to one one series. Series table id | name -------------- 1 | lorem 2 | ipsum 3 | foo 4 | bar Programs table id | name | series_id --------------------- 1 | program1 | 1 2 | program2 | 2 3 | program3 | 3 4 | program4 | 4 5 | program5 | 1 6 | progra...

Limit jQuery sortable list

Hi all, I'm working on a project where I need to schedule persons in rooms. I'm using jQuery sortables to achieve this task. The only 'problem' is that there is a maximum capacity for a room. E.g. some rooms can have max. 3 persons, others 4 and some maybe only 1. So after browsing the jQuery documentation I came up with this.. only, i...

Upper limit in Python time.sleep()?

Is there an upper limit to how long you can specify a thread to sleep with time.sleep()? I have been having issues with sleeping my script for long periods (i.e., over 1k seconds). This issue has appeared on both Windows and Unix platforms. ...

Changing the limit of maximum number of pthreads by an application

Is it possible by any means to change the limit on the number of pthreads a process can create ? Currently on my linux system I can create around 380 threads but I want to increase that to say as long as memory is available. ...

Php CLI script ignoring memory_limit, crashing at much lower number than limit

Hello, for some reason, my one of my php scripts are ignoring the php.ini memory limit or ini_set. When i do a print_r(ini_get_all) it shows the global memory limit set to 100M (and local for that matter), when my script dies at Fatal error: Out of memory (allocated 24714304) (tried to allocate 571 bytes) Any tips on diagnosing this?...

Display random choice (Python)

I have a list[] of items from which I'd like to display one randomly, but the displayed item must not repeat more than once in last x requests. list1 = item1, item2, item3, item4, item5, item6, item7, item8, item9, item 10 Display a random selection from the list above list2 = store the last displayed item in list2 which should only...

MySQL negative limit?

I am doing easy web based chat so I need to get (for example) 30 latest messages from a MySQL database. That doesn't make any problem but how can I take the data in up side down order? I mean, the oldest message is the first. I have to take latest 30 records by added time. EDIT: Thanks for the answers, but... ORDER BY added DESC LIM...

Android internal storage - what are the limits?

1) Our Android app will store data in a built-in SQLite DB. I see the DB can throw android.database.sqlite.SQLiteFullException, but there's no exact info in API what is the limit. Could anyone tell what are the size limits for a DB in order not to get into the SQLiteFullException? I assume DB will store data in device's internal stora...

Prevent timeout in PHP

Hi guys, I am working on a PHP script that makes an API call to a external site. However, if this site is not available or the request times out, I would like my function to return false. I have found following, but I am not sure on how to implement it on my script, since i use "file_get_contents" to retrieve the content of the externa...

SQL query with limit on rows from one table, not the result set

I'm running a simple query with a join, similar to SELECT t1.a, t2.b FROM t1 LEFT JOIN t2 ON ... LIMIT 5 As t1 has-many rows in t2 ( any number above 2 ) the LIMIT statement does not return the first 5 rows from t1 and corresponding entries from t2, but 5 rows which usually include 2-3 rows from t1. How can I write this query to get ...

jquery - setting a limit of items, that can be dragged into a list

Hi, i have this two lists, from which i can move items from one to another with jquery ui and connect lists, with ajax. If an item is pulled over, a message is generated in a php file and then it appears on screen. Now i want that for example the right list should be allowed to contain ten items at max. It would be great if it would be ...

Exception while enumerating Outlook Items in C#

I'm trying to write an app that will monitor a few mailboxes and when mail is found grab some info from each item and then once I have a list of the items I can take the appropriate actions. But no matter how I approach it I'm hitting the Exchange enforced 255 RPC connections limit. I'm absolutely stuck as to what is causing the error ...

Avoid PHP execution time limit

I need to create a script in PHP language which performs permutation of numbers. But PHP has an execution time limit set to 60 seconds. How can I run the script so that if you need to run more than 60 sesunde, not been interrupted by the server. I know I can change the maximum execution time limit in php, but I want to hear another versi...

How to limit an SQL result set to not too common items

Problem: I have a list of names and addresses. Some names (persons) have the same address (street, zip code, town) like others. I want to select all those names with addresses with no more than three occurrences and from the rest the first three names each of a bunch pointing to the same address. Example: Albert | Adr1 Berta | Adr1 Cesa...

Is there a traffic limit on Apple's Push Notification Service?

Is there a traffic limit on Apple's PNS? Documentation says: You should also retain connections with APNs across multiple notifications. (APNs may consider connections that are rapidly and repeatedly established and torn down as a denial-of-service attack.) It seems to be heavy traffic allowed with only keeping connection...

How much memory of Memcache is available to a Google App Engine account?

Google App Engine has some information about Memcache limits: http://code.google.com/appengine/docs/quotas.html#Memcache & http://code.google.com/appengine/docs/python/memcache/overview.html#Quotas_and_Limits . However, total allowed size of RAM/memory store for a single application is not specified. It's known that no objects above 1MB ...