Hey,
I have some jQuery going here:
$('#ticker1').hide();
$('#ticker2').hide();
$('#ticker3').hide();
$("#ticker").oneTime(2000,function(i) { /* Do the first pull out once */
var randomNum = Math.floor(Math.random()*3); /* Pick random div to show */
$('div#ticker div:eq(' + randomNum + ')').show();
$("#ticker").animate({...
Hi, I'm trying to sort a user table based on how many comments they have linked to them in a secondary comment-table, I figured a sub-select will be the best tool but I can't get the syntax correct.
Users table testdata:
id | user_id
1 | 1000
2 | 1001
3 | 1002
Comment table testdata
id | link_id
1 | 1002
2 | 1000
3 | 1002
4 |...
Okay, I have read through all the other related questions and cannot find one that helps with java. I get the general idea from deciphering what i can in other languages; but i am yet to figure it out.
Problem: I would like to level sort (which i have working using recursion) and print it out in the general shape of a tree.
So say i h...
In Visual Studio 2008, what determines the order in which projects appear within a solution folder? It's not alphabetical order, nor is it build order.
I cannot find any way of altering the order in which projects are being listed. I've tried removing my .suo file, as well as moving things about in the .sln file. Neither had any effect....
I have
class Foo
class Bar
Now, I want
Foo* Foo::singleton = new Foo();
Bar* Bar::singleton = new Bar();
to both initialize before
int main()
is called.
Furthermore, I want
Foo::singleton
to initialize before
Bar::singleton
Is there anyway I can ensure that?
Thanks!
...
Let's say I have a list of objects:
var items = new {
new { Order = 0 },
new { Order = 1 },
new { Order = -1 },
new { Order = 3 },
new { Order = 2 },
new { Order = -1 }
};
I need to order it so that items with "Order > -1" be on top of the list ordered by Order ascending, and remaining items with "Order == -1" ...
Hello everyone,
I was wondering if there is a way of displaying element's attributes in a specific order, with a use of sequence or somehow establishing an order rather than writing it explicitly.
Sorry, explanation is a bit unclear. The example might help:
So I have a template:
<xsl:template match="Element/@1|@2|@3|@4">
<xsl:if ...
Is there a way to get by this?
For example, my XML:
<group>
<idExt>new group idext</idExt>
<user-id>1</user-id>
<parent-id>2</parent-id>
</group>
when unmarshalling, goes without errors, but when I change order:
<group>
<user-id>1</user-id>
<parent-id>2</parent-id>
<idExt>new group idext</idExt>
</gro...
Hi.
My table has a 'number' column which ranges from 0 to around 1000. I want to select everything from the table while ordering it by number. However, I want the rows with number=0 to appear last. I could do it in two queries:
select * from channel_table where number > 0 order by number;
select * from channel_table where number = 0...
Hi
Using Opengl ES for Anroid we’re facing a problem when drawing a square with a texture. They look fine from a distance, but when getting close to the model the texture screws up. We believe this is caused by the fact that the model only consists of four vertices:
float[] coords = {
-1, 1, 0.0f,
1, 1, 0.0f,
-1, -1, 0.0f,
1, -1, ...
I am working on a Windows application (EXE) that uses multiple DLLs. Development is in VCExpress 2005 (VC 8.0), using C only.
Some of these DLLs are plug-ins/add-ons/extensions that are dynamically loaded using [LoadLibrary](http://msdn.microsoft.com/en-us/library/ms684175(VS.85).aspx) according to a configuration file read by the EXE....
I'm unaware of the mathematics in this algorithm and could use some help.
Algorithm:
if n<2 then
return n
else return fibonacci(n-1) + fibonacci(n-2)
Statement
n < 2 is O(1)
Time n >=2 is O(1)
Return n is O(1)
Time n>=2 is -
Return fib(n-1) + fib(n-2) is -
and time n>=2 is T(n-1) + T(n-2) +O(1)
Total: ...
Hello everyone,
i need to get number of order highlighted element (by javascript, jquery):
<li>A</li>
<li>B</li>
<li class="highlight">C</li>
<li>D</li>
so, in this case i want to get number 3 into my variable.
Thanks
...
Is there any well-known algorithm (or obvious solution) for transforming a list from order A to order B using only push and remove operations? For instance, from a b c d to b c a d could be done using the following operations:
remove(a)
remove(d)
push(a)
push(d)
Or, from c b a to a b would be
remove(c)
remove(b)
push(b)
Or, from a ...
The element tasklist may contain at most one title and at most one description, additionally any number (incl. 0) task elements in any order.
The naive approach is not applicable, since the order should not matter:
<!ELEMENT tasklist (title?, description?, task*) >
Alternatively, I could explicitly name all possible options:
(title,...
I need a collection that behaves as Set and preserves order of element insertion.
Is there one or I'll have to implement it myself?
What would the best implementation be?
...
Hi guys,
I am wanting to create a VB.Net app that checks a database and then prints out the latest orders, the database is mysql and i need it to periodatically check and only print new orders i.e. not print ones it has already printed out.
Any advice would be greatly appriciated.
Kyle
...
Hi,
I have a table with a auto-incremented primary key: user_id.
For a currently theoretical reason, I might need to change a user_id to be something else than it was when originally created through auto-incrementation. This means there's a possibility that the keys will not be in incremental order anymore:
PK:
1
2
3
952 // changed k...
Hello all,
Consider the following :
$img_pathm = JURI::root().'images/properties/images/'.$this->datos->id.'/';
$peque_path = JURI::root().'images/properties/images/thumbs/'.$this->datos->id.'/';
$result = count($this->Images);
$resultf = $result-1;
while ($resultf>=0){ ?>
<span class="editlinktip hasTip" title="<?php echo $this->da...
I'm new to PHP and have a two part question.
I need to take rows from two separate tables, and arrange them in descending order by their date.
The rows do not correspond in order or number and have no relationship with each other.
---EDIT---
They each contain updates on a site, one table holds text, links, dates, titles etc. from a bl...