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
<Window x:Class="WpfApplication1.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase" | |
Title="MainWindow" Height="350" Width="525"> | |
<Grid> | |
<TextBlock Text="{Binding ThereIsNoDataContext, | |
diag:PresentationTraceSources.TraceLevel=High}"/> | |
</Grid> | |
</Window> |
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 () | |
{ | |
require(['WorkOrderStatusConfiguration'], function (workOrderStatusConfig) | |
{ | |
var data = $.parseJSON('@Html.Raw(Json.Encode(Model))'); | |
workOrderStatusConfig.Init({ | |
services: { | |
SaveWOConfigUrl: '@Url.Action("SaveWorkOrderConfiguration", "WorkOrderStatusConfiguration")', | |
}, | |
bindingContainerId: 'WorkOrderStatusContainer', |
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 * | |
from dbo.March2010 A | |
where A.Date >= Convert(datetime, '2010-04-01' ) |
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 XACT_ABORT ON | |
BEGIN TRY | |
BEGIN TRANSACTION | |
--work code here | |
COMMIT TRANSACTION | |
END TRY | |
BEGIN CATCH | |
ROLLBACK TRANSACTION | |
--cleanup code | |
END CATCH |
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
@echo off | |
rem | |
rem **************************************************************************** | |
rem | |
rem Copyright (c) Microsoft Corporation. All rights reserved. | |
rem This code is licensed under the Microsoft Public License. | |
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF | |
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY | |
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR | |
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. |
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
<style> | |
.calendar-off table.ui-datepicker-calendar { | |
display:none !important; | |
} | |
</style> | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function () { | |
$("#stockAgroForm").validate({}); | |
$(".numeric").autoNumeric('init', { aSep: '', aDec: window.app.settings.decimalSeparator, vMin: '0.00', vMax: '99999999999.99' }); // aSep=thousand separator, aDec=decimal separatator |
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
http://blogs.clariusconsulting.net/kzu/visual-studio-2012-developer-command-prompt-here/ |
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
Consider the following situation: | |
We have deployed a web application on a client machine and the client reports a bug. Then we try to replicate the problem in our local environment (where the code exists), but could not succeed. Now there are two ways to debug the client installation – either through log files or through visual studio debug mode. If our logging is not detailed, we will have nightmares in troubleshooting. The other option is installing visual studio in a server machine (which is not a great idea). | |
To solve this remote debug problem, we can use a tiny tool called Remote Debugging Monitor (MSVSMON.EXE). It lets you run, debug, and test an application that is running on one device (client machine) from another computer (local development environment) that is running Visual Studio. | |
Pre-Requisites: | |
The remote device and the Visual Studio computer must be connected over a network or connected directly through an Ethernet cable. Debugging over the internet is not supported. |
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 throttle( fn, time ) { | |
var t = 0; | |
return function() { | |
var args = arguments, ctx = this; | |
clearTimeout(t); | |
t = setTimeout( function() { | |
fn.apply( ctx, args ); | |
}, time ); | |
}; |
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
// Example adapted from MSDN showing how to use IEnumerable and IEnumerator | |
public class CollectionTestItem | |
{ | |
public CollectionTestItem(string Name, double Value) | |
{ | |
this.Name = Name; | |
this.Value = Value; | |
} |