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
// Declaration in .ino | |
PinDef in_pins[__INPUTS_COUNT]; | |
PinDef out_pins[__OUTPUTS_COUNT]; | |
Bounce2::Button db_inputs[__INPUTS_COUNT]; | |
// call: | |
press->configureInputs( | |
db_inputs[LIMIT_STROKE_UP], | |
db_inputs[LIMIT_STROKE_DOWN]); |
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
<TreeView x:Name="questionTree" FontSize="18" | |
HorizontalAlignment="Left" Width="280" Margin="10,48,0,35" ItemsSource="{Binding RootGroups}" SelectedItemChanged="questionTree_SelectedItemChanged" > | |
<TreeView.Resources> | |
<HierarchicalDataTemplate DataType="{x:Type qa:QAQuestionGroup}" ItemsSource="{Binding SubGroups}"> | |
<TextBlock Text="{Binding}" /> | |
<HierarchicalDataTemplate.ItemTemplate> | |
<HierarchicalDataTemplate DataType="{x:Type qa:QAQuestion}" ItemsSource="{Binding Questions}"> | |
<HierarchicalDataTemplate.ItemTemplate> |
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/local/bin/python3.4 | |
# ZFS backup to NAS script | |
import sys | |
import os | |
import socket | |
import subprocess | |
# bring in custom/shared stuff | |
import hatools |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
try | |
{ | |
var di = new DirectoryInfo(Environment.CurrentDirectory); | |
Console.WriteLine("Current directory is {0}", di.FullName); |
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 void Start() | |
{ | |
while (true) | |
{ | |
var now = DateTime.Now; | |
var actions = this.Policies.Select(p => p.GetNextAction(now)).OrderBy(k => k.Creation); | |
var next = actions.FirstOrDefault(); | |
var toRun = actions.Where(e => e.Creation == next.Creation).ToArray(); |
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
WPF: | |
<DataGrid x:Name="objectList" Height="auto" VerticalAlignment="Stretch" MinWidth="300" Width="auto" ItemsSource="{Binding Objects}" AutoGenerateColumns="False" Margin="10,39,10,10" CanUserAddRows="False" CanUserReorderColumns="False" CanUserDeleteRows="False" RowHeight="24"> | |
<DataGrid.Columns> | |
<DataGridTextColumn Header="Id" Binding="{Binding ObjectId}" Width="60" IsReadOnly="True" /> | |
<DataGridTextColumn Header="Name" Binding="{Binding ObjectName}" Width="200" IsReadOnly="False" /> | |
<DataGridTextColumn Header="Key Column" Binding="{Binding PrimaryKeyColumn}" Width="160" IsReadOnly="False" /> | |
<DataGridComboBoxColumn Header="ObjectKind" SelectedItemBinding="{Binding ObjectKind, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Source={StaticResource ObjectKindValues}}" Width="96"/> | |
</DataGrid.Columns> | |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.IO; | |
using Microsoft.Win32; | |
using System.Runtime.InteropServices; | |
using System.Reflection; | |
using System.Diagnostics.Contracts; |
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
[DbFunction("dbo", "linking_LinkProcessingContextDetail")] | |
public virtual IQueryable<LinkProcessingContext> GetLinkProcessingContextDetail(LinkEnvironment environmentId, int applicationId) | |
{ | |
var environmentIdParameter = new System.Data.Entity.Core.Objects.ObjectParameter("EnvironmentId", environmentId); | |
var applicationIdParameter = new System.Data.Entity.Core.Objects.ObjectParameter("ApplicationId", applicationId); | |
return ((IObjectContextAdapter)this).ObjectContext | |
.CreateQuery<LinkProcessingContext>( | |
"[dbo].[linking_LinkProcessingContextDetail](@EnvironmentId, @ApplicationId)", | |
environmentIdParameter, |
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
[Table("linking_ObjectMapping", Schema = "dbo")] | |
public class ObjectMapping | |
{ | |
[Key, Column(Order = 0)] | |
public int ObjectId { get; set; } | |
[Key, Column(Order = 1)] | |
public LinkEnvironment EnvironmentId { get; set; } | |
[Key, Column(Order = 2)] | |
public int ApplicationId { get; set; } |
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
/// <summary> | |
/// Provides static properties that return context or request-specific values. | |
/// </summary> | |
public static class Current | |
{ | |
/// <summary> | |
/// Gets the <see cref="IbisDB"/> instance used for the lifetime of the current web request. | |
/// </summary> | |
public static IbisDB Context | |
{ |
NewerOlder