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 _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-xxxxxxx-x']); | |
_gaq.push(['_trackPageview']); | |
_gaq.push(function(){window.location = "http://www.newlocation.com";}); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
})(); |
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
spStop: function(bool) { | |
$(this).each(function() { | |
var el_id = $(this).attr('id'); | |
//modificação para evitar erros de stop | |
if($._spritely.instances[el_id] && $._spritely.instances[el_id]['options']) | |
{ | |
if ($._spritely.instances[el_id]['options']['fps']) { | |
$._spritely.instances[el_id]['_last_fps'] = $._spritely.instances[el_id]['options']['fps']; | |
} | |
$._spritely.instances[el_id]['_stopped'] = true; |
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
SELECT object_name(id) AS name, | |
indid, | |
rowcnt AS rows, | |
reserved * 8 AS reserved_kb, | |
dpages * 8 AS data_kb, | |
(sum(used) * 8) - (dpages * 8) AS index_size_kb, | |
(sum(reserved) * 8) - (sum(used) * 8) AS unused_kb | |
FROM sysindexes | |
WHERE indid IN (0,1) -- cluster e não cluster | |
AND OBJECTPROPERTY(id, 'IsUserTable') = 1 |
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
--DBCC SQLPERF (LOGSPACE) | |
USE database_name; | |
GO | |
ALTER DATABASE database_name SET RECOVERY SIMPLE; | |
GO | |
DBCC SHRINKFILE (database_log, 1); | |
GO | |
ALTER DATABASE database_name SET RECOVERY FULL; | |
GO | |
USE [master] |
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
SELECT TOP 10 SUBSTRING(qt.TEXT, (qs.statement_start_offset/2)+1, | |
((CASE qs.statement_end_offset | |
WHEN -1 THEN DATALENGTH(qt.TEXT) | |
ELSE qs.statement_end_offset | |
END - qs.statement_start_offset)/2)+1), | |
qs.execution_count, | |
qs.total_logical_reads as total_leitura_memoria, qs.last_logical_reads as ultima_leitura_memoria, | |
qs.total_logical_writes as total_escrita_memoria, qs.last_logical_writes as ultima_escrita_memoria, | |
qs.total_physical_reads as total_leitura_disco, qs.last_physical_reads as ultima_leitura_disco, | |
qs.total_worker_time as tempo_CPU_total, qs.last_worker_time as ultimo_tempo_CPU, |
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
select c.nome as curso, g.nome, g.cidd, | |
g.tel, g.email, gat.localCNPJ, gat.localRazaoSoc, gat.localConv | |
from tbglobal g | |
inner join tbGlobATNTicket gat on g.id_glob = gat.id_glob | |
inner join tbglobcur gc on g.id_glob = gc.id_glob | |
inner join TBSEQCUR sc on gc.id_seqcur = sc.ID_SEQCUR | |
inner join TBCURSOS c on sc.id_cur = c.id_cur | |
where sc.id_fase = 108 and | |
g.datcad between '2014-07-01 00:00:00' and '2014-07-31 23:59:59' | |
order by c.nome, g.nome, g.cidd, |
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
function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) { | |
var R = 6371; // Raio da terra | |
var dLat = deg2rad(lat2-lat1); | |
var dLon = deg2rad(lon2-lon1); | |
var a = | |
Math.sin(dLat/2) * Math.sin(dLat/2) + | |
Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * | |
Math.sin(dLon/2) * Math.sin(dLon/2) | |
; | |
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/* | |
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv | |
* An IR detector/demodulator must be connected to the input RECV_PIN. | |
* Version 0.1 July, 2009 | |
* Copyright 2009 Ken Shirriff | |
* http://arcfn.com | |
*/ | |
#define IR_POWER 0xFFA25D | |
#define IR_MODE 0xFF629D | |
#define IR_MUTE 0xFFE21D |
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
#download all links in text file | |
for i in `cat /testcurl.txt` ; do curl -O $i ; done |
OlderNewer