limit

Data bound drop down in a gridview template

I need to limit the values in a data bound drop down placed in a template column in a gridview based on the text in another column in that row of the gridview. I also want the dropdown to be databound. Aparently, these two things are not possible at the same time as it gives a data bind error. I think .net prevents it because there is a...

How do I show X number of LI from a list using javascript (no frameworks)?

I have a menu that is being populated by a server and I have no access to the server. So I am limited to doing this on the client side. Right now there is a dropdown menu on the navigation with 14 choices. The client wants to only show 3 of them. They're not using any frameworks like jquery or mootools, so I have to do this the old-f...

Text limit inside <span> XHTML?

I would like to limit the text inside a tag so when I add a new article in my ASP admin panel, it only has 350 characters max. How do I go about doing this? ...

Limiting characters inside HTML paragraph

I want to make it so there's only 350 characters inside the paragraph, regardless of how many characters are put into it, I only want 350 displayed. How can I do this? The text is just in a div tag in text. Cheers ...

What is the Equivalent syntax of mysql " LIMIT " clause in SQL Server

What is the Equivalent syntax of MySQL " LIMIT " clause in SQL Server . I would like to use it for doing paging of my results. (want to show records5 to 10 ) ...

SharePoint - Approaching Website Storage Limit Email

Hi all, How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it's size limit? Thanks for your help. ...

Restrict time limit while uploading file + php

Hi, How to restrict a file upload time limit in php i.e I have to upload only video files which are of time 1 and 4 minutes if user upload more than 6 minutes only 4 min file will be uploaded on server. ...

SQL: Is "LIMIT 1" recommended for query where WHERE condition is based on PK ?

I am querying a mySQL database to retrieve the data from 1 particular row. I'm using the table primary key as the WHERE constraint parameter. E.g. SELECT name FROM users WHERE userid = 4 The userid column is the primary key of the table. Is it good practice to use LIMIT 1 on the end of that mySQL statement? Or are there any speed ...

Simple query takes 15-30 seconds

The following query is pretty simple. It selects the last 20 records from a messages table for use in a paging scenario. The first time this query is run, it takes from 15 to 30 seconds. Subsequent runs take less than a second (I expect some caching is involved). I am trying to determine why the first time takes so long. Here's the quer...

jvm heap limit on SUSE

hello, I hope you can help me on the problem we have with SUSE and JDK 1.4.x: my suse is PAE enabled with 15Gb RAM. unfotunately jvm cannot allocate more than 1900Mb for heap size. So java -Xmx2048m gives me an error. it seems you had the same problem, did you solve it? I hope so :) thanks Michelangelo ...

Does anyone know of a way to view all compiler warnings for a VB.NET project?

VB.NET has this rather annoying limitation which caps compiler warnings reported at 100. vbc : warning BC42206: Maximum number of warnings has been exceeded. This makes things rather frustrating when trying to size up the amount of effort that would be required to comply with VB.NET best practices, such as enabling Option Strict. Is ...

Decrement in mysql goes past zero

I am trying to do this in mysql: UPDATE table SET value = value - 1 WHERE blah blah If value is 0 and this is run value is set to 4294967295. This is because it is an unsigned integer so it is looping round back to the maximum value. How would I go about making it stay on zero instead? Can I do this purely in the sql? ...

Limit the # of rows being housed in a SQL table

This is a table design issue. I have a table that stores IP addresses. The data in the table is queried very heavily. The IPs can have different flags such as "unblocked", "temporarily blocked" and "permanently blocked". 95% - 99% of the IP addresses do not have any type of block on them. Is there a way to limit the # of rows in t...

Conditional limit in mySQL query possible???

Hi everyone, i am faced with a decicion regarding handling threaded comments in our project... I have a simple MySQL table which holds all the comments. There are two types: parents and childs. Childs represent a reply to a parent or another child. My problem: -Comment (depth 0) -- Reply Child (depth 1) --- Reply to previous child (de...

Limit foreign key choices in select in an inline form in admin

Edited :-) Hopefully a bit clearer now. The logic is of the model is: A Building has many Rooms A Room may be inside another Room (a closet, for instance--ForeignKey on 'self') A Room can only in inside of another Room in the same building (this is the tricky part) Here's the code I have: #spaces/models.py from django.db i...

How do you enable LIMIT for DELETE in SQLite?

Using PHP, I have a simple database that may store multiple items with the same content. I want to delete the first occurrence of an instance when I use DELETE. How do you enable LIMIT for DELETE in SQLite using PHP? ...

MySQL join with LIMIT 1 from two tables

I have two tables. One with information about properties. The other stores 3 images for each property. Of these three images - one is marked as being the "main" image. So I have: Properties: p_id name 1 villa a 2 villa b 3 villa c 4 villa d and Images i_id p_id main 1 1 0 2 1 0 3 1 1 4 2 0 ...

Limit client to visit a website with 1 tab and 1 browser?

I would like to do something like play.clubpenguin.com. What it does is that, when you visit the site, maybe using firefox or IE, if you opened a new tab or use other browser, when you visit that site again, it will show something like: "Please close the other browser that opened this page" or something like that. How to do this? (It...

How To Limit a WCF Service Application, So That Only Unique Clients Can Access

i have a wcf service in c# (like the calculatorservice from msdn examples), and i was wondering is it possilble to limit it to serve only 1 client per IP? i want the possibility of a few IPs to be connected at once (at least 5-6 active sessions), and that works for now, but i don't want more than 1 connection per unique IP (or unique co...

Why does the 260 character path length limit exist in Windows?

I have come up against this problem a few times at inopportune moments: trying to work on open source Java projects with deep paths Storing deep Fitnesse wiki trees in source control An error trying to use Bazaar to import my source control tree Why does this limit exist? Why hasn't it been removed yet? How do you cope with the ...