limit

Create a page use limit in php?

I'm trying to set up a feature where after accessing a wepage, the user is not allowed to return until they have been away for x minuets. It's on a login system, so I don't need to worry about IPs etc. What I had in mind was as following: User accesses page; current time (of access) is logged (in database?). User tries to return to pag...

How know when my mongoDB database overhead ?

I installed a MongoDB database on my server. My server is in 32Bit and I can't change it soon. When you use MongoDB in a 32Bit architecture you have a limit of 2,5Go of data, as mentionned in this MongoDB blog post. The thing is that I have several database. So how can I know if I am close or not to this limit ? ...

Is it possible to LIMIT results from a JOIN query?

I've got a query that currently queries a Post table while LEFT JOINing a Comment table. It fetches all Posts and their respective Comments. However, I want to limit the number of Comments returned. I tried adding a sub-select, but ran into errors if I didn't LIMIT the results to 1. I'm really not sure how to go about this while still u...

Query MSQL for winners, starting at xth place using SELECT

In my MySQL table Winners, I have a list of people who have won. What I'd like to do is select a list of the names of 10 winners. So what I have right now is this: SELECT name FROM Winners ORDER BY points DESC LIMIT 10 This returns the first 10 winners which is great. But how can I make it (for example) return 10 winners, but starti...

Maximum length of a std::basic_string<_CharT> string

Hey all, I was wondering how one can fix an upper limit for the length of a string (in C++) for a given platform. I scrutinized a lot of libraries, and most of them define it arbitrarily. The GNU C++ STL (the one with experimental C++0x features) has quite a definition: size_t npos = size_t(-1); /*!< The maximum value that can be stor...

Figures occurring after ^ and _ macros (was: LaTeX limitation?)

Hi, I've hit an annoying problem in LaTeX. I've got a tex file of about 1000 lines. I've already got a few figures, but when I try to add another figure, It barfs with: ! Undefined control sequence. <argument> ... \sf@size \z@ \selectfont \@currbox l.937 \begin{figure}[t] If I move the figure to other parts of the file, I can get s...

Using the LIMIT statement in a SQLite query

Hi guys. I have a query that selects rows in a ListView without having a limit. But now that i have implemented a SharedPreferences that the user can select how much rows will be displayed in the ListView, my SQLite query doesnt work. Im passing the argument this way: return wDb.query(TABELANOME, new String[] {IDTIT, TAREFATIT, SUMARIO...

In MySQL set something similar to a LIMIT based on a percentage

Hi all. I've been using the search function but I think there isn't any related question with the solution for my question (my apologizes if I'm wrong). Let's imagine we have a simple table in MySQL with this very simple schema: (MATERIAL varchar(10) primary key, QUANTITY smallint). And with rows like: (A,10),(B,8),(C,7),(D,4),(E,1),(F,...

How to limit SMTP delivery to hourly batches

In an effort to keep us from being labeled spammers by major ISPs (in addition to SPF records, privacy policies, CANSPAM compliance and the like) - I wanted to limit the amount of mail we send out an hour. Is this possible in W2K3 SMTP server? I was looking at outbound connection properties in the SMTP virtual server config screens...It...

NSUserDefaults limit integer?

Hey guys, Is it possible to limit an integer in the NSUserDefaults? Off course you can limit it within your app but I am thinking of the TextFields in Settings. Would be great to get some hints. Thanks a lot. ...

chrome cookie size limit

Hi, I'm writing into a session cookie from my plugin in chrome. The browser seems to have a strict limit of 4kb for cookie size. It doesnt seem the case in firefox. Is there anyway i can increase the cookie size limit in chrome? Thanks ...

Enum exeeding the 65535 bytes limit of static initializer... what's best to do?

I've started a rather large Enum of so called Descriptors that I've wanted to use as a reference list in my model. But now I've come across a compiler/VM limit the first time and so I'm looking for the best solution to handle this. Here is my error : The code for the static initializer is exceeding the 65535 bytes limit It is clear whe...

[Rails] I have a has_many relationships and I want to set custom limit and offset. as well as to count them.

Hy, My code: @profile.images and i would like to get only 10 images at time and with a 10 offset, like this @profile.images(:limit => 10, :offset => 10) and not like this has_many :images, :limit => 10, :offset => 10 Then I would like to count in someway all the images for that profile. @profile.count_images Thanks (: ...

(jquery): After Ajax: success, how to limit parsing in pieces and insert piece by piece into the DOM (trick to speed up)

Let's say on ajax success the function: xmlParser(xml) is called and the XML response contains about 1500 xml elements (for example: ...) Inside it looks like: function xmlParser(xml){ var xmlDOM = $(xml); // dom object containing xml response xdom.find("book").each(function(){ var $node = $(this); // parsing...

How could I make WPF textbox control exceed the maximum size limit?

How could I make WPF textbox control exceed the maximum size limit? Don't tell me to use richeditbox or AvalonEdit control, since the richeditbox would be performance issues while has large amount of content inside. Thanks ...

limit concurrent user logins in Plone/Zope

Hi, I want to limit the number of active sessions a user can have in Plone/Zope. We are selling access to digital content and ideally want to limit how many concurrent logins can use one set of credentials. What would be the best way to achieve this? Thanks, Peter ...

Drupal View display - setting a limit for the query results

I have a View set to grab the latest forum posts. That's working fine, but I'd like to limit it to get the last 5 records only. I know I can display only 5 with PHP but I don't want a larger query than I need. I can't find any option for this in the View. thanks ...

PHP: upload image max 150x150..

How do i make a limit for the size of the image not SIZE but i mean how big it is.. so max 150x150? $image=$_FILES['image']['name']; if ($image) { $filename = stripslashes($_FILES['image']['name']); $extension = getExtension($filename); $extension = strtolower($extension); if (($extension != "jpg") && ($extension != "jpe...

Pattern for limiting number of simultaneous asynchronous calls

I need to retrieve multiple objects from an external system. The external system supports multiple simultaneous requests (i.e. threads), but it is possible to flood the external system - therefore I want to be able to retrieve multiple objects asynchronously, but I want to be able to throttle the number of simultaneous async requests. i....

Is there a size limit for HTML5 Manifest?

Hello I have been looking into HTML5 manifest but I am unclear as to whether or not there is file size limit for caching using the manifest. For example if i wanted to make several audio files available offline would this be achieved using manifest? or is it really only for small images and text? ...