top

automate: finding non-used servers from a list of servers

i have access to a few linux clusters at school. sometimes they are busy and sometimes they are not. i usually log into each machine manually, use the "top" command to see if the server is busy (to see if both cores are used). from there, i execute my program to use some servers that are free to run my computations. what i'd like to ...

SQL: How do I use parameter for TOP like in SELECT TOP @amount?

In the vs2008 query builder, I’m trying to make a query that gets a parameter for the "TOP" Command, but it won't let me, and it say's "Error in top expression" Works: SELECT TOP 5 * FROM dbo.SomeTable WHERE SomeColumn = SomeValue Doesn't Work: SELECT TOP @param1 * FROM dbo.SomeTable WHERE SomeColumn = SomeValue ...

Fixed <thead> in <table>

<table border="1" style="height:50px; overflow:auto;"> <thead> <tr> <th>Col 1 </th> <th>Col 2 </th> </tr> </thead> <tbody> <tr> <td>Cell 3 </td> <td>Cell 4 </td> </tr> <tr> <td>Cell 5 </td> <td>Cell 6 </td> </tr> </tbody> </table> I'...

How to sort within a sql view

I've created a sql view and I need to sort the results of select by using the ORDER BY on 4 fields, but I'm getting message that ORDER BY cannot be used in views unless I use TOP. Can someone explain why TOP is needed, and does someone have a workaround for sorting in a sql view? Thanks. ...

Windows Forms Top Property Bug

I am trying to populate a container with any number of controls that have the same height and width. I allow this container to be shrunk or grown by the user and the container will organize the controls so that it fits the most controls on one row as possible. Here is the code to organize it: int row = 0; int column = 0;...

top 1 with a left join

Given the query below there might be multiple rows in dps_markers with the same marker key but we only want to join against the first. If I take this query and remove the top 1 and ORDER BY I get a value for mbg.marker_value but run as it is it always returns null SELECT u.id, mbg.marker_value FROM dps_user u LEFT JOIN (SELECT TO...

LINQ to SQL performance with "SELECT TOP {x}" queries

In looking up how to perform an equivalent to SELECT TOP 5 with LINQ-to-SQL, all the answers I've seen suggest using .Take(), like so: var myObject = ( from myObjects in repository.GetAllMyObjects() select myObject) .Take(10); I don't yet understand most of how LINQ works behind-the-scenes but to my understanding of C-like languages t...

iPhone System Processes by CPU Rate (top/ps)

What is the best way to programmatically access the processes sorted by cpu rate on the iPhone (similar to that seen in the *nix top command)? sysctl()? ...

How to correctly save the unix top command output into a variable?

I've got to save the output of the top command into a variable and I do this: myvar=`top -b -n1 | head -n 18` The problem is that it seems to be ignoring the return characters, so when I echo the content of $myvar I see something like: top - 15:15:38 up 745 days, 15:08, 5 users, load average: 0.22, 0.27, 0.32 Tasks: 133 total, 1 runn...

MDX TOP 1 - Return TOP 1 from a CUBE

Is there a way I limit the values returned by an MDX query in a way similar to a SQL TOP 1 query. SELECT TOP 1 Names From tbl_Names Order by names DESC e.g. is the a MDX statement that could do the same? ...

C++ figure out CPU/Memory usage

I have a C++ app called ./blah (to which I have the source code) when I run ./blah I can run "top" and see how much memory & cpu "./blah" is using. Now, is there anyway for "./blah" to access that information itself? I.e. when I run ./blah, I want it to every second dump out it's CPU & Memory usage. What library should I be using to d...

Oracle SQL - How to Retrieve highest 5 values of a column

How do you write a query where only a select number of rows are returned with either the highest or lowest column value. i.e. A report with the 5 highest salaried employees? ...

Run top, print output, then quit OR how to get real memory usage without top

I'm running Mac OS 10.6. I want to run top to get memory usage, but not in interactive mode, or any mode that updates. I just want memory usage at that point in time then return to prompt. I've looked for other utilities to get memory usage... but came up short (vm_stat is for virtual memory). Can someone direct me how to get top or some...

Opening an existing process

I am using Eclipse in Linux through a remote connection (xrdp). My internet got disconnected, so I got disconnected from the server while eclipse was running. Now I logged in again, and I do the "top" command I can see that eclipse is running and still under my user name. Is there some way I can bring that process back into my vie...

HTML align table rows on top

Hello, I have an HTML table. It looks as follows: <table> <tr> <td>Content one</td> <td rowspan="2"> Very long content right</td> </tr> <tr> <td>Content two</td> </tr> </table> As you see, I have some very long content on the right side of the table, actually, it is so long that it does not fit...

HTML Position DIV Tag to the absolute TOP

.myDiv { background-image: url(urltomyimgheader); height:100px; margin: auto; position:relative; top:-10px; width:600px; } This is a simple div tag used to display the logo... I have made the top -10px to make it touch the top of the browser where unless there is a gap between the logo and the page. However i feel bad about us...

How to properly use the .animate() function -- top

Is this the proper way to use the .animate(top) function? Positive number (animate down)-- $("div#container div#history-menu").animate({top:'180px'}, 600); Negative number (animate up)-- $("div#container div#history-menu").animate({top:'-180px'}, 600); Because I'm getting a java error in my error console that says: "error...

How to display a window on top with Java ?

I have the following code to display a message : JLabel A_Label=new JLabel("Updating channels ..."); A_Label.setFont(new Font("Times New Roman",0,16)); A_Label.setForeground(Color.BLUE); A_Label.setHorizontalAlignment(SwingConstants.CENTER); JOptionPane pane=new JOptionPane(A_Label); Object[] options=new String[]{"OK"}; pane.setOptions(...

Regarding Android Application Development

Hi What I need to do for making a customized rectangular bar having a logout/login button at the top of android screen ? for eg : top navigation bar in iPhone. Thanks ...

jquery tab switching links so they jump to top of page?

I was given some great help by redsquare to get this far to change jquery tabs from links within the content, but I have one more issue that I'm looking for support on... When a user clicks a link to switch to a different tab from within the content, can i get the page to jump to the top of the page? Within my demo link, scroll to the ...