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
using System.Linq; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace PropertyManagementSync.Tests | |
{ | |
[TestClass] | |
public class OwnedTypeTests | |
{ | |
[Owned] |
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
data Set a = Set (a->Bool) | |
contains (Set a) x = a x | |
singletonSet x = Set(\y-> x==y) | |
union a b = Set(\x -> contains a x || contains b x) | |
intersect a b = Set(\x -> contains a x && contains b x) | |
forall s p = |
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
input: '10001011000' | |
blank: ' ' | |
start state: step_1 | |
table: | |
step_1: | |
[1]: {R: step_2} | |
[0]: {R} | |
' ': {R: failure} | |
step_2: |
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
input: '2222+1' | |
blank: ' ' | |
start state: right | |
table: | |
right: | |
[0,1,2,+,A,B,C]: R | |
' ' : {L: seek_right_digit} | |
seek_right_digit: | |
0: {write: X, L: seek_separator_to_left} |
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 static class ReturnTypeToStringConverter | |
{ | |
public static string Convert(ReturnType returnType) | |
{ | |
switch (returnType) | |
{ | |
case BoolReturnType boolReturnType: | |
return JasminReferenceConstants.JavaBool; | |
case CharReturnType charReturnType: | |
return JasminReferenceConstants.JavaChar; |
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 static class ReturnTypeToStringConverter | |
{ | |
public static string Convert(ReturnType returnType) | |
{ | |
switch (returnType) | |
{ | |
case BoolReturnType boolReturnType: | |
return JasminReferenceConstants.JavaBool; | |
case CharReturnType charReturnType: | |
return JasminReferenceConstants.JavaChar; |
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 static class ReturnTypeToStringConverter | |
{ | |
public static string Convert(ReturnType returnType) | |
{ | |
switch (returnType) | |
{ | |
case BoolReturnType boolReturnType: | |
return JasminReferenceConstants.JavaBool; | |
case CharReturnType charReturnType: | |
return JasminReferenceConstants.JavaChar; |
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
private void DrawGeometry(StreamGeometryContext context) | |
{ | |
Point startPoint = new Point(CenterX, CenterY); | |
Point innerArcStartPoint = | |
Utils.CartesianCoordinate(RotationAngle, InnerRadius); | |
innerArcStartPoint.Offset(CenterX, CenterY); | |
Point innerArcEndPoint = | |
Utils.CartesianCoordinate(RotationAngle + WedgeAngle, InnerRadius); |