[color] branch = auto diff = auto status = auto [color "branch"] current = yellow reverse local = yellow remote = green [color "diff"]
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).ready(function() { | |
swapValues = [] | |
$(".watermark").each(function(i) { | |
$(this).addClass("gray") | |
swapValues[i] = $(this).val() | |
$(this).focus(function() { | |
if($(this).val() == swapValues[i]) { | |
$(this).val("") | |
$(this).removeClass("gray") | |
} |
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
# | |
# IronRuby ruby-debug-like-debugger call for things that | |
# support System::Diagnostics::Debugger, like Visual Studio | |
# | |
def debugger | |
require 'mscorlib' | |
System::Diagnostics::Debugger.break if System::Diagnostics::Debugger.launch | |
end |
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
<UserSettings> | |
<ApplicationIdentity version="9.0"/> | |
<ToolsOptions> | |
<ToolsOptionsCategory name="Environment" RegisteredName="Environment"> | |
<ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"> | |
<PropertyValue name="ShowMiscFilesProject">false</PropertyValue> | |
<PropertyValue name="AutoloadExternalChanges">false</PropertyValue> | |
<PropertyValue name="CheckForConsistentLineEndings">false</PropertyValue> | |
<PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue> | |
<PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue> |
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
public class PythonEngine { | |
private ScriptEngine _engine; | |
private ScriptScope _scope; | |
public PythonEngine() { | |
var setup = DynamicApplication.CreateRuntimeSetup(); | |
setup.DebugMode = true; | |
var runtime = new ScriptRuntime(setup); | |
_engine = Python.GetEngine(runtime); | |
_scope = null; |
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
// Add the following methods to the calculator's | |
// Page.xaml.cs Page class | |
// Execute the script code in the Functions buffer, | |
// and add buttons to the UI to call the function | |
// if it doesn't exist. | |
public void Functions_TextChanged(object sender, TextChangedEventArgs e) { | |
FunctionDefinitions.Children.Clear(); | |
try { | |
object result = _engine.Execute(Functions.Text.ToString()); |
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
<!-- replace Page.xaml with this markup --> | |
<UserControl x:Class="CalculatorTestApp.Page" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:calculator="clr-namespace:CalculatorProject;assembly=Calculator" | |
Width="440" Height="320"> | |
<Border BorderBrush="Gray" BorderThickness="5" CornerRadius="8" Background="LightGray" Padding="3"> | |
<Grid x:Name="LayoutRoot"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition /> |
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
// After adding assembly references to IronPython* | |
// and Microsoft.Scripting.*, add the following | |
// using statements to the top of Page.xaml.cs | |
using Microsoft.Scripting.Hosting; | |
using Microsoft.Scripting.Silverlight; | |
using IronPython.Hosting; |
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
# eggs_config.rb | |
Eggs.config( | |
:tests => [ | |
:sample | |
] | |
) |
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
// Add the following to your App.xaml.cs's | |
// Application_Startup method. | |
var queryString = HtmlPage.Document.QueryString; | |
if (queryString.ContainsKey("test")) { | |
var xap = new Uri( | |
"eggs.xap", UriKind.Relative | |
); | |
WebClient wcXap = new WebClient(); | |
wcXap.OpenReadCompleted += | |
new OpenReadCompletedEventHandler( |
OlderNewer