Hi
I have read about the select algorithm and I have a question maybe it looks silly!!! but why we consider the array as groups of 5 elements ?? can we consider it with 7 or 3 elements??thanks
Hi guys
I have an HTML form for authentication of users, with SQL language is easier to extract data
select name, password from users where name='nameField' and password='passwordField'
In couchdb I cant use local views just temp views:
curl -X POST -H 'Content-Type: application/json' -d '{"map": "function (doc) {if (doc.name === "nameField" && doc.password === "passwordField") {emit (doc.name, doc.passWord)}}"}' http://localhost:5984/somedb/_temp_view
But it isnt recommended (Click here), what should I do ? :(
Thanks
I have a simple Linq to Enities table to query and get the most recent records using Date field
So I tried this code:
IQueryable<Alert> alerts = GetAlerts();
IQueryable latestAlerts =
from a in alerts
group a by a.UpdateDateTime into g
select g.OrderBy(a = a.Identifier).First();
Error:
NotSupportedException: The method 'GroupBy' is not supported.
Is there any other way to get do it?
Thanks a lot!
i have users table and i have posts table i want select from users the top users that have the big amount of posts from posts table and order them by numbers of posts
i can make it by array_count_values() by i cant order it
now i think if i make it by one mysql query by left and join will be more better
table structure
posts
id | auther_id
I am writing a Selenium test in PHP using the PHPUnit Selenium extension.
I know how to type something into a text field:
$this->type('fieldName', 'value');
But how do I select an option from a drop-down menu?
I want to write a query like this:
For a table that has these columns:
ColA ColB ColC, ColD
select first(ColA, ColB, ColC, ColD)
distinct(ColB, ColC)
from table
order by ColD
The query is supposed to order the table by ColD, then group the results by the combination of ColB and ColC (they may have different data types) and returns the first rows (with all the columns of the table) in the groups.
How is it possible in MS SQL Server 2005?
I would like to select all elements that have certain attribute or don't have it at all:
//job[@salary<"100" or !@salary]
This code is not valid. Which one is? Thanks!
I have a mysql table with three columns: username, location, timestamp. This is basically a log of user activity of what location they are in and the time that they were there.
What I want to do is select a distinct username+location where only the most recent item (by timestamp) is provided.
So say the table consists of:
tom roomone 2011-3-25 10:45:00
tom roomtwo 2011-3-25 09:00:00
tom roomtwo 2011-3-25 08:30:00
pam roomone 3011-3-25 07:20:23
I would want only these to be selected:
tom roomone 2011-3-25 10:45:00
tom roomtwo 2011-3-25 09:00:00
I have a document with headings and unordered lists.
How can I use JQuery to select a given heading (by its unique class name) AND all content between that heading and the next heading?
how to use conditional select query ?
in sqlserver
i have a column in which i store date type variable .now i should retrieve one value from that column and find the difference with the curent_timestamp and if the difference is less than 10 mins i should a return 1 and if more than 10 mins i should return 0.is it possible ?
05-12-2010 13.58.30 - 05-12-2010 13.56.30
here the difference is 2 so it should return 1 .
hello all,
I am a newbie in iPhone development.
In my project there is one requirement that while editing text the iPhone's built in buttons Copy, Paste and Select all are available. I want the touch event on all these buttons and also want to display an action sheet title upon their respective touch events.
How to select top n rows from a datatable/dataview in asp.net.currently I am using the following code by passing the table and number of rows to get the records but is there a better way.
public DataTable SelectTopDataRow(DataTable dt, int count)
{
DataTable dtn = dt.Clone();
for (int i = 0; i < count; i++)
{
dtn.ImportRow(dt.Rows[i]);
}
return dtn;
}
I have something that looks like this:
<s:select ... onchange="javascript:alert('testing')"/>
But when I run it and look at using firebug, the onchange is not there and so the javascript is not executed. Any ideas? This is driving me nuts.
I'm looking for a way to programatically select all the content inside a TinyMCE editor instance.
The reason I need this is that I'd like it if all the text inside the editor was selected, as soon as someone clicks on it (I'm using TinyMCE in conjunction with JEditable, by the way).
Thanks,
Edan
Is there anyway to batch two different select queries to either SQLite or SQLCE and get the two result sets back in C#? If not, is there an embedded database that handles this?
for example i use following command to find a record
SELECT users.mail FROM users WHERE users.uid = %s
if found an match, then i should like to delete this record, and update in the same query an another table. i can solve this with 'joins' ?
I have a SQL query in my ASP.net web app that looks like this:
SELECT * FROM [Records] WHERE ([title] LIKE '%' + @title + '%')
@title, of course, is the value of a text box on the page.
My question is, why, when the text box is empty, does this return nothing? And how can I make it return everything, like logic tells me it ought to?
I need to select static colums + a dynamic number of rows as columns in SQL
TABLE 1
-------
HotelID
BlockID
BlockName
TABLE 2
-------
BlockDate (unknown number of these)
NumberOfRooms
Desired Result Row
------------------
HotelID | BlockID | BlockName | 02/10/10 | 02/11/10 | 02/12/10 | ...N
Where the date columns are the unknown number of BlockDate rows.
Hi all,
You can easily use a List in struts2 select tag, but is there a way to use Map in tag?? If it is possible please provide a sample code...
thanx !
What if I need to add a class to the options tag?
testme1
I haven't been able to do this.
This is what I have
<%= select(:user, :goalstext, Bodytarget.all.collect {|b| [ b.name, b.id ] }, {"class", "test"}, :class = "selected", :class = "selected") %
From a table element, I would like to select all rows that have the class even or the class odd.
I tried the jQuery syntax:
report.css("table.data tr[class~=odd even]").each{|line| parse_line_item(line)}
but it threw an error, any help is appreciated, thanks.
How could I select all as one string seperated with a ,?
Example table:
Table
Stringtest
Examplestring2
Anotherstring
Otherstring
And the selected result should be Stringtest,Examplestring2,Anotherstring,Otherstring.
Hello
im trying to programmatic select and change the background color of all the columns of QStandardItemModel
i have this that paint me only the first column out of 5 that the row contains
// getting the rows
QStandardItem* standardItem = m_model->item(i);
//set the color i like all the row to be painted
standardItem->setBackground(QBrush(QColor(255,0,0)));