Skip to content

Instantly share code, notes, and snippets.

@ubiratanbraga
ubiratanbraga / Js-01
Created January 13, 2023 19:45
Javascript Challenge
[
{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"price:": 1478.10,
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",

Keybase proof

I hereby claim:

  • I am ubiratanbraga on github.
  • I am ubiratan (https://keybase.io/ubiratan) on keybase.
  • I have a public key ASCsCQ8rQ3ZBCPZ6pbZC6bPkPOyBMaWnZ3SB-SawJVKY5Ao

To claim this, I am signing this object:

@ubiratanbraga
ubiratanbraga / keybase.md
Created September 24, 2017 14:12
keybase.md

Keybase proof

I hereby claim:

  • I am ubiratanbraga on github.
  • I am ubiratan (https://keybase.io/ubiratan) on keybase.
  • I have a public key whose fingerprint is 255F D428 E48B AD58 8C69 2F0A 3A1C AAAF DF59 AC0A

To claim this, I am signing this object:

@ubiratanbraga
ubiratanbraga / teste.html
Created September 9, 2016 20:48
Routing in javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javascript">
function getParameterByName(name, url) {
if (!url) url = window.location.href;

Keybase proof

I hereby claim:

  • I am ubiratanbraga on github.
  • I am ubiratan (https://keybase.io/ubiratan) on keybase.
  • I have a public key whose fingerprint is 8036 4BA2 68ED 00F9 8E0B FB83 93E3 25D7 83A8 167E

To claim this, I am signing this object:

total = $('.percent').size();
matriz = new Array();
for (var x = total; x <= total; x++) {
valor = $('.percent').eq(x).attr('value');
//matriz[x] = valor;
};
indiceValor = 0
Verifying I am +ubiratan on my passcard. https://onename.com/ubiratan
function fileToDOMDoc($filename) {
$dom= new DOMDocument;
$xmldata = file_get_contents($filename);
$xmldata = str_replace("&", "&amp;", $xmldata); // disguise &s going IN to loadXML()
$dom->substituteEntities = true; // collapse &s going OUT to transformToXML()
$dom->loadXML($xmldata);
return $dom;
}
<?php
// Load the XML source
$xml = new DOMDocument;
$xml->load('collection.xml');
$xsl = new DOMDocument;
$xsl->load('collection.xsl');
// Configure the transformer