private void AddDerivate(NewImageAdded message, string thumbnailLocation) { var metadata = _documentRepository.Get(message.Id); metadata.Published = true; var newDerivate = new Derivate { Name = "Thumbnail", Url = thumbnailLocation }; metadata.Derivates.Add(newDerivate); _documentRepository.Update(metadata); }
private void UpdateMetadata(NewVideoAdded message, string streamingLocation) { var metadata = _documentRepository.Get(message.Id); metadata.Published = true; var newDerivate = new Derivate { Name = AdaptiveBitRateConfiguration, Url = streamingLocation }; metadata.Derivates.Add(newDerivate); _documentRepository.Update(metadata); }
/// <summary> /// Initializes a new instance of the <see cref="PolynomialWithDoubleDerivateChart"/> class. /// </summary> /// <param name="stringCoefficients">Coefficients for the main polynomial.</param> /// <param name="minX">Minimum value for the x-axis.</param> /// <param name="maxX">Maximum value for the x-axis.</param> /// <param name="minY">Minimum value for the y-axis.</param> /// <param name="maxY">Maximum value for the y-axis.</param> public PolynomialWithDoubleDerivateChart(string[] stringCoefficients, int minX, int maxX, int minY, int maxY) : base(stringCoefficients, minX, maxX, minY, maxY) { if (ValidateCoefficients(stringCoefficients)) { ParseCoefficients(stringCoefficients); DoubleDerivate = Derivate.Derivate() as Polynomial; var doubleDerivateSeries = new FunctionSeries(DoubleDerivate, ChartAreas["Chart"]) { BorderWidth = 2, Color = SeriesColorHierarchy[2] }; Series.Add(doubleDerivateSeries); } }
private void PuntiStazionariButton_Click(object sender, EventArgs e) { Single xv, yv; double zx; double zy; Punto zp; List <Derivate> derivate = new List <Derivate>(); Derivate derivata; try { PassoX = Convert.ToSingle(PassoXTextBox.Text); PassoY = Convert.ToSingle(PassoYTextBox.Text); } catch { PassoX = 0; PassoY = 0; } int r = 0; int c = 0; List <Punto> ListaPunti = new List <Punto>(); zValue = new List <Double>(); string zs; Double zxOld = 0.0; Double zyOld = 0.0; if ((PassoX > 0) && (PassoY > 0)) { for (xv = grafico.minX; xv < grafico.maxX; xv += PassoX) { c++; r = 0; for (yv = grafico.minY; yv < grafico.maxY; yv += PassoY) { r++; zs = FunzioneTextBox.Text; try { zy = derivataParziale(zs, true, xv, yv); if ((zy <= 0 && zyOld >= 0) || zy >= 0 && zyOld <= 0) { zx = derivataParziale(zs, true, xv, yv); derivata = new Derivate(); derivata.x0 = xv; derivata.y0 = yv; derivata.dx = zx; derivata.dy = zy; derivate.Add(derivata); } zyOld = zy; } catch { zx = 0; zy = 0; } } } } foreach (Derivate d in derivate) { if ((d.dx <= 0 && zxOld >= 0) || d.dx >= 0 && zxOld <= 0) { zp = new Punto(); zp.Colore = Color.Purple; zp.x = (float)d.x0; zp.y = (float)d.y0; zp.setHeight((int)(PassoX * grafico.settore(true)) + 1); zp.setWidth((int)(PassoY * grafico.settore(false)) + 1); ListaPunti.Add(zp); } zxOld = d.dx; } ListaPunti.InsertRange(0, grafico.punti); grafico.punti = ListaPunti.ToArray(); grafico.Repaint(); }