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> | |
<head> | |
<!-- Title, meta, jquery 1.4+ etc... --> | |
<script> | |
var browser = $.browser; | |
if(browser == "webkit"){ | |
$("head").append('<link rel="stylesheet" href="safari_or_chrome.css" type="text/css" >'); | |
}else if(browser == "msie"){ | |
$("head").append('<link rel="stylesheet" href="internet_explorer.css" type="text/css" >'); | |
}else if(browser == "mozilla"){ |
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
/** | |
* Supondo que a imagem de fundo do botão tenha os 3 estados, cada um com 30px de altura e 150px de largura, | |
* totalizando uma imagem de 150x90px. | |
*/ | |
/* Estado inicial */ | |
div#meuBotao { | |
width: 150px; | |
height: 30px; | |
cursor: pointer; |
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
/** | |
* getLetra - Função que retorna as letras em sequência | |
* @author Luiz Fernando da Silva <[email protected]> | |
* | |
* Este trabalho está licenciado sob uma Licença Creative Commons Atribuição-CompartilhaIgual 3.0 Não Adaptada. | |
* Para ver uma cópia desta licença, visite http://creativecommons.org/licenses/by-sa/3.0/. | |
* | |
*/ | |
var getLetra = function(i) { | |
// Define a lista de letras (A-Z) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define AREA_TIJOLO 0.08; | |
#define TIJOLO 0.7; | |
#define MAO_DE_OBRA 12.5; | |
int main(void) { | |
float tamanho_parede, qtd_tijolos, custo_tijolos, custo_mao_de_obra, total; | |
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
""" | |
Exemplo de conexão do Python com um banco de dados MS Access via ODBC | |
Necessário ter: | |
- Python 2.7 - http://www.python.org/download/ | |
- pyodbc 3 - https://code.google.com/p/pyodbc | |
Sugestão de editor: JetBrains PyCharm Community Edition (http://www.jetbrains.com/pycharm/) | |
""" |
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
# -*- coding:utf-8 -*- | |
__author__ = 'Luiz Fernando da Silva <[email protected]>' | |
""" | |
Para consultar depois: | |
- Pynq: Expression Trees para Python, parecido com o Linq da Microsoft | |
""" | |
import pyodbc |
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
#!/usr/bin/env python | |
def women_day(): | |
print(" ." + (":" * 3) + "." + (" " * 3) + "." + (":" * 3) + ".") | |
print((":" * 7) + "." + (":" * 7)) | |
print(":" * 15) | |
print("'" + (":" * 13) + "'") | |
print((" " * 2) + "'" + (":" * 9) + "'") | |
print((" " * 4) + "'" + (":" * 5) + "'") | |
print((" " * 6) + "':'") |
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
""" | |
This problem was asked by Google. | |
Given a stack of N elements, interleave the first half of the stack with the second half reversed using only one other queue. This should be done in-place. | |
Recall that you can only push or pop from a stack, and enqueue or dequeue from a queue. | |
For example, if the stack is [1, 2, 3, 4, 5], it should become [1, 5, 2, 4, 3]. If the stack is [1, 2, 3, 4], it should become [1, 4, 2, 3]. | |
Hint: Try working backwords from the end state. |
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
""" | |
This problem was asked by Uber. | |
Given an array of integers, return a new array such that each element at index i of the new array is the product of all the numbers in the original array except the one at i. Solve it without using division and in O(n) time. | |
For example, if our input was [1, 2, 3, 4, 5], the expected output would be [120, 60, 40, 30, 24]. If our input was [3, 2, 1], the expected output would be [2, 3, 6]. | |
https://dailycodingproblem.com/ | |
""" |
OlderNewer