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
/** | |
* CSS3 Animated Flames * | |
*/ | |
body {background-color:#000} | |
#logfire { | |
position:relative; | |
background:url(http://sitepointstatic.com/examples/css3/animation/logfire.jpg?r=2) center top no-repeat; | |
height:400px; |
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 tempdb | |
if exists(select null from sys.objects where name = 'a') drop table a | |
create table a (bt bit, ti tinyint, si smallint, i int, bi bigint, n numeric, de decimal, sm smallmoney, m money, f float, r real, dt datetime, sdt smalldatetime, da date, tm time, dto datetimeoffset, c char, vc varchar, te text, nc nchar, nvc nvarchar, nt ntext, im image, u uniqueidentifier, x xml, bn binary, vb varbinary) | |
insert a values(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, '1-1-1', '1:1:1', '1-1-1', '''', '''', '''', '''', '''', '''', '''', '11111111-1111-1111-1111-111111111111', '<x x="''"/>', 1, 1) | |
insert a values(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null) | |
exec insertgenerator @Table = 'a', @uppercase = 1 | |
exec insertgenerator @Table = 'dbo.a', @uppercase = 1 | |
drop table 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
private static bool IsFileLocked(IOException exception) | |
{ | |
int errorCode = Marshal.GetHRForException(exception) & ((1 << 16) - 1); | |
return errorCode == 32 || errorCode == 33; | |
} |
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
filter Get-LastChildItem { Join-Path $_ (gci $_ -Name | sort | select -Last 1) } | |
$Outs = 'C:\(ProductName)\Branch\99 - bin\Deliverables\Name\Log\Compile\Compile_result.xml', | |
"$('\\portal\DailyBuildResult\ProductName\Branch' | Get-LastChildItem | Get-LastChildItem)\CIName\Compile\compile.log" | % { | |
([xml](gc $_)).results.message | | |
where {$_.type -eq 'warning'} | | |
sort -CaseSensitive '#text' | | |
% {"<message>$($_.'#text')</message>"} | | |
Out-File ($Out = [IO.Path]::GetTempFileName()) | |
$Out | |
} |
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
using System; | |
using System.Data; | |
using System.IO; | |
namespace Company.Product | |
{ | |
internal class DataReaderStream : Stream | |
{ | |
private long _position = 0L; | |
private readonly IDataReader _reader; |
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
using System; | |
using System.Collections.Generic; | |
using System.Data.SqlClient; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace Company.Product | |
{ | |
using ModelTableAdapters; |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\General] | |
"SuppressUppercaseConversion "=dword:00000001 |
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 System | |
open System.Data | |
open System.Data.Common | |
let exec exec sql = | |
let factory = DbProviderFactories.GetFactory("System.Data.SqlClient") | |
use connection = factory.CreateConnection() | |
connection.ConnectionString <- "Data Source=.;Initial Catalog=tempdb;Integrated Security=SSPI" | |
connection.Open() | |
use command = factory.CreateCommand() |
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
$cn = new-object Data.SqlClient.SqlConnection 'Server=.;Database=CIA;Trusted_Connection=true' | |
$cn.open() | |
$q = @' | |
select count(*) from journaalposten.unv_conversierekeningschema | |
where grootboeksysteem='QIS' and maatschappij=@m and gb_rekening=@gbr and kostenplaats=@kp and kostendrager=@kd | |
'@ | |
$cm = new-object Data.SqlClient.SqlCommand -a $q, $cn | |
$p = $cm.parameters |
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
with a(n) as (select 0 union all select 1), | |
b(n) as (select 2*x.n+y.n from a x, a y), | |
c(n) as (select 4*x.n+y.n from b x, b y), | |
d(n) as (select 16*x.n+y.n from c x, c y), | |
e(n) as (select 256*x.n+y.n from d x, d y), | |
f(n) as (select 65536*x.n+y.n from e x, e y) | |
select top 100000000 n from f |
OlderNewer