Please order the function belows by growth rate from fastest to slowest:
n^10
2^n
nlog(n)
10^6
And my answer is:
2^n
n^10
nlog(n)
10^6
Is my answer correct?
I'm looking to run a second batch command from .bat but after the first command has been done.
REN "myfile.txt" "my_file.txt"
start "title" "path"
Here, I want the rename command to be executed before the process I wanted to start that has been terminated or executed. why it doesn't work in sequence order?
Hi,
I need some help with a query.
i want to select from a table, some values, but the values depend on the value of an other cell. after i select i need to sort them.
Can i use ELECT column FROM table WHERE one=two ORDER BY ...?
thanks,
Sebastian
When users make credit card transactions on my web app, I'd like to include the transaction fee on the confirmation page before the user makes the order. The thing is, there are different transaction fees for different cards. Is there a way to determine a transaction fee from the card number?
I'm using Rails and ActiveMerchant, but I figure this question was applicable to other languages as well.
Im try to performe two [TestMethod] in an oder
First: Login
Second: GetUser
But Test chose the Second to be First.
Have a way to set order os [TestMethod]????
Help !!
In writing functions my brain always spends a few milliseconds to check which order of parameters would be best for a given function.
should I write:
public Comment AddComment(long userID, string title, string text)
Or probably:
public Comment AddComment(string title, string text, long userID)
Why not:
public Comment AddComment(string title, long userID, string text)
Do you follow any rules when ordering the parameters for your functions?
Which parameter would you place first and which would follow?
Hi,
I am using a table which has Createdon and Lastmodifiedon fields, I have to display first the newly added record based on createdon and then followed by lastmodifiedon records using mysql. I have tried adding "ORDER BY Createdon,Lastmodifiedon desc" at the end of the query;but sorting based on first column only occurs. Anyone please help in this issue
Thanks.
Probably a trivial question, but in which order does Exception::getTrace return calls? Most recent first or last? I'd like to know before I implement my error handler.
BenTheDesigner
Hello.
Is there recommended order in which include files should be specified?
For example, the system files, STL, Boost, go before of after local include files?
is there a particular reason to choose one or another?
Thanks
I have attempted to define this element, but XML Spy rejects is with an ambiguous error. All elements in the sequence are optional. The ValueType element can occur before the RawData element and the DefaultData element. All element in the sequence must appear in this order.
How can this element be made conformant? Thanks!
I need to write a sql statement to select all users ordered by lastname, firstname. This is the part I know how to do :) What I don't know how to do is to order by non-null values first. Right now I get this:
null, null
null, null
p1Last, p1First
p2Last, p2First
etc
I need to get:
p1Last, p1First
p2Last, p2First
null, null
null, null
Any thoughts?
I know this is a simple question, but I haven't had the chance to test it in any browser other than Firefox.
If I attach multiple event handlers to a single event on a single DOM element, are the event handlers guaranteed to be called in the order they were added? Or should I not rely on this behavior?
I’ve read that logical operator AND has higher order of precedence than logical operator IN, but that doesn’t make sense since if that was true, then wouldn’t in the following statement the AND condition got evaluated before the IN condition ( thus before IN operator would be able to check whether Released field equals to any of the values specified within parentheses ?
SELECT Song, Released, Rating
FROM Songs
WHERE
Released IN (1967, 1977, 1987)
AND
SongName = ’WTTJ’
thanx
Is there a way to specify the tab order of the elements within a jQuery Dialog which itself contains an Accordion? The dialog also specifies one button in the buttons options. For accessibility, we need to be able to tab through the accordion panes, the form elements in each accordion, the button in the buttons options, and the close icon of the dialog itself, but tabbing seems to be skipping over the button in the buttons options, and I can't find any resource that has a resolution for this sort of problem.
I have ItemsControl in a WPF application, which is bind to an array of objects.
And I am using ItemTemplate to render the list.
I want to display for each item in the list the item order, like for example
Customer 1
Name : xxxxx
Age: 9999
Customer 2
Name : yyyy
Age: 8888
Any idea how to do it
Thanks
I've decided that today - as soon as this question is answered, in fact - I'm going to dive into learning HTML.
But, looking online, I've noticed there are many types: HTML, XHTML, HTML5, and so on.
So, which should I start with? In what order should I learn them?
And, for that first language, where should I learn at?
Hi everyone
I need to order a SimpleXMLElement by a node called padre like this.
$xml = new
SimpleXMLElement('sitemap.xml',null,true);
sort($xml, "padre" );
foreach($xml as $url ) {
echo "loc}' title='".rescue_name($url-loc)."'".rescue_name($url-loc)."
{$url-padre}";
}
I don't know why is not working please let me know what is my error.
Thanks in advance
I created a windows explorer toolbar in C#. This toolbar is removed when uninstalling my applicaiton but it's still shown after unregistering (cached in explorer.exe). explorer.exe needs a restart in order toolbar to dissapear. How can I fix this by C# code?
Hello
I have the following test-code:
CREATE TABLE #Foo (Foo int)
INSERT INTO #Foo SELECT 4
INSERT INTO #Foo SELECT NULL
INSERT INTO #Foo SELECT 2
INSERT INTO #Foo SELECT 5
INSERT INTO #Foo SELECT 1
SELECT * FROM #Foo
ORDER BY
CASE WHEN Foo IS NULL THEN Foo DESC ELSE Foo END
DROP TABLE #Foo
I'm trying to produce the following output:
1
2
3
4
5
NULL
"If null then put it last"
How is that done using Sql 2005
/M
I have the following serialized XML:
DataDescriptor
<d5p1:TimePastToInitializeData >
<d5p1:Hours>2</d5p1:Hours>
<d5p1:Minutes>10</d5p1:Minutes>
<d5p1:Seconds>5</d5p1:Seconds>
</d5p1:TimePastToInitializeData>
<d5p1:PollRate >
<d5p1:Hours>2</d5p1:Hours>
<d5p1:Minutes>10</d5p1:Minutes>
<d5p1:Seconds>5</d5p1:Seconds>
</d5p1:PollRate>
</Value>
</KeyValueOfstringanyType>
With this order, the PollRate property is not constructed and the resulting deserialized object has a null value for this field.
If, however, I change the order as follows:
DataDescriptor
<d5p1:PollRate >
<d5p1:Hours>2</d5p1:Hours>
<d5p1:Minutes>10</d5p1:Minutes>
<d5p1:Seconds>5</d5p1:Seconds>
</d5p1:PollRate>
<d5p1:TimePastToInitializeData >
<d5p1:Hours>2</d5p1:Hours>
<d5p1:Minutes>10</d5p1:Minutes>
<d5p1:Seconds>5</d5p1:Seconds> </d5p1:TimePastToInitializeData>
</Value>
</KeyValueOfstringanyType>
both properties PollRate and TimePastToInitializeData are constructed and initialized properly.
public class DataDescriptor
{
RefreshRate pastTime;
[DataMember]
public RefreshRate TimePastToInitializeData
{
get; set;
}
RefreshRate pollRate;
[DataMember]
public RefreshRate PollRate
{
get; set;
}
[OnDeserializing]
void Initialize(StreamingContext c)
{
// should I do this??
}
}
And RefreshRate:
[DataContract( Namespace = "http//www.emssatcom.com/occ600")]
[Serializable]
public class RefreshRate : Observable
{
public RefreshRate()
{ }
int hours;
[DataMember]
public int Hours
{
get; set;
}
int mins;
[DataMember]
public int Minutes
{
get; set;
}
int secs;
[DataMember]
public int Seconds
{
get; set;
}
int ms;
[DataMember]
public int MilliSeconds
{
get; set;
}
}
Hi all,
I got an array which contains some data like this:
$arrs = Array("ABC_efg", "@@zzAG", "@$abc", "ABC_abc")
I was trying to print the data out in this way (Printing in alphabetic order):
[String begins with character A]
ABC_abc
ABC_efg
[String begins with character other than A to Z]
@$abc
@@zzAG
I don't know how to do it.
Not that I would want to use this practically (for many reasons) but out of strict curiousity I would like to know if there is a way to reverse order a string using LINQ and/or LAMBDA expressions in one line of code, without utilising any framework "Reverse" methods.
e.g.
string value = "reverse me";
string reversedValue = (....);
and reversedValue will result in "em esrever"
EDIT
Clearly an impractical problem/solution I know this, so don't worry it's strictly a curiosity question around the LINQ/LAMBDA construct.
Hello,
I'm trying to use formview in order to do insert of a new entity object (called Customer)
Customer has a reference to another entity called Address.
How can I fill both of them in the same formview?
Thanks.
Hi,
I have an HTML file which is linked to CSS file and also to JavaScript file.
Is JavaScript executed first and then the CSS is applied, or vice versa ?
Is there any way to change the order ?
Thanks !
Hi guys,
I am trying to get some results ordered by total votes (where client votes count 2 points and other people votes are 1 point).
tab_names:
+-----------+
| Name | id |
+------+----+
| John | 1 |
| Paul | 2 |
+------+----+
tab_votes:
+--------+-----------+
| idname | ip |
+--------+-----------+
| 2 | 127.0.0.1 |
| 2 | 127.0.0.1 |
| 2 | 82.23.5.1 |
| 1 | 127.0.0.1 |
+--------+-----------+
This is the MySQL query I've got but doesn't work:
SELECT *
COUNT(v.idname) AS totalvotes,
(SELECT COUNT(v.ip) FROM tab_votes WHERE v.ip LIKE '$ip') AS uservotes
FROM tab_names n
LEFT JOIN tab_votes v ON n.id = v.idname
GROUP BY n.name
ORDER BY uservotes DESC, totalvotes DESC
LIMIT 40