I have a column which is of type nvarchar(max). How do I find the length of the string (or the number of bytes) for the column for each row in the table?
Suppose you have the following schema (id, user_id , score). How can I take per each user the row with max score and then order all row for score. In other word I want a ranking where each user have his best result.
Hello All:
I am using link text for implementing slider in my application, but it throws exception when the min and max values are equal. How can I handle such situation, any help on it?
Thanks
Ashwani
When I use Max to find the maximum value of a field in a particular MySQL Group after using GROUP BY, is it possible to get the entire row which contains the maximum value?
I have two tables:
Table1 = Schools
Columns: id(PK), state(nvchar(100)), schoolname
Table2 = Grades
Columns: id(PK), id_schools(FK), Year, Reading, Writing...
I would like to develop a query to find the schoolname which has the highest grade for Reading.
So far I have the following and need help to fill in the blanks:
SELECT…
I've a NULL gtklabel. Upon the occurrence of an event, I set a text in this label (with gtk_label_set_text). How can I reset the gtklabel after the event (reset to NULL)?
How can I set the max length (characters) of a GtkTextView?
What's the easiest way to set the distance from the margin of a widget in a GtkTable?
Hello,
In my table I have a serial number field, which is represneted by string.. It has a prefix and some numbers follow. Eg: ABC1234, ABC2345 etc. How to retrieve the largest value (max equivalent of int type) from this column. In my case it would be ABC2345. I probably could retrieve all the data,, sort it and get the same, but that…
select NV.PHG
From Nhanvien NV
Group by NV.phg
Having count(nv.Manv) >= all (select count(NV.MANV from nhanvien nv group by nv.MANV))
I'm finding a better way to find the 'max count' NV of a PHG ( in this example ) . I think, we meet this case all the time when we do SQL, i should've a better way .
Thanks for reading this :)
print_r($pages);
print max($pages);
print min($pages);
shows me
Array ( [0] => 1 [1] => 2 [2] => 3 ) 1 2
While I was expecting the last two numbers to be 3 and 1. How come?
All of a sudden it seems when ever I open a window on my Kubuntu (9.10) system, the windows dock in the upper left corner and can't be moved. There is nor border on the windows, no min/max/close buttons in the upper right corner of the windows. I tried opening a term window but it seems I can't type in the window. Any ideas what might…
I have an array of ids like 127415157,31323794... (range not known). What is the quickest way to find the max frequency ID in PHP?
$array_ids = array()
Is there a standard function that returns the position(not value) of the max element of an array of values?
For example:
say i have an array like this:
sampleArray = [1, 5, 2, 9, 4, 6, 3]
I want a function that returns the integer of 3 that tells me that sampleArray[3] is the largest value in the array.
My table looks like this with duplicates in col1
col1, col2, col3, col4
1, 1, 0, a
1, 2, 1, a
1, 3, 1, a
2, 4, 1, b
3, 5, 0, c
I want to select distinct…
I have a java process (Glassfish) which is leaking file descriptors. I know this because I get the helpful java.io.IOException: Too many open files exception. I can look in /proc/PID#/fd and see all the open file descriptors. When I use lsof I get a very large number of entries like this:
java 18510 root 8811u sock …
My question is pretty simple and is actually stated in the title. One of my applications throws errors regarding "too many open files" at me, even tho the limit for the user the application runs with is higher than the default of 1024 (lsof -u $USER reports 3000 open fds).
Because I cannot imagine why this happens, I guess there might…
Hi, i have a highly used server (running plesk).
I have some long scripts that take a while to process (huge mysql database). I have found then in 1 browser, i run the script and while it is loading i cannot view any other parts of the site until the script finishes, it seems that all the requests go off, but they don't get served…
I am new to LINQ, and so am struggle over some queries that I'm sure are pretty simple. In any case, I have been hiting my head against this for a while, but I'm stumped.
Can anyone here help me convert this T-SQL query into a LINQ query? Once I see how it is done, I'm sure I'll have some question about the syntax:
SELECT…
Hi All,
I am using slider control to create a progress bar for media player.
Problem:
the max value and slider size is not matching. The video get complete before it reaches the end of the slider.
Code:
<script type="text/javascript" src="js/jquery.ui.core.js"></script>
<script…
Hi,
The iPad programming guide says that the splitView's left pane is fixed to 320 points. But 320 pixels for my master view controller is too much. I would like to reduce it and give more space to detail view controller. Is it possible by anyway?
Edit: Link to the document which speaks about fixed…
I have the following line in my view:
<div class="editor-field">
<%= Html.TextBoxFor(m => m.Description)%>
</div>
How do I define the width of the text box?
Hello,
I am trying to make a chatroom layout like the following:
Now my problem is that I am not sure how to have the container box occupy the whole width and height (with valid doctype) and then make the center div grow if the window grows keeping the rest constant.
i am well aware of js/css.…
I'm very new to WPF and XAML. I am trying to design a basic data entry form. I have used a stack panel holding four more stack panels to get the layout I want. Perhaps a grid would be better for this, I am not sure.
Here is an image of my form in action: http://yfrog.com/7gscreenshot1impp
And…
I'm sure the answer is no, but is it possible to determine the width of an element before it is appended to the DOM?
Once it's appended, I know I can use offsetWidth and offsetHeight.
Thanks
it's possible to get window width or height while resizing it? not on start or end of resizing (viewWillStartLiveResize, viewDidEndLiveResize), but in real time?