Loading
Notes & Links.
Monday, December 28, 2009
Wednesday, December 23, 2009
Sunday, December 20, 2009
Psychiatry Glossary
First rank symptoms - Schneider classified the most characteristic symptoms of schizophrenia as first-rank features of schizophrenia. These included third person auditory hallucinations, thought echo, thought interference (insertion, withdrawal, and broadcasting), delusional perception and passivity phenomena.
Friday, December 18, 2009
Thursday, December 17, 2009
Tuesday, December 15, 2009
Friday, December 11, 2009
Sunday, December 06, 2009
Manipulate Nodes
DOM Get Values xmlDoc=loadXMLDoc("books.xml"); x=xmlDoc.getElementsByTagName("title")[0]; y=x.childNodes[0]; txt=y.nodeValue; txt=xmlDoc.getElementsByTagName("title")[0].getAttribute("lang"); x=xmlDoc.getElementsByTagName("title")[0].getAttributeNode("lang"); txt=x.nodeValue; |
DOM Change Nodes xmlDoc=loadXMLDoc("books.xml"); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0]; x.nodeValue="Easy Cooking"; x=xmlDoc.getElementsByTagName('book'); x[0].setAttribute("category","food"); x=xmlDoc.getElementsByTagName("book")[0] y=x.getAttributeNode("category"); y.nodeValue="food"; |
DOM Remove Nodes xmlDoc=loadXMLDoc("books.xml"); y=xmlDoc.getElementsByTagName("book")[0]; xmlDoc.documentElement.removeChild(y); x=xmlDoc.getElementsByTagName("book")[0]; x.parentNode.removeChild(x); x=xmlDoc.getElementsByTagName("title")[0]; y=x.childNodes[0]; x.removeChild(y); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0]; x.nodeValue=""; x=xmlDoc.getElementsByTagName("book"); x[0].removeAttribute("category"); x=xmlDoc.getElementsByTagName("book"); for (i=0;i while (x[i].attributes.length>0) { attnode=x[i].attributes[0]; old_att=x[i].removeAttributeNode(attnode); } } |
DOM Replace Nodes xmlDoc=loadXMLDoc("books.xml"); x=xmlDoc.documentElement; //create a book element, title element and a text node newNode=xmlDoc.createElement("book"); newTitle=xmlDoc.createElement("title"); newText=xmlDoc.createTextNode("A Notebook"); //add the text node to the title node, newTitle.appendChild(newText); //add the title node to the book node newNode.appendChild(newTitle); y=xmlDoc.getElementsByTagName("book")[0] //replace the first book node with the new node x.replaceChild(newNode,y); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0]; x.replaceData(0,8,"Easy"); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0]; x.nodeValue="Easy Italian"; |
DOM Create Nodes xmlDoc=loadXMLDoc("books.xml"); newel=xmlDoc.createElement("edition"); x=xmlDoc.getElementsByTagName("book")[0]; x.appendChild(newel); newatt=xmlDoc.createAttribute("edition"); newatt.nodeValue="first"; x=xmlDoc.getElementsByTagName("title"); x[0].setAttributeNode(newatt); x=xmlDoc.getElementsByTagName('book'); x[0].setAttribute("edition","first"); newel=xmlDoc.createElement("edition"); newtext=xmlDoc.createTextNode("first"); newel.appendChild(newtext); x=xmlDoc.getElementsByTagName("book")[0]; x.appendChild(newel); newCDATA=xmlDoc.createCDATASection("Special Offer & Book Sale"); x=xmlDoc.getElementsByTagName("book")[0]; x.appendChild(newCDATA); newComment=xmlDoc.createComment("Revised March 2008"); x=xmlDoc.getElementsByTagName("book")[0]; x.appendChild(newComment); |
DOM Add Nodes xmlDoc=loadXMLDoc("books.xml"); newel=xmlDoc.createElement("edition"); x=xmlDoc.getElementsByTagName("book")[0]; x.appendChild(newel); newNode=xmlDoc.createElement("book"); x=xmlDoc.documentElement; y=xmlDoc.getElementsByTagName("book")[3]; x.insertBefore(newNode,y); x=xmlDoc.getElementsByTagName('book'); x[0].setAttribute("edition","first"); x=xmlDoc.getElementsByTagName("title")[0].childNodes[0]; x.insertData(0,"Easy "); |
DOM Clone Nodes xmlDoc=loadXMLDoc("books.xml"); oldNode=xmlDoc.getElementsByTagName('book')[0]; newNode=oldNode.cloneNode(true); xmlDoc.documentElement.appendChild(newNode); //Output all titles y=xmlDoc.getElementsByTagName("title"); for (i=0;i document.write(y[i].childNodes[0].nodeValue); document.write(" "); } |
DOM HttpRequest |
Saturday, December 05, 2009
Friday, December 04, 2009
War Is Over!
CBS White House correspondent Chip Reid questioned administration spokesman Robert Gibbs on this point. Reid reported later, "After the briefing, Gibbs went to the president for clarification. Gibbs then called me to his office to relate what the president said. The president told him it IS locked in - there is no flexibility. Troops WILL start coming home in July 2011. Period. It's etched in stone. Gibbs said he even had the chisel."