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
/** @jsx jsx */ | |
import { jsx } from 'theme-ui'; | |
import React, { useState } from 'react'; | |
import PropTypes from 'prop-types'; | |
const ToggleVisibility = ({ trigger, children, initiallyVisible }) => { | |
const [isVisible, setIsVisible] = useState(initiallyVisible); | |
return ( | |
<React.Fragment> | |
<span |
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
@for $i from 0 through 6 { | |
%row#{$i} { | |
top: $block-size * $i; | |
} | |
} | |
@each $year in 1997, 1994, 1993, 1991 { | |
#y#{$year} a { | |
@extend %row3; | |
} |
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 ruby | |
$KCODE = 'U' | |
def encode (text) | |
text.gsub(/[^\x00-\x7F]|["'<>&]/) do |ch| | |
sprintf("&#%d;", ch.unpack("U")[0]) | |
end | |
end | |
STDIN.read.scan(/(?x) |
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
//dynamically generated by ASP.NET for the language passed in. | |
var labels = { | |
objectOverlay: { | |
closeX: 'Close X', | |
fallback: 'Video for {vid}' | |
}, | |
global: { | |
label1: 'label1', | |
label2: 'label2' | |
} |
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
/** | |
* Add this script to the end of your document that use <input autofocus type="text" /> | |
* or <input type="text" placeholder="username" /> and it'll plug support for browser | |
* without these attributes | |
* Minified version at the bottom | |
*/ | |
(function () { | |
function each(list, fn) { | |
var l = list.length; |
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
// bookmarklet to introspect the source of current page | |
javascript:(function(d,h){h=d.documentElement.innerHTML;d.open();d.write('<pre>'+('<!DOCTYPE html><html>'+h+'</html>').replace(/[<>]/g,function(m){return{'<':'<','>':'>'}[m]})+'</pre>')})(document); |
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
' VB.Net 2.0 | |
' a class for videos is what I was using my original code for | |
Public Class Video | |
Private _id As Integer | |
Public Property Id() As Integer | |
Get | |
Return _id | |
End Get | |
Set(ByVal value As Integer) |
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
public delegate T MethodExecution<T>(IDataReader reader); | |
public static List<T> LoadList<T>(IDataReader reader, MethodExecution<T> method) | |
{ | |
return LoadList<T>(reader, true, method); | |
} | |
public static List<T> LoadList<T>(IDataReader reader, bool close_reader, MethodExecution<T> method) | |
{ | |
List<T> list = new List<T>(); | |
try | |
{ |
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
public static string ToIDList<T, U>(List<U> lookuplist) where U : ILookup<T> where T : struct | |
{ | |
List<U> lookupidlist = lookuplist.FindAll(delegate(U lookup) | |
{ | |
return lookup.ID.HasValue; | |
}); | |
string idlist = String.Empty; | |
if (lookupidlist != null) | |
{ | |
string[] ids = new string[lookupidlist.Count]; |
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
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
ALTER PROCEDURE [dbo].[Tombstones_SearchTombstones] | |
@industry_id smallint = null, | |
@region_id_list varchar(8000) = null, | |
@inbound_region_id_list varchar(8000) = null, | |
@outbound_region_id_list varchar(8000) = null | |
AS |
NewerOlder