Come with me and I’ll free your soul, huh!
Megadeth - Super Collider
"I'm Dorothy Gale from Kansas"
d e v o n
The Stonewall Inn

bliss lane
No title available
we're not kids anymore.
todays bird
𓃗
will byers stan first human second
tumblr dot com
EXPECTATIONS

★
Claire Keane
YOU ARE THE REASON
🩵 avery cochrane 🩵
Today's Document
Misplaced Lens Cap

PR's Tumblrdome
Sweet Seals For You, Always
Cosmic Funnies

seen from Croatia

seen from Germany
seen from United States

seen from Malaysia
seen from Kuwait
seen from United States

seen from United States

seen from Türkiye
seen from Türkiye

seen from United States

seen from Singapore
seen from Egypt
seen from Paraguay

seen from Croatia

seen from Malaysia
seen from Indonesia

seen from United States

seen from Bangladesh

seen from United States
seen from Bangladesh
@granog
Come with me and I’ll free your soul, huh!
Megadeth - Super Collider
FLEX - Copy all XML Attributes to another node
This snippet copy all the attribute from a node to another node.
for each(var attr:XML in srcXMLNode.attributes()) { dstXMLNode.@[attr.name()] = attr; }
It's my pretty, my beautiful pretty...
Since I would like to post code snippet, I would like to see them pretty, highlighted and well-indented.
I've tried Google Prettify, but I cannot getting it work.
So I go through JQuery Syntax Highlighter, and that's it!
With few lines of code added to the <head> tag for your html page, you just have to add the attribute class="highlight" to a <pre> to get it highlighted:
Here's the code to add to <head>:
<script type="text/javascript"> $.SyntaxHighlighter.init({ 'wrapLines':false, 'lineNumbers': false, 'theme': 'google', 'themes': ['google'] }); </script>
Heres the code to add to <body> for a code block:
<pre class="highlight"> <!-- Insert your code here --> <!-- Support bsh, c, html, java, js, mxml, perl, pl, xhtml, xml, xsl & many more --> </pre>
Here is an example of Java code:
public static String documentToString(Document d) throws Exception { String xmlString = ""; if (d != null) { StringWriter stw = new StringWriter(); Transformer serializer = TransformerFactory.newInstance().newTransformer(); serializer.transform(new DOMSource(d), new StreamResult(stw)); xmlString = stw.toString(); } return xmlString; }
However, the first snippet was HTML code. Since the browser interpreted directly the HTML code, you should to specify to the css that it is Html and replace the < & > by the correct html code < & > :
<pre class="language-html"> <pre class="highlight"> <!-- Insert your code here --> <!-- Support bsh, c, html, java, js, mxml, perl, pl, xhtml, xml, xsl & many more --> </pre> </pre>
So that's pretty easy and it's pretty well!
Julien
That's my first time...
Hi anyone...
First time here! I would create this blog to share any ideas i will have about High Tech. Also sharing some music that's i found across the web.
Also, every time I'm facing a coding problem, go to ggl and see that I've already seen the answer. So I will store my coding problem and post the response I found about it.
Don't know if anybody will read me, but finally it's more sticky notes than memories...Â
Julien