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
""" Open a connection with provider in external DLL on IronPython""" | |
import clr | |
import sys | |
pathParaDll = r"D:\workspace\2010\projetoXPTO\packages\Sybase11" | |
sys.path.append(pathParaDll) | |
clr.AddReferenceToFile("iAnywhere.Data.SQLAnywhere.dll") | |
from iAnywhere.Data.SQLAnywhere import * | |
con = SAConnection(r"uid=USUARIO;pwd=SENHA;ServerName=SERVIDOR;links=tcpip(host=127.0.0.1); min pool size=2; max pool size=9") | |
con.Open() | |
comm.CommandText = "select * from dummy" |
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
/* | |
* Original Sample: http://craftycodeblog.com/2010/05/15/asp-net-mvc-render-partial-view-to-string/ | |
*/ | |
public class HomeController : Controller | |
{ | |
public ActionResult Index() | |
{ | |
string MyModelData = ""; |
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
# | |
# CoffeeScript for http://dealloc.me/demos/crime/2011.html | |
# Copyright (c) 2011 Justin Palmer <http://github.com/Caged> | |
# LICENSE: http://www.opensource.org/licenses/mit-license.php | |
$ -> | |
hash = document.location.hash | |
year = if hash then hash.replace('#', '') else 2011 | |
[pt,pl,pb,pr] = [35, 20, 20, 20] | |
w = (900 - (pl + pr)) / 2 | |
h = w |
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
---------- Forwarded message ---------- | |
From: Mark S. Miller <[email protected]> | |
Date: Tue, Nov 16, 2010 at 3:44 PM | |
Subject: "Future of Javascript" doc from our internal "JavaScript Summit" | |
last week | |
To: [email protected] | |
On November 10th and 11th, a number of Google teams representing a variety | |
of viewpoints on client-side languages met to agree on a common vision for | |
the future of Javascript. |
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
/* | |
Essa consulta retorna o mais próximo Point que compõe a mais próxima MULTILINESTRING de uma tabela (no caso aqui, "eixos") | |
de um POINT qualquer (representado aqui por ST_GeomFromText('POINT(lon lat)',4326) | |
Substitua o SRID 4326 caso sua base não esteja em wgs_84 | |
Obs: até o PostGIS 1.5 as funções ST_LINE_LOCATE_POINT e ST_LINE_INTERPOLATE_POINT não suportam MULTILINESTRING | |
por isso usei a função GeometryN para pegar a primeira LINESTRING do campo geométrico. Se o seu campo geométrico | |
for LINESTRING você pode eliminar essa função |
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
/* | |
Essa função retorna o cruzamento mais próximo de um determinado ponto (aqui POINT (lon lat ) ) | |
Eu apliquei um buffer de 50 metros a partir do ponto para agilizar a query | |
Perceba que usei ST_Transform para poder utilizar um sistema de coordenadas em metros já que o meu | |
campo está em wgs_84 (graus). Se o seu campo estiver em UTM , esse passo é desnecessário | |
*/ | |
select e1.nome As nome_eixo1, e2.nome As nome_eixo2, ST_Intersection( e1.the_geom,e2.the_geom) as interseccao_geom, | |
ST_Distance(ST_transform(ST_Intersection( e1.the_geom,e2.the_geom),29101), | |
ST_Transform(ST_GeomfromText('POINT(lon lat)',4326),29101)) as distancia_interseccao |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Wax Interactivity</title> | |
</head> | |
<body> | |
<style> | |
#map { | |
width: 100%; |
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
<div id="wax-legend-census"> | |
<a href="http://www.npr.org"><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAABICAYAAABMb8iNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAABEWSURBVHic7Z15mFTVlcB/txtosGnRccEgKCCbsqhpRtAoYiaKTtoYdcBMoubDITioE3WCM9Fx1Ig6CaMBiUTFBUREJkxI7OAygwuYBAYRkSjKIgqIEBoXGrqhF7ru/HFuUbdevep+1RZ5BZz7fe+r3zt13nmnblWd767nAfSx1mKtRVlZWbmgOXYHlJWVlSNy7A4oKysrR+XYHVBWVlaOzLE7oKysrByRY3dAWVlZOSrH7oCysrJyZI7dAWVlZeWIHLsDysrKylE5dgeUlZWVI3PsDigrKytH5NgdUFZWVo7KsTugrKysHJljd0BZWVk5IueifA0w2R2PAsXAaOAlYC7w92HXAhXATGAB8DDwY6DYvffXns2ngJ5OPhR4xB0Pezav9PQnefIRwHigEpgD/BA4ulAqWVlZOT8cWRm4E7Du2AX81jtPHrd5+u2BZ0N0LPAaMMTpbvLkN7lrrwnod3fyZzzZk4ABns9yjz3ANwqhkpWVlfPEUZVJD1jZjhrgZKd/X+C9LYHzmU7PD0KvOtlvArr3OPmfPdklSIsreZ4AXgdq3flGJGjGX8nKysp54VyUp5AeRF4AfgB8FJCfhHTH9nqyW52NYZ6sCfgbpDuXlFUDHYHdAZsvAwO9893AqcC1nmwj0pUcBHwLOK9QKllZWTk/HFmZ9BZWE3Cck48mPbicBlztnTcAtyFjV/cDn3rvXQq0I9UqssDUgL2kjV945684v4aG6K4BbgBOK5RKVlZWzhNHVSY9YO3w5OeSHjAuAa4iM5CEHf+M |
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
import requests, os, glob, json | |
you = 'tmcw' | |
data = 'tweets' | |
try: os.mkdir(data) | |
except Exception: pass | |
def run(max_id = False): | |
already = glob.glob("%s/*.json" % data) |
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
DISCLAIMER: pessoalmente não serei atingido pela criação do conselho, | |
minha opinião não é em "defesa de meus interesses"" | |
1. "TI" se faz principalmente nos países do chamado "Primeiro Mundo": Inglaterra, EUA, Japão, | |
China(ok, esse não é bem 1o. Mundo), Coréia do Sul, Finlândia, etc. Nesses países não existe | |
"Regulamentação da Profissão" que impeça profissionais de outras áreas atuar na TI. | |
Vamos nos mirar nesse exemplo ou na Nigéria? (que tem a atividade regulamentada). | |
1.1 Aliás, de forma geral, regulamentação de profissão é mais uma das exclusividades do Brasil, | |
junto da Jabuticaba, da Duplicata e do novo padrão de tomadas |
OlderNewer