spsarolkar
-
Content Count
5 -
Joined
-
Last visited
Posts posted by spsarolkar
-
-
There are two ways to do it
you can use web developer plugin for firefox which allows you to see generated source code,you can download it here https://addons.mozilla.org/en-US/firefox/addon/web-developer/
you can use php function htmlentities() to print the output and validate it with dreamweaver -
I have rewritten your functionHey everybody,
I've been stuck on this for the past 4 hours now. I need to write a function that will swap the first and last nodes of a linked list, leaving the middle the same
constraints
-cannot move data, only the pointers
sample output:
linked list a is: 10 20 30 40 50 60 70
after swapping: 70 20 30 40 50 60 10
so far i'm only able to get this: 70 20 30 40 50 60
void reverse( node * & s) { if(s == NULL || s->p == NULL) //0 or 1 node { //do nothing } else if(s->p->p == NULL) //2 nodes { node *temp = s; s = temp->p; temp->p = NULL; s->p = temp; } else { node *result = NULL; node *cur = s; node *walker; //reverse order while (cur != NULL) { walker = cur->p; cur->p = result; result = cur; cur = walker; } s = result; result = NULL; cur = s->p; s->p = NULL; //reverse all but first & last node while (cur->p != NULL) { walker = cur->p; cur->p = result; result = cur; cur = walker; } s->p = result; }}
there's probably a simpler way to do this...but after working on it for so long my brain is fried lolall i need to do now is figure out a way to get the original first node @ the end of the list
thanks!
node *firstNode = s;
node *lastNode = s->p;
// make first node as last node
firstNode->p = NULL;
//make last node as first node
lastNode->p = firstNode;
}
else
{
node *cur = s;
//reverse order
node *firstNode=s;
node *secondNode=s->p;
node *secondlastNode=NULL;
while (cur->p != NULL)
{
if(cur->p->p==NULL)
{
secondlastNode=cur;
}
cur=cur->p;
}
//make firstNode as last node
firstNode->p=NULL;
secondlastNode->p = firstNode;
//make make last node as first node
s=secondlastNode->p;
s->p=secondNode;
}
} _linenums:0'>void reverse( node * & s) { if(s == NULL || s->p == NULL) //0 or 1 node { //do nothing } else if(s->p->p == NULL) //2 nodes { node *firstNode = s; node *lastNode = s->p; // make first node as last node firstNode->p = NULL; //make last node as first node lastNode->p = firstNode; } else { node *cur = s; //reverse order node *firstNode=s; node *secondNode=s->p; node *secondlastNode=NULL; while (cur->p != NULL) { if(cur->p->p==NULL) { secondlastNode=cur; } cur=cur->p; } //make firstNode as last node firstNode->p=NULL; secondlastNode->p = firstNode; //make make last node as first node s=secondlastNode->p; s->p=secondNode; }}
-
You have to set focus to the flash when window loads, you can use on load event of window to to do it, as followswrite your body tag as follows<p>I have a website and have inserted flash. However when I preview it on my site it will not start automatically I have to left click to play. When I preview it on my Decompiler premium it works just fine, can some one please help me, I'm so confused! what am I doing wrong? </p>question by Jules
<body onload='setFocus()'>//html content</body>
and in javascript write functionfunction setFocus(){document.getElementById('myFlashId').focus();}
replace 'myFlashId' with your id.
-
There are plent other softwares which are similar to google earth
you can try out the following links:-
World Wind - an open source 3D Earth-viewing software developed by NASA that accesses NASA JPL database. World Wind lets you zoom from satellite altitude into any place on Earth. Leveraging Landsat satellite imagery and Shuttle Radar Topography Mission data, World Wind lets you experience Earth terrain in visually rich 3D, just as if you were really there.
You can download World Wind here
Blue Marble: Next Generation offers greater spatial detail of the surface and spans a longer data collection period than the original. The original Blue Marble was a composite of four months of MODIS observations with a spatial resolution (level of detail) of 1 square kilometer per pixel.
You can download blue marble from here
Adding Rows & Columns In Html Table Using Javascript
in Programming
Posted · Report reply
you can add row dynamically using javascript dom