This file contains 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
http://jsbin.com/ojija/3 | |
http://bit.ly/inverte | |
String.prototype.reverse=function(){return this.split("").reverse().join("");} | |
function reverse(s){ | |
return s.split("").reverse().join(""); | |
} | |
$(document).ready(function () { | |
$("#inverteTexto").click(function(){ | |
//var textoInvertido = reverse($("#texto").val()); |
This file contains 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
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software q vc | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo | |
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |
This file contains 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 gamejs = require('gamejs'); | |
exports.UserControls = function(size, sticker) { | |
this.size = size; | |
this.sticker = sticker; | |
this.left = false; | |
this.right = false; | |
this.paused = false; | |
this.initialClick = false; | |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<ui version="4.0"> | |
<class>MainWindow</class> | |
<widget class="QMainWindow" name="MainWindow"> | |
<property name="geometry"> | |
<rect> | |
<x>0</x> | |
<y>0</y> | |
<width>661</width> | |
<height>487</height> |
This file contains 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
#!/bin/bash | |
LINES=$(tput lines) | |
COLUMNS=$(tput cols) | |
declare -A snowflakes | |
declare -A lastflakes | |
clear |
This file contains 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
$(document).ready(function(){ | |
persistence.store.websql.config(persistence, 'persistencetest', 'My db', 5 * 1024 * 1024); | |
var Project = persistence.define('Project', { | |
name: "TEXT" | |
}); | |
var Task = persistence.define('Task', { | |
name: "TEXT", | |
done: "BOOL" |
This file contains 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
json = {/*json object with lots of properties*/}; | |
var strings = []; | |
for (var jsonProp in json) { | |
if (json.hasOwnProperty(jsonProp)) { | |
jsonObj = json[jsonProp]; | |
for (var i=0; i<jsonObj.length; i++) { | |
if(typeof(jsonObj[i]) === 'string'){ | |
strings.push(jsonObj[i]); | |
} |
This file contains 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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
This file contains 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
# html template | |
{% form_from_page slug %} | |
# template tag | |
from mezzanine import template | |
from mezzanine.forms.forms import FormForForm | |
from mezzanine.pages.models import Page | |
register = template.Library() | |
This file contains 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
do $$ | |
declare | |
seq_name text; | |
tbl information_schema.tables%rowtype; | |
tables CURSOR FOR SELECT tablename FROM pg_tables WHERE schemaname = 'public' ORDER BY tablename; | |
begin | |
FOR table_record IN tables LOOP | |
seq_name = table_record.tablename || '_id_seq'; | |
-- tests if a sequence with this name already exists | |
IF EXISTS (SELECT 0 FROM pg_class where relname = seq_name) |
OlderNewer