';
+ //2p criando uma variavel para acessar o conteudo da calculadora.
+ calc = document.getElementById('calculadora');
+ //3p Testaremos se estamos acessando o elemento criado!
+ //************** calc.innerHTML = "legal";
+ //criando o visor
+ calc.innerHTML += '
Calculadora inteligente
';
+ //criando a LISTA que irá receber nossos numeros
+ //Declaração da função que chama os Numeros
+ criarBtsNumeros(10);
+ //Declaração da função que chama os Operadores
+ criarBtsOperadores("+","-","*","/","=");
+ // criando os numeros abaixo
+ ativarBotoes ();
+}
+
+
+// Função que irá criar os Bt Numerico
+function criarBtsNumeros($qN) {
+
+
+/* var qTag = document.createElement('ul');
+ var qName = document.createAttribute('id');
+ qTag.setAttribute('id','numeros');
+
+ document.getElementById("calculadora").appendChild(qTag);
+*/
+ // criando a TAG
+ calc.innerHTML += '
';
+ //var uL = document.getElementsByTagName('ul');
+
+ for (i=0 ; i < $qN; i++) {
+ calc.getElementsByTagName("ul").item(0).innerHTML += '
' + i + '
';
+ }
+
+
+}
+
+// Função que irá criar os Bt de Operação
+function criarBtsOperadores() {
+ //cria o segunda lista!
+ calc.innerHTML += '
';
+
+ for (i=0 ; i < arguments.length ; i++) {
+ calc.getElementsByTagName("ul").item(1).innerHTML += '
' + arguments[i] + '
';
+ }
+
+}
+
+function ativarBotoes (){
+ for (i=0 ; i < 10; i++){
+ document.getElementsByTagName("li").item(i).onclick= function(){
+ //alert(this.innerHTML);
+ acumulador = acumulador + this.innerHTML;
+ document.getElementById("visor").innerHTML = acumulador ;
+ }
+ }
+}
+
+
+
diff --git a/calc/calculadora.html b/calc/calculadora.html
new file mode 100644
index 0000000..5b915c4
--- /dev/null
+++ b/calc/calculadora.html
@@ -0,0 +1,15 @@
+
+
+
+
+Calculadora inteligente
+
+
+
+
+
+
+
+
+
+
diff --git a/geb/geb.js b/geb/geb.js
new file mode 100644
index 0000000..d0e0d9a
--- /dev/null
+++ b/geb/geb.js
@@ -0,0 +1,33 @@
+/**
+ * Geb
+ * @description pega um objeto e retorna o mesmo
+ *
+ * @param seletorFull {string} insira um seletor CSS
+ * @example
+ * // Evento onLoad para a pagina . ou seja assim que for carregad0
+ // todo o conteudo da pagina, os eventos são executados.
+ // isto faz com que evite que eu chame funções ou metodos antes
+ // dos elementos de marcação estejam na pagina.
+ window.onload = function() {
+ geb("#teste").innerHTML += "dasdsad";
+ geb(".teste")[0].innerHTML += "AAAA";
+ geb("div")[0].innerHTML += "BBBB";
+ };
+
+ Teste de performace:
+ http://jsperf.com/jquery-vs-native-dom-selectores/4
+ *
+ */
+function geb(seletorFull) {
+ var tipo = seletorFull.slice(0, 1),
+ name = seletorFull.slice(1, seletorFull.length),
+ Doc = document;
+ switch (tipo) {
+ case "#":
+ return Doc.getElementById(name);
+ case ".":
+ return Doc.querySelectorAll(seletorFull);
+ default:
+ return Doc.getElementsByTagName(seletorFull);
+ }
+}
diff --git a/geb/geb.min.js b/geb/geb.min.js
new file mode 100644
index 0000000..21044db
--- /dev/null
+++ b/geb/geb.min.js
@@ -0,0 +1,3 @@
+function geb(d){var c=d.slice(0,1),a=d.slice(1,d.length),b=document;switch(c){case"#":return b.getElementById(a);case".":if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){return b.querySelectorAll(d)}else{return b.getElementsByClassName(a)}default:return b.getElementsByTagName(d)}};
+/*Size: 1116->282Bytes
+ Saved 74.731186%*/
diff --git a/google_charts/page.html b/google_charts/page.html
new file mode 100644
index 0000000..4a67f0f
--- /dev/null
+++ b/google_charts/page.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/google_charts/script.js b/google_charts/script.js
new file mode 100644
index 0000000..af19cdb
--- /dev/null
+++ b/google_charts/script.js
@@ -0,0 +1,171 @@
+
+ /*
+var anual = {
+ '2013':{
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+ '2014':{
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+ '2015':{
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ }
+};
+
+
+
+
+var mensal = {
+ 'Dezembro':{
+ 'ano':2013,
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+ 'Janeiro':{
+ 'ano':2014,
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+ 'Fevereiro':{
+ 'ano':2014,
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+
+ 'Março':{
+ 'ano':2014,
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+ 'Abril':{
+ 'ano':2014,
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+ 'Maio':{
+ 'ano':2014,
+ 'Faturamento':400,
+ 'Volume vendas':5000,
+ 'Produto habilitado':5000
+ },
+};
+*/
+
+var anual = {
+ 'volume':{
+ '2013':245,
+ '2014':534,
+ '2015':341,
+ },
+ 'produtos':{
+ '2013':65,
+ '2014':105,
+ '2015':87,
+ }
+};
+//IDEIA DE COMO SERIA UM 'PUSH' para esses dados...
+anual['faturamento'] = {
+ '2013':400,
+ '2014':500,
+ '2015':50,
+};
+
+
+
+// Apenas mostrando todo o objeto
+for (var i in anual){
+ // console.log(i);
+}
+
+
+var data_anual = [
+ [
+ 'Anual',
+ 'Faturamento',
+ 'Volume de Vendas',
+ 'Produtos'
+ ],
+ [
+ '2013',
+ anual.faturamento['2013'],
+ anual.volume['2013'],
+ anual.produtos['2013']
+ ],
+ [
+ '2014',
+ anual.faturamento['2014'],
+ anual.volume['2014'],
+ anual.produtos['2014']
+ ],
+ [
+ '2015',
+ anual.faturamento['2015'],
+ anual.volume['2015'],
+ anual.produtos['2015']
+ ]
+];
+
+var data_faturamento = [
+ [
+ 'Anual',
+ 'Faturamento'
+ ],
+ [
+ '2013',
+ anual.faturamento['2013']
+ ],
+ [
+ '2014',
+ anual.faturamento['2014']
+ ],
+ [
+ '2015',
+ anual.faturamento['2015']
+ ]
+];
+
+
+console.log(window.navigator.plugins);
+
+// O CODE REALMENTE DE RENDER
+
+ google.load("visualization", "1.1", {
+ packages:["bar"]
+ });
+
+ var onResize;
+ window.onresize = function(){
+ clearTimeout(onResize);
+ onResize = setTimeout(function(){
+ drawChart(data_anual,'columnchart_material');
+ drawChart(data_faturamento,'columnchart_materialB');
+ drawChart(data_anual,'columnchart_materialC');
+ drawChart(data_anual,'columnchart_materialD');
+ drawChart(data_anual,'columnchart_materialE');
+ }, 100);
+ };
+
+
+ function drawChart(dados,target) {
+ var data = google.visualization.arrayToDataTable(dados);
+ var options = {
+ chart: {
+ title: 'Gráficos',
+ subtitle: 'Faturamento, Volume de vendas, e Produtos',
+ }
+ };
+ var chart = new google.charts.Bar(document.getElementById(target));
+
+ chart.draw(data, options);
+ }
\ No newline at end of file
diff --git a/google_charts/style.css b/google_charts/style.css
new file mode 100644
index 0000000..e64e7d4
--- /dev/null
+++ b/google_charts/style.css
@@ -0,0 +1,26 @@
+*{
+ box-sizing: border-box;
+ margin: 0px;
+ padding: 0px;
+}
+body{
+ background: #eee;
+}
+.half{
+ width: 48%;
+ position:relative;
+ float:left;
+ top:0px;
+ left:0px;
+ padding: 20px;
+ background: #fff;
+ overflow: hidden;
+ margin: 1% ;
+
+}
+
+@media (max-width:700px){
+ .half{
+ width: 98%;
+ }
+}
\ No newline at end of file
diff --git a/incluir.js b/incluir.js
new file mode 100644
index 0000000..236f1cb
--- /dev/null
+++ b/incluir.js
@@ -0,0 +1,32 @@
+/**
+ * Manipulando a DOM ()
+ *
+ * @param {String} $arquivo [Nome do Arquivo que deseja incluir]
+ * @return {Bollean} false
+ */
+
+function incluir($arquivo){
+ var divisao = $arquivo.split(".");
+ var ext = divisao[divisao.length-1];
+ var head = document.getElementsByTagName("head").item(0);
+ switch(ext) {
+ case "js":
+ var elemento = document.createElement("script");
+ elemento.src = $arquivo;
+ head.appendChild(elemento);
+ break;
+ case "css":
+ var elemento = document.createElement("link");
+ elemento.href = $arquivo;
+ elemento.rel = "stylesheet";
+ head.appendChild(elemento);
+ break;
+ default:
+ alert("extensão errada");
+ break
+ };
+ return false;
+}
+
+incluir("myjavascript.js");
+incluir("mystyle.css");
diff --git a/jsperf/myhtml.html b/jsperf/myhtml.html
new file mode 100644
index 0000000..97b5d1f
--- /dev/null
+++ b/jsperf/myhtml.html
@@ -0,0 +1,22 @@
+
+
+
+ Base
+
+
+
+
+
+
+
+
+
+
+
+
+