This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var el = document.querySelector('.el'), | |
| btn = document.querySelector('.btn-edit'); | |
| el.addEventListener('input', function (e) { | |
| console.log(e.currentTarget.textContent); | |
| }); | |
| btn.addEventListener('click', function () { | |
| var isEditing = el.getAttribute('contenteditable'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Wraps a string around each character/letter | |
| * | |
| * @param {string} str The string to transform | |
| * @param {string} tmpl Template that gets interpolated | |
| * @returns {string} The given input as splitted by chars/letters | |
| */ | |
| function wrapChars(str, tmpl) { | |
| return str.replace(/\w/g, tmpl || "<span>$&</span>"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Array(numParcelas).join(1).split("").map(n => ...) | |
| Array.apply(null, Array(numParcelas)).map(n => ...) | |
| Array(...Array(numParcelas)).map(n => ...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getElementsByAttr(attribute, value, parent) { | |
| var matchingElements = [], | |
| allElements = (parent || document).getElementsByTagName("*"); | |
| for (var i = 0, n = allElements.length; i < n; i++) { | |
| if (allElements[i].getAttribute(attribute) === value) { | |
| // Element exists with attribute. Add to array. | |
| matchingElements.push(allElements[i]); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "estados": [ | |
| { | |
| "sigla": "AC", | |
| "nome": "Acre", | |
| "cidades": [ | |
| "Acrelândia", | |
| "Assis Brasil", | |
| "Brasiléia", | |
| "Bujari", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package jfrode.jsontosql.main; | |
| import java.io.BufferedReader; | |
| import java.io.FileReader; | |
| import org.json.JSONArray; | |
| import org.json.JSONObject; | |
| /** | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Download the following ZIPs: | |
| ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
| Download the correct GApps for your Android version: | |
| Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
| Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
| Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
| Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
| Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(" OPR/") >= 0 | |
| , isIE = /*@cc_on!@*/false || !!document.documentMode | |
| , isChrome = !!window.chrome && !!window.chrome.webstore; | |
| window.__BrowserDetection = { | |
| // Opera 8.0+ | |
| isOpera: isOpera, | |
| // Firefox 1.0+ | |
| isFirefox: typeof InstallTrigger !== "undefined", | |
| // At least Safari 3+: "[object HTMLElementConstructor]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.template = function (obj) { | |
| return this.replace( | |
| /{{(.+?)}}/g, | |
| function (_, key) { return obj[key] } | |
| ) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ifal; | |
| import robocode.*; | |
| import java.awt.Color; | |
| import static robocode.util.Utils.normalRelativeAngleDegrees; | |
| // API help : http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html | |
| /** | |
| * RedRibbon - Robô feito por Djalma e Nywton |
OlderNewer