I am using Django with MySql. I have a CharField with max length of 64 as the 2nd to last column, and a Boolean as the last column. Will reversing the order of these provide better optimization of space?
Hi,
I have resize images exceeding a max size. Methods I tried so far are not good enough :-(
System.Drawing.Image.GetThumbnailImage generates very poor quality images in general.
Playing with options like this one I can generate better images in quality but heavier than the original one.
Probably the second option (or something similar) is the best option and I would need to resize using the proper options.
Any advice?
function letter=read_char(imgn, num_letters)
global templates
comp=[ ];
for n=1:num_letters
sem=corr2(imgn, templates{1,n});
comp=[comp sem];
end
vd=find(comp==max(comp));
Can someon please explain what the 'FOR' loop does and how 'vd' is calculated?
Also, what is the variable 'comp' and what will it looks like as the array also contains itself and another variable 'sem' which is calculated from the corr2 function.
thanks
Of course there are a thousand ways to get this done, but is the simplest (or most elegant) way to achieve this?
[4,8].max
That's actually not too shabby, but what would you do?
i have a struct HLRange with two CGFloat's
struct HOLRange
{
CGFloat min;
CGFloat max;
};
typedef struct HOLRange HOLRange;
but how do i make a function like HLRangeMake(1,2); .. like CGRectMake?
I don't know if its possible but I'd like to make it a Zend_Db_Select object and I don't know how
SELECT *
FROM MyTable MT1
WHERE MT1.date = (
SELECT MAX(MT2.date)
FROM MyTable MT2
)
I need to test if my 304 responses are working, but my development environment is pretty hard set on force no-cache.
Is there an easy way to modify the max-age value of the cache-control header before it goes out?
I'm perhaps a bit optimistic in hoping chrome (or an extension, or FF) has a console command letting me alter the if-modified-since header then send the request. Maybe paste something into a telnet connection?
Is there a way to tell how to get a file size that is uploaded to database?
SELECT [ID]
,[File]
FROM [dbo].[Reports]
I would like to be able to tell user the size of File which is VarBinary(max) field in MS SQL 2005/2008. How to do that?
Maybe the only way to do is to create another column and when inserting file i should also insert it's size in additional column?
I want to get file size I'm doing this:
my $filename=$query->param("upload_file");
my $filesize = (-s $filename);
print "Size: $filesize ";`
Yet it is not working. Note that I did not upload the file. I want to check its size before uploading it. So to limit it to max of 1 MB.
Hey All
i have a image gallery and i want to limit the set where is shows 4 images in each row at a max of 3 columns, if its possible how is it made, and well it be easy using php,
I want to get file size I'm doing this:
my $filename=$query->param("upload_file");
my $filesize = (-s $filename) ;
print "Size: $filesize ";
Yet it is not working.Note that I did not upload the file. I want to check its size before uploading it. so to limit it to max of 1 MB.
Not a technical question, but related to IT.
At the moment I work in the open plan office and the guy next to me is talking to himself
while programming. It annoys my collegue and me so much that we are putting the earphones on with music volume set to max.
Does anyone know good and polite solution to shut him up?
Hi, i wanted to know how to edit 3d models' vertices in XNA at runtime, i wana do something like the 3d max subtract feature where u put 2 models together and delete the intersecting vertices of 1 of them, more like carving one mesh with the other.
see this if i wasn't clear
anyway so any pointers on how to edit vertices at runtime or any help is really really appreciated.
thanks
I am using the following query to select 1 random record -
SELECT name FROM table WHERE id >= (SELECT FLOOR( MAX(id) * RAND()) FROM table ) ORDER BY id LIMIT 1
but it gives me the same set of records every time I call it. How do I get better random record?
Is there a way to run a loop through a folder and process like 30 files for a month and give the average,max of each columns and write in one excel sheet or so??
I have 30 files of size [43200 x 30]
I ran a different matlab scrip to generate them so the names are easy
File_2010_04_01.xls , File_2010_04_02.xls ..... and so on
I cannot merge them as each are 20mbs and matlab would crash.
Any ideas?
Thanks
i am running a query from vba editor access:
"select max(somerow) from sometable"
i want to put the result of this query into a variable. how do i do it?
In this query:
SELECT WTTEMPLATE.TEMPLATEuID,
MAX (WTTRX.VALUEDATE) AS template_last_use_date
FROM wttemplate, wttrx
WHERE WTTEMPLATE.TEMPLATEID = WTTRX.TEMPLATEID(+)
AND WTTEMPLATE.CUSTID = WTTRX.CUSTID
GROUP BY WTTEMPLATE.TEMPLATEuID
The explain plan shows:index fast full scan using indexes on WTTEMPLATE.TEMPLATEID and (WTTRX.TEMPLATEID,WTTRX.CUSTID). My question is this: I have not specified any filter criteria , so how can it use indexes? It should do full scan...right?
Please note that there is no limitation of memory.
I need to insert int from 1 to 1000.
I can do the each of the following operations in constant order of time:
push():adds to the top
pop():removes the top element
getMax(): returns the max element
Please suggest me appropriate datastructure.
Is there any difference in (asymptotic) performance between
Orders.OrderBy(order => order.Date).First()
and
Orders.Where(order => order.Date == Orders.Max(x => x.Date));
i.e. will First() perform the OrderBy()? I'm guessing no. MSDN says enumerating the collection via foreach och GetEnumerator does but the phrasing does not exclude other extensions.
What do I need to consider before I switch a bunch of fields from VARCHAR(bignumber) to TEXT?
Aside from performance, and sometime in the far future TEXT will be deprecated, and aside from the fact that it looks like I need to drop and recreate the table to alter the column's data type?
This is for SQL 2000-- I can't do VARCHAR(max) and VARCHAR(8000) isn't large enough.
=MAX(SUM(A1:A5))
How do i incorporate the above formula into
=IF(
AND(
$H$14<F22, F22<=($H$14+$H$15)
),
$I$15,
IF(
AND(
$H$14+$H$15<F22, F22<($H$14+$H$15+$H$16)
),
$I$16,
IF(
AND(
$H$14+$H$15+$H$16<F22, F22<=($H$14+$H$15+$H$16+$H$17)
),
$I$17,
$I$14
)
)
)
It keeps running a circular reference error. Help!
The sum value shouldnt exceed 150. If exceed, then replace the cell with zero value.
The whole question is pretty much in the title. For each row of the table I'd like to select the maximum of a subset of columns.
For example, from this table
name m1 m2 m3 m4
A 1 2 3 4
B 6 3 4 5
C 1 5 2 1
the result would be
name max
A 4
B 6
C 5
The query must be compatible oracle 8i.
Thanks.
What's the best way to convert (to hash) a string like 3800290030, which represents an id for a classification into a four character one like 3450 (I need to support at max 9999 classes).
The hash needs to be unique and always the same for the same an input.
If possible, the hash should also be reversible (but this is not required).
To help support and anyone who may use one of my applications I tend to log a few things during the application startup.
Currently I log:
Start Time
App Name
App Author
App Version
App Classpath
Current working directory
Java vendor
Java version
Max heap size
Taking into consideration this application may be used / supported by a whole host of people can anyone think of any other vital details which we / others should log for good practice?