Anyone know how to do this - just what would be the equivalent to this:
"select * from YOUR_TABLE order by rand() limit 1"
in mysql??
Maybe not possible in SDB?
Hi
I want to know what changes (if any) I need to make to my plist file in order to get app store approved. Its a very simple application with no device specific capabilities.
With such a simple app would the default plist suffice?
I'm implementing GIT for web developemnt, and I want to have the working copy repository that everybody pushes to automatically reflect the latest commit in it (since it is online for everyone on the team to see as a testing site). Right now, you have to run "git reset --hard HEAD" on the repository after somebody pushes to it in order to be up to date.
In order to fully understand and take advantage of the new features and enhancements provided with the coming of the new .NET Framework 4.0, I would like to get an example of real-world application of the Code Contracts.
Anyone has a good example of application of this feature?
I would like to get a code sample with a brief explanation to help me get up and running with it.
Thanks! =)
What's the best algorithm for comparing two arrays to see if they have the same members?
Assume there are no duplicates, the members can be in any order, and that neither is sorted.
compare(
[a, b, c, d],
[b, a, d, c]
) ==> true
compare(
[a, b, e],
[a, b, c]
) ==> false
compare(
[a, b, c],
[a, b]
) ==> false
I have the following query
SELECT *
FROM attend
RIGHT OUTER JOIN noattend ON attend.date = noattend.date2
WHERE attend.date
BETWEEN '2010-02-01'
AND '2010-04-01'
AND attend.customerid =1
ORDER BY date DESC
LIMIT 0 , 30
Attend is the table with customerid
noattend is the table with a row for each date (date2) I followed the advice in other questions to right outer join it to create values where there is no record in attend but it still isn't filling in the empties
any help much appreciated
how to
compare the values of same table(say for eg: Order table) each and every time the record get inserted ,
if the record with same values get inserted already in same table i should not insert the new record with same values. how to do that exactly in sql server 2008
I need to write such a define in C++
#define scanf( fscanf(inf,
in order to replace each scanf( with fscanf(inf, literary
But I do not know how...
Thanks
I'm using jWYSIWYG in a form I'm creating that posts to a database and was wondering how you can prevent a malicious user from trying to inject code in the frame?
Doesn't the editor need brackets (which I'd normally strip during the post process) in order to display styles?
hello, I am Running a oracle query, it seems to work except that it returns 4 dupes of each result.
here is the code:
Select * from (Select a.*, rownum rnum From (SELECT NEW_USER.*, NEW_EHS_QUIZ_COMPLETE.datetime FROM NEW_USER, NEW_EHS_QUIZ_COMPLETE WHERE EXISTS(select * from NEW_EHS_QUIZ_COMPLETE where NEW_USER.id=NEW_EHS_QUIZ_COMPLETE.USER_ID) ORDER by last_name ASC ) a where rownum <= #pgtop# ) where rnum >= #pgbot#
does anyone know why this isnt working properly? thanks in advance.
Hi,
I actually had a multiautocompletetextview, where i call host after 3 characters to have a dynamic search list.
But if the user put others characters, my code call host for each of them. So it must be very long.
Could I wait a moment (about 500 ms) before launching the action , in order to look if user do an action or not ? that's possible ?
I am busy preparing for exams, just doing some old exam papers. The question below is the only one I can't seem to do (I don't really know where to start). Any help would be appreciated greatly.
Use the O(nlogn) comparison sort bound, the theta(n) bound for bottom-up heap construction, and the order complexity if insertion sort to show that the worst-case number of inversions in a heap is O(nlogn).
how do i write a query that returns aggregate sales data for California in the past x months.
----------------------- -----------------------
| order | | customer |
|-----------------------| |-----------------------|
| orderId int | | customerId int |
| customerId int | | state varchar |
| deposit decimal | -----------------------
| orderDate date |
-----------------------
-----------------------
| orderItem |
|-----------------------|
| orderId int |
| itemId int |
| qty int |
| lineTotal decimal |
| itemPrice decimal |
-----------------------
Hi,
Is sequential coupling (http://en.wikipedia.org/wiki/Sequential_coupling) really a bad thing in code?
Although it's an anti-pattern, the only risk I see is calling methods in the wrong order but documentation of an API/class library with this anti-pattern should take care of that. What other problems are there from code which is sequential? Also, this pattern could easily be fixed by using a facade it seems.
Thanks
I need to hide a column as well as other elements when my page is printed , and in order to do that I have a print style sheet, everything works fine, except for the column I want to make disappear, the strange thing is that my stylesheet works in IE , but it didn't in Mozilla and chrome, why's that?
Html code
<col width="10%" class="art-editcolumn"/>
and here's the CSS class:
.art-editcolumn
{
display: none;
}
Hope you can help me out with this.
this is my invoice table:
Invoice Table:
invoice_id
creation_date
due_date
payment_date
status enum('not paid','paid','expired')
user_id
total_price
I wonder if it's Useful to have a payment table in order to record user payments for invoices.
payment table can be like this:
payment_id
payment_date
invoice_id
price_paid
status enum('successful', 'not successful')
In my .m file I call a method that is inside the same .m file. In the header I have the correct import for the header but I keep getting this alert:
What am I doing wrong? What should I do in order to make this error disappear? I'm kinda lost here :-(
Even if I changed this to:
NSString *path = [[NSString alloc]
initWithString:@"...."];
[self parseXMLFileAtURL:path];
[path release];
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?
select * from Tags
where Name in ('ruby','rails','scruffy','rubyonrails')
order by Count desc
In this query, the number of arguments could be anywhere from 1 to 5.
I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some fancy SQL Server 2008 specific way of doing it elegantly, I am open to that.
Hi,
I would like to select a random line in my database. I saw this solution on a website:
SELECT column FROM table
ORDER BY RAND()
LIMIT 1
This SQL query run but someone said me that it was a non performant query. Is there another solution ?
Thx
I have this class mapped
@Entity
@Table(name = "USERS")
public class User {
private long id;
private String userName;
}
and I make a query:
Query query = session.createQuery("select id, userName, count(userName) from User order by count(userName) desc");
return query.list();
How can I acces the value returned by the query?
I am calling the results form a query to a list on my site based on if the item is "downtown_hosted". This works fine but I would now like to sort that list DESC, but can't seem to get the syntax correct.
Below is what I have:
$result_events = mysql_query("SELECT * FROM events WHERE downtown='downtown_hosted' ORDER BY date DESC LIMIT 5 ");
Hi there,
I´ve got an jpeg image with text on it (badly scanned document), which is hardly readable. I have already played around with the sharpen filters, contrast, levels and the color replacement tool, with decent success. however my question is, what else can be done order to maximize the texts readablity? the picture is also somewhat noisy. Any help on this one would be greatly apreciated, since I absolutely need the images content.
Hello,I need to create a menu tree using HTML. I had a search on Google, but they are providing some software to download in order to create this. But I need some script and HTML tags to do this.
Can anyone help me solve this problem.
Thanks in advance.
In my app i have the option of viewing a file that opens a window application (google earth).
In order to do that i wish to create a custom file server-side under a certain relative path (eg. "//Files") and then tell the server to execute it.
How can i do this?
Thank you