This file contains hidden or 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
| $(document).on('click', '[data-prevent-doubleclick]', function() { | |
| var $this = $(this); | |
| // use setTimeout to let default action fire. | |
| // setting disabled without setTimeout prevents default action | |
| // firing | |
| setTimeout(function() { | |
| $this.prop('disabled', true); | |
| }); | |
| setTimeout(function() { | |
| $this.prop('disabled', false); |
This file contains hidden or 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
| <asp:PlaceHolder id="PlaceHolder2" runat="server" visible='<%# | |
| (Function() | |
| Return Item.ProjectStatus = Web.Core.Models.ProjectProposalStatus.FullApplicationSubmitted | |
| End Function)()%>'> | |
| <div>Yo dog it worked</div> | |
| </asp:PlaceHolder> |
This file contains hidden or 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
| 'Database datatype should be varbinary(MAX) | |
| FileUpload1.PostedFile.InputStream.ToByteArray() | |
| Public Module StreamExtensions | |
| <Extension> | |
| Public Function ToByteArray(stream As System.IO.Stream) As Byte() | |
| Using memoryStream = New MemoryStream() | |
| stream.CopyTo(memoryStream) | |
| Return memoryStream.ToArray() |
This file contains hidden or 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
| $('area').each(function () { | |
| var attri = $(this).attr('onmouseover').replace(/pop\(/g, ''); | |
| console.error(attri.split("','")[0].replace("'", "")); | |
| console.log(attri.split("','")[1]); | |
| }); |
This file contains hidden or 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
| "$(SolutionDir).nuget\nuget.exe" pack "$(ProjectPath)" -IncludeReferencedProjects -OutputDirectory "$(SolutionDir).nuget\packages" -Properties Configuration=Release |
This file contains hidden or 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 openall() { | |
| if [[ "$1" != *http* ]] | |
| then | |
| set -- "http://$1" | |
| fi | |
| 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe' "$@"; | |
| 'C:/Program Files/Internet Explorer/iexplore.exe' "$@"; | |
| 'C:/Program Files (x86)/Mozilla Firefox/firefox.exe' "$@"; | |
| 'C:/Program Files (x86)/Safari/Safari.exe' "$@"; | |
| } |
This file contains hidden or 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
| Dim db As New PetaPoco.Database("cs") | |
| Dim location = Microsoft.SqlServer.Types.SqlGeography.Point("47.65100", "-122.34900", 4326) | |
| Dim bridges = db.Fetch(Of Bridge)("select * from bridges where GpsPos.STDistance(@0) < (1609.34 * 100)") | |
| DECLARE @currentPosition AS GEOGRAPHY = GEOGRAPHY::STGeomFromText('POINT(-122.34900 47.65100)', 4326); | |
| SELECT * | |
| FROM bridges | |
| WHERE GpsPos.STDistance(@currentPosition) < (1609.34 * 100) |
This file contains hidden or 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
| Imports Microsoft.Lync.Model | |
| Imports System.Threading | |
| Public Class PresenceChecker | |
| Private _contact As Contact | |
| Dim waithandle As AutoResetEvent = New Threading.AutoResetEvent(False) | |
| Dim state As ContactAvailability | |
| Public Function GetUsersPresence(user As String) As ContactAvailability |
This file contains hidden or 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 formatTraceInformation(preferedPane) { | |
| var tracer = $('#__asptrace'); | |
| var traceContent = $('span.tracecontent'); | |
| //$('*', tracer).removeAttr('style'); | |
| //Removes style from trace block | |
| //$('*', tracer).remove('style'); | |
| if (tracer.length > 0 && $('#tracer_Show').length == 0) { | |
| $('span.tracecontent > table', tracer).each(function (index, element) { | |
| $(element).addClass('trace-table'); |
This file contains hidden or 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
| declare @TableName sysname; | |
| set @TableName = 'TABLENAME'; | |
| declare @Namespace varchar(50); | |
| set @Namespace = 'NAMESPACE'; | |
| declare @prop varchar(8000); | |
| DECLARE @NewLineChar AS CHAR(2) = CHAR(13) + CHAR(10) | |
| PRINT 'using System; ' | |
| PRINT 'using NPoco; ' | |
| PRINT '' | |
| PRINT 'namespace ' + @Namespace + ' {' |