limit

Setting minimum height and width for a chrome window in firefox

I'm trying to limit the minimum height and width of a chrome (xul) window. The window itself is opened using the window.openDialog method. I tried using the minwidth and minheight window propertiet, but that does not seem to have any effect on the window. I also tries to limit the size by handling the onresize event as follows: onresize...

How to limit / throttle bandwidth with *multiple* connections

I'm writing an app in C# that downloads concurrently (in different threads) using multiple connections to multiple servers, and I'd like to be able to limit the used bandwidth. For a single connection the solution would be simple; I'd use the solution posted here : http://www.codeproject.com/KB/IP/Bandwidth_throttling.aspx which calcula...

MySQL: query the top n aggregations

I have a table which counts occurrences of one specific action by different users on different objects: CREATE TABLE `Actions` ( `object_id` int(10) unsigned NOT NULL, `user_id` int(10) unsigned NOT NULL, `actionTime` datetime ); Every time a user performs this action, a row is inserted. I can count how many actions were p...

limit in php PDO?

Hi, as people suggested me, I started using PDO library instead of Creole. Most of things are almost same as Creole, but I cannot find a function to set limit. I do not think that I should include limit statement in my query string since mssql and mysql do not share same syntax. please advise me. ...

LIMIT 10..20 in sqlserver

I'm trying to do something like : SELECT * FROM table LIMIT 10,20 or SELECT * FROM table LIMIT 10 OFFSET 10 but using SQLServer The only solution I found looks like overkill: SELECT * FROM ( SELECT *, ROW_NUMBER() OVER (ORDER BY name) as row FROM sys.databases ) a WHERE row > 5 and row <= 10 I also found: SELECT TOP 10 * ...

asp.net :does dot net platform 3.5 impose any limit on number of thread of threads to be run at a time if it does what is limit ?

hey i am using threads on my own not using thread pool.each thread is making web request .so is there any restriction from platform side fr number of threads to be used .or it will just degrade performance ? ...

Using jQuery to limit the number of list elements

I have a list element containing a number of between 20-30 events. I only want to show 5 of those, and have a «More» link I can click to watch the the next five. It doesn't matter if the five next events are appended. Can't find a jQuery script that actually does this, or am I just blind? I don't want to use carousel plugins or anything...

Limited T-SQL Join

This should be simple enough, but somehow my brain stopped working. I have two related tables: Table 1: ID (PK), Value1 Table 2: BatchID, Table1ID (FK to Table 1 ID), Value2 Example data: Table 1: ID Value1 1 A 2 B Table 2: BatchID Table1ID Value2 1 1 100 2 1 101 3 1 102 1 ...

How do I limit the number of records returned for Interbase 7.1?

We have an Interbase 7.1 database and I'm trying to figure out how to limit the number of records returned by the query to just 1. I really only need to know an event code from the last record, in which the query will return hundreds of records if I cannot do some kind of limit. Thanks in advance! ...

How do I LIMIT the number of rows in a DELETE with DB2 ?

Hi, I want to add a security on a sensitive table when I delete lines with an SQL request on a DB2 table. I want to mimic the way MySQL allows you to limit the numbers of rows deleted in an SQL request. Basically I want to do this with DB2 : DELETE FROM table WHERE info = '1' LIMIT 1 Is there a way to do that with DB2 ? ...

Limiting Array results

Hi, I have the following code which currently limits the result into a couple of types (Banana, Orange or all): function selectFromArray($prefix="", $productArray=array()) { if(!strlen($prefix)) return $productArray; return array_filter($productArray, create_function('$element', 'return (stripos($element[1]...

How to send file via FTP and bypass the quota limit?

Hello. My question is : On my server there are limit of max 2MB file sended by FTP. If I send it by some script in PHP, there are no restriction, and I want to send something around 3.8MB. Any ideas? ...

SQL Count total number of rows whilst using LIMIT

Hi, I'm trying to create a simple image gallery, showing 16 images per page. I'm using LIMIT 16 to display the correct amount on the page, but if there are more than 16 rows, I want to have links at the bottom, allowing the user to navigate to the next page. I know I could achieve the desired result by removing the limit and simply u...

richTextBox limit of characters?

Hello, I'm having a problem with storing amazing amounts of text in a rich TextBox. I'm trying to read a text file fairly big( anywhere from 90mb to 450mb), and put what I've read in a rich textbox. It works in a simple program, but when I do in a complicated program I get an OutOfMemory exception. One thing to note is that when I e...

Token Bucket or Leaking Bucket for messages

I am trying to limit my application send rate to 900kbps but the problem is that the protocol I use is message oriented and the messages have very different sizes. I can have messages from 40 bytes all the way up to 125000 bytes and all messages are send as atomic units. I tried implementing a token bucket buffer but if I set a low buck...

Connection refused when trying to open, write and close a socket a few times (Python)

I have a program that listens on a port waiting for a small amount of data to tell it what to do. I run 5 instances of that program, one on each port from 5000 to 5004 inclusively. I have a second program written in Python that creates a socket "s", writes the data to port 5000, then closes. It then increments the port number and create...

Trouble storing more than 64000 in mysql mediumtext column

I am having difficulty storing more than 64000 in a column defined as mediumtext within mysql. I ran into this limitation with the text datatype earlier and decided to drop the column and recreate it as a mediumtext field. Trouble is, my data is getting truncated at 64000 bytes. I did double check that the field is now a medium text...

How can I use MAX and LIMIT together in MySQL

I have a table with the following structure: ID | Color 1 | red 2 | blue 3 | yellow 8 | purple 10| green . . . 100|yellow I would like to be able to grab the MAX ID value for the first 5 rows. For example, I would like to do something like so: Select MAX(ID) From Table LIMIT 5 Hoping this would return the value 10 But, MySQL ke...

Limit execution time of an function or command PHP

Hi is there a possibility to set time limit only to a command or only to a function eg: function doSomething() { //..code here.. function1(); //.. some code here.. } I want to set time limit only to function1. There exits set_time_limit but I think this sets the time limit to whole script. Anybody any Idea? ...

MySQL maximum memory usage

Hi, I would like to know how it is possible to set an upper limit on the amount of memory MySQL uses on a Linux server. Right now, MySQL will keep taking up memory with every new query requested so that it eventually runs out of memory. Is there a way to place a limit so that no more than that amount is used by MySQL? Thanks in advance...