public async Task <IActionResult> PutZeta([FromRoute] int id, [FromBody] Zeta zeta) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != zeta.ID) { return(BadRequest()); } _context.Entry(zeta).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ZetaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public static void zeta_m1_test() //****************************************************************************80 // // Purpose: // // ZETA_M1_TEST tests ZETA_M1. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 16 January 2017 // // Author: // // John Burkardt // { double p = 0; double z1 = 0; const double tol = 1.0E-10; Console.WriteLine(""); Console.WriteLine("ZETA_M1_TEST"); Console.WriteLine(" ZETA_M1 computes the Zeta Minus One function."); Console.WriteLine(" Requested relative accuracy= " + tol + ""); Console.WriteLine(""); Console.WriteLine(" P Zeta_M1(P) Zeta_M1(P)"); Console.WriteLine(" tabulated computed."); Console.WriteLine(""); int n_data = 0; for (;;) { Burkardt.Values.Zeta.zeta_m1_values(ref n_data, ref p, ref z1); if (n_data == 0) { break; } double z2 = Zeta.zeta_m1(p, tol); Console.WriteLine(" " + p.ToString(CultureInfo.InvariantCulture).PadLeft(8) + " " + z1.ToString(CultureInfo.InvariantCulture).PadLeft(20) + " " + z2.ToString(CultureInfo.InvariantCulture).PadLeft(20) + ""); } }
public static void zeta_naive_test() //****************************************************************************80 // // Purpose: // // ZETA_NAIVE_TEST tests ZETA_NAIVE. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 04 March 2018 // // Author: // // John Burkardt // { int n = 0; double z1 = 0; Console.WriteLine(""); Console.WriteLine("ZETA_NAIVE_TEST"); Console.WriteLine(" ZETA_NAIVE computes the Zeta function."); Console.WriteLine(""); Console.WriteLine(" N exact Zeta computed Zeta"); Console.WriteLine(""); int n_data = 0; for (;;) { Burkardt.Values.Zeta.zeta_values(ref n_data, ref n, ref z1); if (n_data == 0) { break; } double n_real = n; double z2 = Zeta.zeta_naive(n_real); Console.WriteLine(" " + n.ToString(CultureInfo.InvariantCulture).PadLeft(6) + " " + z1.ToString(CultureInfo.InvariantCulture).PadLeft(20) + " " + z2.ToString(CultureInfo.InvariantCulture).PadLeft(20) + ""); } }
public void PrintComposite(Zeta.TreeSharp.Composite composite) { if (composite == null) { Logging.Write("<NULL>"); } else if (composite is Zeta.TreeSharp.PrioritySelector) { var temp = (Zeta.TreeSharp.PrioritySelector)composite; Logging.Write("PrioritySelector =>"); foreach (var subComposite in temp.Children) { PrintComposite(subComposite); } Logging.Write("<= PrioritySelector"); } else if (composite is Zeta.TreeSharp.Decorator) { var temp = (Zeta.TreeSharp.Decorator)composite; Logging.Write("Decorator =>"); foreach (var subComposite in temp.Children) { PrintComposite(subComposite); } Logging.Write("<= Decorator"); } else if (composite is Zeta.TreeSharp.Sequence) { var temp = (Zeta.TreeSharp.Sequence)composite; Logging.Write("Sequence =>"); if (temp.Children != null) { foreach (var subComposite in temp.Children) { PrintComposite(subComposite); } } Logging.Write("<= Sequence"); } else if (composite is Zeta.TreeSharp.Action) { var temp = (Zeta.TreeSharp.Action)composite; Logging.Write("Action: " + temp.Runner.ToString()); } else { Logging.Write(composite.ToString()); } }
public static void zeta_values_test( ) //****************************************************************************80 // // Purpose: // // ZETA_VALUES_TEST tests ZETA_VALUES. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 12 June 2007 // // Author: // // John Burkardt // { int n = 0; double zeta = 0; Console.WriteLine(""); Console.WriteLine("ZETA_VALUES_TEST:"); Console.WriteLine(" ZETA_VALUES returns values of "); Console.WriteLine(" the Riemann Zeta function."); Console.WriteLine(""); Console.WriteLine(" N ZETA(N)"); Console.WriteLine(""); int n_data = 0; for ( ; ;) { Zeta.zeta_values(ref n_data, ref n, ref zeta); if (n_data == 0) { break; } Console.WriteLine(n.ToString(CultureInfo.InvariantCulture).PadLeft(6) + " " + zeta.ToString("0.################").PadLeft(24) + ""); } }
public async Task <IActionResult> PostZeta([FromBody] Zeta zeta) { //crea nueva zeta - pasa todas las ventas asociadas a ella la tabla hist_fn y vacia la tabla hist_plu if (!ModelState.IsValid) { return(BadRequest(ModelState)); } zeta.Fecha = DateTime.Now; zeta.NroZeta = _context.Zeta.Max(p => p.NroZeta) + 1; _context.Zeta.Add(zeta); await _context.SaveChangesAsync(); var ventasDia = _context.Hist_plu; foreach (Hist_plu venta in ventasDia) { _context.Hist_fn.Add(new Hist_fn { NroPOS = venta.NroPos, NroZeta = zeta.NroZeta, Fecha = DateTime.Now, CodigoFn = 102, CodigoSubFn = _context.plu.FirstOrDefault(p => p.CodigoPLU == venta.CodigoPLU).CodigoSeccion, Monto = venta.Monto, PorcIVA = 19, Cantidad = venta.Cantidad, FechaUltAct = DateTime.Now.ToShortDateString(), MontoIVA = venta.Monto * 0.19, CodigoOperador = 9999, CodPLU = venta.CodigoPLU }); } _context.SaveChanges(); _context.Database.ExecuteSqlCommand("truncate table hist_plu"); return(CreatedAtAction("GetZeta", new { id = zeta.ID }, zeta)); }
internal static Dictionary<AvoidanceType, double> ReturnDictionaryUsingActorClass(Zeta.Internals.Actors.ActorClass AC) { switch (Bot.ActorClass) { case Zeta.Internals.Actors.ActorClass.Barbarian: return dictAvoidanceHealthBarb; case Zeta.Internals.Actors.ActorClass.DemonHunter: return dictAvoidanceHealthDemon; case Zeta.Internals.Actors.ActorClass.Monk: return dictAvoidanceHealthMonk; case Zeta.Internals.Actors.ActorClass.WitchDoctor: return dictAvoidanceHealthWitch; case Zeta.Internals.Actors.ActorClass.Wizard: return dictAvoidanceHealthWizard; } return null; }
private static UIElement SelectHeroType(Zeta.Internals.Actors.ActorClass type) { UIElement thisClassButton=null; switch (type) { case Zeta.Internals.Actors.ActorClass.Barbarian: thisClassButton=UIElement.FromHash(0x98976D3F43BBF74); break; case Zeta.Internals.Actors.ActorClass.DemonHunter: thisClassButton=UIElement.FromHash(0x98976D3F43BBF74); break; case Zeta.Internals.Actors.ActorClass.Monk: thisClassButton=UIElement.FromHash(0x7733072C07DABF11); break; case Zeta.Internals.Actors.ActorClass.WitchDoctor: thisClassButton=UIElement.FromHash(0x1A2DB1F47C26A8C2); break; case Zeta.Internals.Actors.ActorClass.Wizard: thisClassButton=UIElement.FromHash(0xBC3AA6A915972065); break; } return thisClassButton; }
protected override ScalarValue GetValue(ScalarValue value) { return(Zeta.RiemannZeta(value)); }
static ScalarValue PolylogZetaPositive(int n) { var s = Zeta.RiemannZeta(n); return(new ScalarValue(s)); }
void BotMain_OnStop(Zeta.CommonBot.IBot bot) { Log("OnStop"); ((AutoResetEvent)flagStop).Set(); if (checkthread != null && checkthread.IsAlive) { Log("Kill CheckNotificationUI thread"); checkthread.Abort(); } }
void BotMain_OnStart(Zeta.CommonBot.IBot bot) { Log("OnStart"); ((AutoResetEvent)flagStop).Reset(); if (checkthread != null && checkthread.IsAlive) { Log("Kill old CheckNotificationUI thread"); checkthread.Abort(); } checkthread = new Thread(new ThreadStart(CheckNotificationUI)); checkthread.Start(); }
/* This method represent the BotMain event OnStop (Zeta.CommonBot.BotMain.OnStop) We need for the comms database to be removed, because on the next */ public void BotStopped(Zeta.CommonBot.IBot bot) { // Upadate GameState to "Waiting" // in order to stop the run leaderRadio.updateGameState("Waiting"); }
/* This method represent the BotMain event OnStart (Zeta.CommonBot.BotMain.OnStart) We need for the party formation to start again */ public void BotStarted(Zeta.CommonBot.IBot bot) { // Upadate GameState to "Running" leaderRadio.updateGameState("Running"); // Reload profile Zeta.CommonBot.ProfileManager.Load(GlobalSettings.Instance.LastProfile); pauseForABit(1, 2); Initialise_All(); }
/* This method represent the BotMain event OnStop (Zeta.CommonBot.BotMain.OnStop) We need for the comms database to be removed, because on the next */ public void BotStopped(Zeta.CommonBot.IBot bot) { // Do nothing for now }
/* This method represent the BotMain event OnStart (Zeta.CommonBot.BotMain.OnStart) We need for the party formation to start again */ public void BotStarted(Zeta.CommonBot.IBot bot) { // Reload profile Zeta.CommonBot.ProfileManager.Load(GlobalSettings.Instance.LastProfile); pauseForABit(1, 2); Initialise_All(); }