maximum

Postgresql vlookup

Let's say I have a table "uservalue" with the following columns: integer user_id integer group_id integer value I can get the maximum value for each group easily: select max(value) from uservalue group by group_id; What I would like is for it to return the user_id in each group that had the highest value. The max function in matla...

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...

Does the LDAP protocol limit the length of a DN

Does the LDAP protocol specify a maximum length that a DN can take? I've looked through http://tools.ietf.org/html/rfc4514 but I can't find any restrictions that it imposes. ...

Resizing a UITextView with a maximum height

Hi all :) I am displaying some text from a sqlite3 database and would like the UITextView to resize automatically depending on the amount of text. I can do this fine as follows: TextLabel.scrollEnabled = YES; TextLabel.userInteractionEnabled = YES; [TextLabel setFrame:CGRectMake(55.10, 26.15, TextLabel.contentSize.width, TextLabel.co...

Longest pathname string in Mac OS X HFS+

I'm trying to find a definitive answer (e.g. Apple developer documentation) for the maximum length of a complete path string on Mac OS X. I've seen various non-authoritative sites that state that it is unbounded, 4096 characters, or 1024 characters, but haven't been able to find an answer on Apple's web site. ...

PHP Retrieve minimum and maximum values in a 2D associative array

I have an array in this format: Array ( [0] => Array ( [id] => 117 [name] => Networking [count] => 16 ) [1] => Array ( [id] => 188 [name] => FTP [count] => 23 ) [2] => Array ( [id] => 189 ...

Apache Redirects/Rewrite Maximum

I have a migration project from a legacy system to a new system. The move to the new system will create new unique id's for the objects being migrated; however, my users and search indexes will have the URLs with the old ids. I would like to set up an apache redirect or rewrite to handle this but am concerned about performance with that ...

Problem with java not releasing oracle cursors.

Hi, I'm working on the following code below, (edited for clarity), that is giving me a few problems with open cursors in Oracle. Basically I am trying to select data from the DB and for each row returned there is 0 or more rows of sub data to be selected and appended to the record. This is currently being achieved by calling out to anot...

SQL Max(something,0) type solution

Hi I would like to do the following: SELECT sum(max(field-10,000,0)) from TABLE as in, I want to have field-10,000 summed up, but if field-10,000 < 0 then I want it to add 0. any suggestions? Karl ...

SQL statement for maximum common element in a set

I have a table like id contact value 1 A 2 2 A 3 3 B 2 4 B 3 5 B 4 6 C 2 Now I would like to get the common maximum value for a given set of contacts. For example: if my contact set was {A,B} it would return 3; for the set {A,C} it would return 2 for the set {B} it would return 4 What SQL s...

MySQL - Selecting records based on maximum secondary ID

Here's part of my table: id team_id log_id 1 12 1 2 12 1 3 12 1 4 12 1 5 1 2 6 1 2 7 1 3 8 1 3 What query would produce this output (so only the records with the highest log_id values are returned that correspond to ...

NSTextField set maximum characters

Is there an easy way for me to set a limit on the amount of characters my NSTextField can have? I don't want to have a counter then warn the user if it's over the limit, I want to set the limit so if it's past x characters that's it, they can't type anymore. ...

SQL query ...multiple max value selection. Help needed

Business World 1256987 monthly 10 2009-10-28 Business World 1256987 monthly 10 2009-09-23 Business World 1256987 monthly 10 2009-08-18 Linux 4 U 456734 monthly 25 2009-12-24 Linux 4 U 456734 monthly 25 2009-11-11 Linux 4 U 456734 monthly 25 2009-10-28 I get this result with the query: ...

How many maximum connections can oracle have ?

How many maximum number of connections can oracle handle ? The following is a summary for my sql, i need similar stats for oracle : The maximum number of connections MySQL can support depends on the quality of the thread library on a given platform, the amount of RAM available, how much RAM is used for each connection, the workload fro...

Limiting the number of selectable files in a Flash file upload dialog

Is this possible through flash? I have to create a flash uploader where you can define the maximum number of files that can be selected. ...

SQL getting max date from two tables

Hi, I have two tables USER (one row per user) id,username,firstname,lastname,lastmodified 1,johns, John,Smith, 2009-03-01 2,andrews, Andrew,Stiller, 2009-03-03 STUDIES (multiple rows per user) id,username,lastmodified 1,johns, 2009-01-01 1,johns, 2009-02-01 1,johns, 2009-07-01 2,andrews,2009-05-05 2,andrews,2009-04-04 I want to g...

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 ...

simple logic question comparing variables

If I have variables with numbers how to figure out which are the three with the highest value? ...

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...

Get maximum amount of recurrences from XML using LINQ

I have an xml file containing basic information about products, with the following structure: - products - Id - Price - ManufacturerId And another one, containing data about manufacturers: - manufacturers - Id - Name I'd like to get the top 3 manufacturers with the most products (manufacturer name and number of ...