// Convert the image in filename to a Tensor suitable as input to the Inception model. public static TFTensor CreateTensorFromImageFile(float[] contents, ShapeEnum resolution, TFDataType destinationDataType = TFDataType.Int32) { TFShape shape; if (resolution == ShapeEnum.TEN_TEN) { shape = new TFShape(1, 10, 10, 1); } else if (resolution == ShapeEnum.THIRTEEN_TEN) { shape = new TFShape(1, 13, 10, 1); } else if (resolution == ShapeEnum.EIGHT_EIGHT) { shape = new TFShape(1, 8, 8, 1); } else { shape = new TFShape(1, 10, 10, 1); } // DecodeJpeg uses a scalar String-valued tensor as input. var tensor = TFTensor.FromBuffer(shape, contents, 0, contents.Length); return(tensor); }
/// <summary> /// /// </summary> /// <returns></returns> private List <Cloth> searchByText() { string words = string.IsNullOrEmpty(txtSearchInput.Text) ? null : txtSearchInput.Text; ColorEnum colors = ColorEnum.NONE; foreach (ColorItem ci in colorItems) { if (ci.Selected) { colors |= ci.Value; } } ShapeEnum shapes = ShapeEnum.NONE; foreach (ShapeItem si in shapeItems) { if (si.Selected) { shapes |= si.Value; } } return(clothSearchService.SearchByText(words, colors, shapes)); }
/// <summary> /// Initializes a new instance of the <see cref="MarkdownViewProperties" /> class. /// </summary> /// <param name="type">type (required).</param> /// <param name="shape">shape (required).</param> /// <param name="note">note (required).</param> public MarkdownViewProperties(TypeEnum type = default(TypeEnum), ShapeEnum shape = default(ShapeEnum), string note = default(string)) : base() { // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for MarkdownViewProperties and cannot be null"); } else { this.Type = type; } // to ensure "shape" is required (not null) if (shape == null) { throw new InvalidDataException("shape is a required property for MarkdownViewProperties and cannot be null"); } else { this.Shape = shape; } // to ensure "note" is required (not null) if (note == null) { throw new InvalidDataException("note is a required property for MarkdownViewProperties and cannot be null"); } else { this.Note = note; } }
public Shape(ShapeEnum s, int maxTimeToCross, bool isStartPoint) { this.shapetype = s; this.maxTimeToCross = maxTimeToCross; this.isStartPoint = isStartPoint; timeHasBeenCrossed = 0; }
/// <summary> /// Initializes a new instance of the <see cref="CheckViewProperties" /> class. /// </summary> /// <param name="type">type (required).</param> /// <param name="shape">shape (required).</param> /// <param name="checkID">checkID (required).</param> /// <param name="check">check.</param> /// <param name="queries">queries (required).</param> /// <param name="colors">Colors define color encoding of data into a visualization (required).</param> public CheckViewProperties(TypeEnum type = default(TypeEnum), ShapeEnum shape = default(ShapeEnum), string checkID = default(string), Check check = default(Check), List <DashboardQuery> queries = default(List <DashboardQuery>), List <string> colors = default(List <string>)) : base() { this.Type = type; this.Shape = shape; // to ensure "checkID" is required (not null) if (checkID == null) { throw new InvalidDataException("checkID is a required property for CheckViewProperties and cannot be null"); } else { this.CheckID = checkID; } // to ensure "queries" is required (not null) if (queries == null) { throw new InvalidDataException("queries is a required property for CheckViewProperties and cannot be null"); } else { this.Queries = queries; } // to ensure "colors" is required (not null) if (colors == null) { throw new InvalidDataException("colors is a required property for CheckViewProperties and cannot be null"); } else { this.Colors = colors; } this.Check = check; }
public ShapeView(Context context, ShapeEnum shape, int width, int height, int color) : base(context) { ShapeWidth = width; ShapeHeight = height; Color = color; Shape = shape; }
public ShapeView(Context context, ShapeEnum shape, int width, int height, int color) : base(context) { ShapeWidth = width; ShapeHeight = height; Color = color; Shape = shape; }
private void assignFileds(String name, String pattern, String path, ColorEnum colors, ShapeEnum shapes) { this.name = name; this.pattern = pattern; this.path = path; this.colors = colors; this.shapes = shapes; this.updateTime = DateTime.UtcNow; }
public Figura(ColorEnum kolor, ShapeEnum typ, double pole, WspolrzedneSrodka wspolrzedne, string etykieta) { Kolor = kolor; Typ = typ; Pole = pole; WspolrzedneSrodka = wspolrzedne; Etykieta = etykieta; }
public Brick(ShapeEnum shape, ConsoleColor color, int[] boardScaling) { _boardScaling = boardScaling; Shape = shape; Pixels = new int[ShapeDefinitions[shape].GetLength(0)][]; for (int i = 0; i < Pixels.GetLength(0); i++) { Pixels[i] = new int[] { _boardScaling[0] * ShapeDefinitions[shape][i][0] + 1, _boardScaling[1] * ShapeDefinitions[shape][i][1] + 1 }; } Color = color; }
public ShapeDesignerSelectionControl( ShapeEnum shapeVal, IWindowsFormsEditorService editorService) { InitializeComponent(); this.shapeValue = shapeVal; this.editorService = editorService; //this.greenPanel.Click += new EventHandler(greenPanel_Click); //this.redPanel.Click += new EventHandler(redPanel_Click); //this.bluePanel.Click += new EventHandler(bluePanel_Click); }
public void dodajFigure(ColorEnum kolor, ShapeEnum typ, WspolrzedneSrodka wspolrzedne, string pole, string etykieta) { Figura nowa = new Figura(kolor, typ, double.Parse(pole), wspolrzedne, etykieta); listaFigur.Add(nowa); foreach (RefreshableForm f in widoki) { f.refreshInsert(nowa); } }
public override bool CanBeCrossed(ShapeEnum from) { // check if the prev shape is equal to this if (from != ShapeType) { return(false); } else { return(TimeHasBeenCrossed < MaxTimeToCross); } }
public void edytujFigure(Figura f, ColorEnum kolor, ShapeEnum typ, WspolrzedneSrodka wspolrzedne, string pole, string etykieta) { f.Kolor = kolor; f.Typ = typ; f.WspolrzedneSrodka = wspolrzedne; f.Pole = double.Parse(pole); f.Etykieta = etykieta; foreach (RefreshableForm rf in widoki) { rf.refreshModify(f); } }
public IShape GetShape(ShapeEnum shapeEnum) { switch (shapeEnum) { case ShapeEnum.Cube: return((IShape)_serviceProvider.GetService(typeof(Cube))); case ShapeEnum.Sphere: return((IShape)_serviceProvider.GetService(typeof(Sphere))); default: throw new ArgumentOutOfRangeException(nameof(shapeEnum), shapeEnum, $"Shape of {shapeEnum} is not supported."); } }
private void resultImg_MouseDown(object sender, MouseButtonEventArgs e) { Image image = (Image)sender; imgCurrentResult.Source = image.Source; //imgCurrentResult.Name = reImageNamePrefix + image.Name; selectedCloth = searchedClothes[int.Parse(image.Name.Substring(imageNamePrefix.Length))]; txtModifyPattern.Text = string.IsNullOrEmpty(selectedCloth.Pattern) ? "" : selectedCloth.Pattern; txtModifyName.Text = selectedCloth.ColorNum.ToString(); ColorEnum colors = selectedCloth.Colors; foreach (ColorItem ci in modifyColorItems) { if ((colors & ci.Value) != 0) { ci.Selected = true; } else { ci.Selected = false; } } updateModifyColorText(); ShapeEnum shapes = selectedCloth.Shapes; foreach (ShapeItem si in modifyShapeItems) { if ((shapes & si.Value) != 0) { si.Selected = true; } else { si.Selected = false; } } updateModifyShapeText(); //txtModifyName.IsEnabled = true; txtModifyPattern.IsEnabled = true; btnResultDelete.IsEnabled = true; btnResultModify.IsEnabled = true; }
public IShape Create(ShapeEnum shapeEnum) { switch (shapeEnum) { case ShapeEnum.Circle: return(new Circle()); case ShapeEnum.Rectangle: return(new Rectangle()); case ShapeEnum.Square: return(new Square()); default: throw new MissingMemberException(); } }
/// <summary> /// Find list of Cloth object by shapes. /// NOTES: There are two rules for clothes to be selected: /// <list type="number"> /// <item>It should contains all shapes in <code>shapes</code>.</item> /// <item>It should not contains any shapes in <code>notShapes</code>.</item> /// </list> /// </summary> /// <param name="shapes">The shapes contained by clothes.</param> /// <param name="notShapes">The shapes NOT contained by clothes.</param> /// <returns>Cloth objects list; empty list if none found.</returns> public List <Cloth> FindAllByShapes(ShapeEnum shapes, ShapeEnum notShapes) { Storage storage = DaoHelper.Instance.DbStorage; ClothRoot root = (ClothRoot)storage.Root; List <Cloth> clothes = new List <Cloth>(); BitIndex shapeIndex = root.ShapeIndex; if (shapeIndex.Count > 0) { foreach (Cloth cloth in shapeIndex.Select((int)shapes, (int)notShapes)) { clothes.Add(cloth); } } return(clothes); }
private void Character_OnShapeChange(int senderId, ShapeEnum shape, int param1, int param2) { foreach (var player in GetAllPlayers(true)) { Map.PacketFactory.SendShapeUpdate(player.GameSession.Client, senderId, shape, param1, param2); if (shape == ShapeEnum.OppositeCountryCharacter) { Map.PacketFactory.SendCharacterShape(player.GameSession.Client, senderId, Map.GameWorld.Players[param1]); } if (shape == ShapeEnum.None) { Map.PacketFactory.SendCharacterShape(player.GameSession.Client, senderId, Map.GameWorld.Players[senderId]); } } }
private void btnResultModify_Click(object sender, RoutedEventArgs e) { //Cloth cloth = searchedClothes[int.Parse(imgCurrentResult.Name.Substring(reImageNamePrefix.Length + imageNamePrefix.Length))]; Cloth newCloth = new Cloth(selectedCloth); int colorNum = 0; try { if (!string.IsNullOrEmpty(txtModifyName.Text.Trim())) { colorNum = int.Parse(txtModifyName.Text.Trim()); } } catch (Exception) { // do nothing } newCloth.ColorNum = colorNum; newCloth.Pattern = string.IsNullOrEmpty(txtModifyPattern.Text) ? null : txtModifyPattern.Text; ColorEnum colors = ColorEnum.NONE; foreach (ColorItem ci in modifyColorItems) { if (ci.Selected) { colors |= ci.Value; } } newCloth.Colors = colors; ShapeEnum shapes = ShapeEnum.NONE; foreach (ShapeItem si in modifyShapeItems) { if (si.Selected) { shapes |= si.Value; } } newCloth.Shapes = shapes; clothLibService.Update(selectedCloth, newCloth); }
public IShape GetShape(ShapeEnum whichShape) { IShape s = null; switch (shapeCode) { case PossibleShapes.SQUARE: s = new Square(color, thickness); break; case PossibleShapes.Triangle: s = new Triangle(thickness); break; case PossibleShapes.Circle: s = new Circle(color); break; } return(s); }
public Cloth(Cloth cloth) { this.name = cloth.Name; this.pattern = cloth.Pattern; this.path = cloth.Path; this.colors = cloth.Colors; this.shapes = cloth.Shapes; this.rGBSeparateColorVector = cloth.RGBSeparateColorVector; this.rGBColorVector = cloth.RGBColorVector; this.hSVColorVector = cloth.HSVColorVector; this.hSVAynsColorVector = cloth.HSVAynsColorVector; this.hLSColorVector = cloth.HLSColorVector; this.daubechiesWaveletVector = cloth.DaubechiesWaveletVector; this.gaborVector = cloth.GaborVector; this.cooccurrenceVector = cloth.CooccurrenceVector; this.updateTime = cloth.UpdateTime; this.colorNum = cloth.colorNum; }
private void button_Click(object sender, EventArgs e) { switch (shapeVal) { case ShapeEnum.Koło: Typ = ShapeEnum.Trójkąt; button.BackgroundImage = global::WindowsFormsApp.Properties.Resources.triangle; break; case ShapeEnum.Trójkąt: Typ = ShapeEnum.Kwadrat; button.BackgroundImage = global::WindowsFormsApp.Properties.Resources.sqare; break; case ShapeEnum.Kwadrat: Typ = ShapeEnum.Koło; button.BackgroundImage = global::WindowsFormsApp.Properties.Resources.circle; break; } }
public override void PaintValue(PaintValueEventArgs e) { ShapeEnum shape = (ShapeEnum)e.Value; Pen p = Pens.Ivory; { switch (shape) { case ShapeEnum.Koło: e.Graphics.DrawEllipse(p, e.Bounds); break; case ShapeEnum.Kwadrat: e.Graphics.DrawRectangle(p, e.Bounds); break; case ShapeEnum.Trójkąt: e.Graphics.DrawImage(global::WindowsFormsApp.Properties.Resources.triangle, e.Bounds); break; } p.Dispose(); } }
void UpdateConvexSweepHull() { var target = ConvexSweepTarget.Value; if (target != null) { var tr = Transform.Value; var from = tr.ToMatrix4(); var to = target.Transform.Value.ToMatrix4(); var shape = Shape.Value; var update = hullVertices == null || !hullFrom.Equals(from, .000001) || !hullTo.Equals(to, .000001) || hullShape != shape; if (update) { hullFrom = from; hullTo = to; hullShape = shape; if (shape == ShapeEnum.Box) { var boxLocalVertices = new Bounds(tr.Scale * -.5, tr.Scale * .5).ToPoints(); UpdateSweepHullGeometry(boxLocalVertices); } else if (shape == ShapeEnum.Sphere) { var radius = Math.Max(tr.Scale.X, Math.Max(tr.Scale.Y, tr.Scale.Z)) * 0.5; //!!!!12 SimpleMeshGenerator.GenerateSphere(radius, 12, 12, false, out Vector3[] sphereLocalVertices, out _); UpdateSweepHullGeometry(sphereLocalVertices); } } } else { hullVertices = null; hullIndices = null; hullPlanes = null; } }
public void SetUp() { target = new ClothDao(); cloth = new Cloth("n", "pattern", "p", ColorEnum.BLACK | ColorEnum.BLUE, ShapeEnum.CIRCLE | ShapeEnum.SQUARE); cloth2 = new Cloth("nn", "pp", "pp", ColorEnum.RED | ColorEnum.DARKRED, ShapeEnum.NONE); onlyList = new List <Cloth>(); onlyList.Add(cloth); noneCloth = new Cloth(); noneClothList = new List <Cloth>(); noneClothList.Add(noneCloth); emptyList = new List <Cloth>(); clothes = new List <Cloth>(); for (int i = 0; i < 100; ++i) { ColorEnum color = (ColorEnum)(2 << (i % 6) >> 1); ShapeEnum shape = (ShapeEnum)(2 << (i % 5) >> 1); Cloth c = new Cloth("n" + i, "p" + i, "p" + i, color, shape); clothes.Add(c); } }
/// <summary> /// Initializes a new instance of the <see cref="SingleStatViewProperties" /> class. /// </summary> /// <param name="type">type (required).</param> /// <param name="queries">queries (required).</param> /// <param name="colors">Colors define color encoding of data into a visualization (required).</param> /// <param name="shape">shape (required).</param> /// <param name="note">note (required).</param> /// <param name="showNoteWhenEmpty">if true, will display note when empty (required).</param> /// <param name="prefix">prefix (required).</param> /// <param name="suffix">suffix (required).</param> /// <param name="legend">legend (required).</param> /// <param name="decimalPlaces">decimalPlaces (required).</param> public SingleStatViewProperties(TypeEnum type = default(TypeEnum), List<DashboardQuery> queries = default(List<DashboardQuery>), List<DashboardColor> colors = default(List<DashboardColor>), ShapeEnum shape = default(ShapeEnum), string note = default(string), bool? showNoteWhenEmpty = default(bool?), string prefix = default(string), string suffix = default(string), Legend legend = default(Legend), DecimalPlaces decimalPlaces = default(DecimalPlaces)) : base() { // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for SingleStatViewProperties and cannot be null"); } else { this.Type = type; } // to ensure "queries" is required (not null) if (queries == null) { throw new InvalidDataException("queries is a required property for SingleStatViewProperties and cannot be null"); } else { this.Queries = queries; } // to ensure "colors" is required (not null) if (colors == null) { throw new InvalidDataException("colors is a required property for SingleStatViewProperties and cannot be null"); } else { this.Colors = colors; } // to ensure "shape" is required (not null) if (shape == null) { throw new InvalidDataException("shape is a required property for SingleStatViewProperties and cannot be null"); } else { this.Shape = shape; } // to ensure "note" is required (not null) if (note == null) { throw new InvalidDataException("note is a required property for SingleStatViewProperties and cannot be null"); } else { this.Note = note; } // to ensure "showNoteWhenEmpty" is required (not null) if (showNoteWhenEmpty == null) { throw new InvalidDataException("showNoteWhenEmpty is a required property for SingleStatViewProperties and cannot be null"); } else { this.ShowNoteWhenEmpty = showNoteWhenEmpty; } // to ensure "prefix" is required (not null) if (prefix == null) { throw new InvalidDataException("prefix is a required property for SingleStatViewProperties and cannot be null"); } else { this.Prefix = prefix; } // to ensure "suffix" is required (not null) if (suffix == null) { throw new InvalidDataException("suffix is a required property for SingleStatViewProperties and cannot be null"); } else { this.Suffix = suffix; } // to ensure "legend" is required (not null) if (legend == null) { throw new InvalidDataException("legend is a required property for SingleStatViewProperties and cannot be null"); } else { this.Legend = legend; } // to ensure "decimalPlaces" is required (not null) if (decimalPlaces == null) { throw new InvalidDataException("decimalPlaces is a required property for SingleStatViewProperties and cannot be null"); } else { this.DecimalPlaces = decimalPlaces; } }
/// <summary> /// Initializes a new instance of the <see cref="XYViewProperties" /> class. /// </summary> /// <param name="timeFormat">timeFormat.</param> /// <param name="type">type (required).</param> /// <param name="queries">queries (required).</param> /// <param name="colors">Colors define color encoding of data into a visualization (required).</param> /// <param name="shape">shape (required).</param> /// <param name="note">note (required).</param> /// <param name="showNoteWhenEmpty">If true, will display note when empty (required).</param> /// <param name="axes">axes (required).</param> /// <param name="legend">legend (required).</param> /// <param name="xColumn">xColumn.</param> /// <param name="yColumn">yColumn.</param> /// <param name="shadeBelow">shadeBelow.</param> /// <param name="position">position (required).</param> /// <param name="geom">geom (required).</param> public XYViewProperties(string timeFormat = default(string), TypeEnum type = default(TypeEnum), List <DashboardQuery> queries = default(List <DashboardQuery>), List <DashboardColor> colors = default(List <DashboardColor>), ShapeEnum shape = default(ShapeEnum), string note = default(string), bool?showNoteWhenEmpty = default(bool?), Axes axes = default(Axes), Legend legend = default(Legend), string xColumn = default(string), string yColumn = default(string), bool?shadeBelow = default(bool?), PositionEnum position = default(PositionEnum), XYGeom geom = default(XYGeom)) : base() { // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for XYViewProperties and cannot be null"); } else { this.Type = type; } // to ensure "queries" is required (not null) if (queries == null) { throw new InvalidDataException("queries is a required property for XYViewProperties and cannot be null"); } else { this.Queries = queries; } // to ensure "colors" is required (not null) if (colors == null) { throw new InvalidDataException("colors is a required property for XYViewProperties and cannot be null"); } else { this.Colors = colors; } // to ensure "shape" is required (not null) if (shape == null) { throw new InvalidDataException("shape is a required property for XYViewProperties and cannot be null"); } else { this.Shape = shape; } // to ensure "note" is required (not null) if (note == null) { throw new InvalidDataException("note is a required property for XYViewProperties and cannot be null"); } else { this.Note = note; } // to ensure "showNoteWhenEmpty" is required (not null) if (showNoteWhenEmpty == null) { throw new InvalidDataException("showNoteWhenEmpty is a required property for XYViewProperties and cannot be null"); } else { this.ShowNoteWhenEmpty = showNoteWhenEmpty; } // to ensure "axes" is required (not null) if (axes == null) { throw new InvalidDataException("axes is a required property for XYViewProperties and cannot be null"); } else { this.Axes = axes; } // to ensure "legend" is required (not null) if (legend == null) { throw new InvalidDataException("legend is a required property for XYViewProperties and cannot be null"); } else { this.Legend = legend; } // to ensure "position" is required (not null) if (position == null) { throw new InvalidDataException("position is a required property for XYViewProperties and cannot be null"); } else { this.Position = position; } // to ensure "geom" is required (not null) if (geom == null) { throw new InvalidDataException("geom is a required property for XYViewProperties and cannot be null"); } else { this.Geom = geom; } this.TimeFormat = timeFormat; this.XColumn = xColumn; this.YColumn = yColumn; this.ShadeBelow = shadeBelow; }
/// <summary> /// Initializes a new instance of the <see cref="HeatmapViewProperties" /> class. /// </summary> /// <param name="timeFormat">timeFormat.</param> /// <param name="type">type (required).</param> /// <param name="queries">queries (required).</param> /// <param name="colors">Colors define color encoding of data into a visualization (required).</param> /// <param name="shape">shape (required).</param> /// <param name="note">note (required).</param> /// <param name="showNoteWhenEmpty">If true, will display note when empty (required).</param> /// <param name="xColumn">xColumn (required).</param> /// <param name="yColumn">yColumn (required).</param> /// <param name="xDomain">xDomain (required).</param> /// <param name="yDomain">yDomain (required).</param> /// <param name="xAxisLabel">xAxisLabel (required).</param> /// <param name="yAxisLabel">yAxisLabel (required).</param> /// <param name="xPrefix">xPrefix (required).</param> /// <param name="xSuffix">xSuffix (required).</param> /// <param name="yPrefix">yPrefix (required).</param> /// <param name="ySuffix">ySuffix (required).</param> /// <param name="binSize">binSize (required).</param> public HeatmapViewProperties(string timeFormat = default(string), TypeEnum type = default(TypeEnum), List <DashboardQuery> queries = default(List <DashboardQuery>), List <string> colors = default(List <string>), ShapeEnum shape = default(ShapeEnum), string note = default(string), bool?showNoteWhenEmpty = default(bool?), string xColumn = default(string), string yColumn = default(string), List <decimal?> xDomain = default(List <decimal?>), List <decimal?> yDomain = default(List <decimal?>), string xAxisLabel = default(string), string yAxisLabel = default(string), string xPrefix = default(string), string xSuffix = default(string), string yPrefix = default(string), string ySuffix = default(string), decimal?binSize = default(decimal?)) : base() { // to ensure "type" is required (not null) if (type == null) { throw new InvalidDataException("type is a required property for HeatmapViewProperties and cannot be null"); } else { this.Type = type; } // to ensure "queries" is required (not null) if (queries == null) { throw new InvalidDataException("queries is a required property for HeatmapViewProperties and cannot be null"); } else { this.Queries = queries; } // to ensure "colors" is required (not null) if (colors == null) { throw new InvalidDataException("colors is a required property for HeatmapViewProperties and cannot be null"); } else { this.Colors = colors; } // to ensure "shape" is required (not null) if (shape == null) { throw new InvalidDataException("shape is a required property for HeatmapViewProperties and cannot be null"); } else { this.Shape = shape; } // to ensure "note" is required (not null) if (note == null) { throw new InvalidDataException("note is a required property for HeatmapViewProperties and cannot be null"); } else { this.Note = note; } // to ensure "showNoteWhenEmpty" is required (not null) if (showNoteWhenEmpty == null) { throw new InvalidDataException("showNoteWhenEmpty is a required property for HeatmapViewProperties and cannot be null"); } else { this.ShowNoteWhenEmpty = showNoteWhenEmpty; } // to ensure "xColumn" is required (not null) if (xColumn == null) { throw new InvalidDataException("xColumn is a required property for HeatmapViewProperties and cannot be null"); } else { this.XColumn = xColumn; } // to ensure "yColumn" is required (not null) if (yColumn == null) { throw new InvalidDataException("yColumn is a required property for HeatmapViewProperties and cannot be null"); } else { this.YColumn = yColumn; } // to ensure "xDomain" is required (not null) if (xDomain == null) { throw new InvalidDataException("xDomain is a required property for HeatmapViewProperties and cannot be null"); } else { this.XDomain = xDomain; } // to ensure "yDomain" is required (not null) if (yDomain == null) { throw new InvalidDataException("yDomain is a required property for HeatmapViewProperties and cannot be null"); } else { this.YDomain = yDomain; } // to ensure "xAxisLabel" is required (not null) if (xAxisLabel == null) { throw new InvalidDataException("xAxisLabel is a required property for HeatmapViewProperties and cannot be null"); } else { this.XAxisLabel = xAxisLabel; } // to ensure "yAxisLabel" is required (not null) if (yAxisLabel == null) { throw new InvalidDataException("yAxisLabel is a required property for HeatmapViewProperties and cannot be null"); } else { this.YAxisLabel = yAxisLabel; } // to ensure "xPrefix" is required (not null) if (xPrefix == null) { throw new InvalidDataException("xPrefix is a required property for HeatmapViewProperties and cannot be null"); } else { this.XPrefix = xPrefix; } // to ensure "xSuffix" is required (not null) if (xSuffix == null) { throw new InvalidDataException("xSuffix is a required property for HeatmapViewProperties and cannot be null"); } else { this.XSuffix = xSuffix; } // to ensure "yPrefix" is required (not null) if (yPrefix == null) { throw new InvalidDataException("yPrefix is a required property for HeatmapViewProperties and cannot be null"); } else { this.YPrefix = yPrefix; } // to ensure "ySuffix" is required (not null) if (ySuffix == null) { throw new InvalidDataException("ySuffix is a required property for HeatmapViewProperties and cannot be null"); } else { this.YSuffix = ySuffix; } // to ensure "binSize" is required (not null) if (binSize == null) { throw new InvalidDataException("binSize is a required property for HeatmapViewProperties and cannot be null"); } else { this.BinSize = binSize; } this.TimeFormat = timeFormat; }
public static TFTensor Create(float[] input, ShapeEnum resolution) { return(ImageUtil.CreateTensorFromImageFile(input, resolution)); }
//start create shape public void StartCreateShape(ShapeEnum shapeEnum, Point point) { operationShape = ShapeFactory.GetShape(shapeEnum); operationShape.SetPoints(point, point); startPoint = point; ChangeModel(); }
public TextParam(string words, ColorEnum colors, ShapeEnum shapes) { this.Words = words; this.Colors = colors; this.Shapes = shapes; }
public ShapeButton_OnChange(ShapeEnum value, bool pressed) { }
public void RunProg() { Console.WriteLine("Please select from the following to calculate"); var values = Enum.GetValues(typeof(ShapeEnum)); for (int i = 0; i < values.Length; i++) { Console.WriteLine((i + 1) + " - " + values.GetValue(i)); } int shapeSelection = Int16.Parse(Console.In.ReadLine()); switch (shapeSelection) { case 1: shapeEnum = ShapeEnum.Circle; getCalculation(); break; case 2: shapeEnum = ShapeEnum.Rectangle; getCalculation(); break; case 3: shapeEnum = ShapeEnum.Triangle; getCalculation(); break; } }