virtual protected List <IBuild> DiscoverBuilds() { var BuildList = new List <IBuild>(); if (BuildPaths.Count() > 0) { foreach (string Path in BuildPaths) { IEnumerable <IFolderBuildSource> BuildSources = Gauntlet.Utils.InterfaceHelpers.FindImplementations <IFolderBuildSource>(); foreach (var BS in BuildSources) { IEnumerable <IBuild> Builds = BS.GetBuildsAtPath(ProjectName, Path); BuildList.AddRange(Builds); } } } // Editor? IBuild EditorBuild = CreateEditorBuild(UnrealPath); if (EditorBuild != null) { BuildList.Add(EditorBuild); } else { Log.Verbose("No editor found for {0}, editor-builds will be unavailable", ProjectName); } // give higher level code a chance to reject stuff return(BuildList.Where(B => ShouldMakeBuildAvailable(B)).ToList()); }
public async Task ListStatus(int page = 0) { if (page != 0) { page -= 1; } List <BotStatuses> BS; using (var uow = DBHandler.UnitOfWork()) { BS = uow.BotStatuses.GetBotStatuses(page); } if (!BS.Any()) { await Context.Channel.SendErrorAsync($"No Bot Statuses found for page {page + 1}"); return; } EmbedBuilder embed = new EmbedBuilder().WithOkColour().WithTitle($"BotStatuses").WithFooter(efb => efb.WithText($"Page: {page + 1}")); string desc = ""; foreach (BotStatuses B in BS) { desc += $"{B.ID}. {B.Status} | Is Stream: {B.Streaming.ToString()} | Url: {B.StreamURL}\n"; } embed.WithDescription(desc); await Context.Channel.BlankEmbedAsync(embed); }
private void Write(bool outcoming) { var arguments = new List <object>() { ParamType.UInt8, PacketId, ParamType.UInt16, VehicleId, ParamType.Bits, DriveBy, 2, ParamType.Bits, SeatId, 6, ParamType.Bits, AdditionalKey, 2, ParamType.Bits, WeaponId, 6, ParamType.UInt8, PlayerHealth, ParamType.UInt8, PlayerArmour, ParamType.UInt16, LRKey, ParamType.UInt16, UDKey, ParamType.UInt16, Keys, }; if (outcoming) { arguments.Insert(2, ParamType.UInt16); arguments.Insert(3, FromPlayerId); } BS.WriteValue(arguments.ToArray()); arguments = new List <object>() { ParamType.Float, Position.X, ParamType.Float, Position.Y, ParamType.Float, Position.Z, }; BS.WriteValue(arguments.ToArray()); }
private void btnSaveChange_Click(object sender, EventArgs e) { //按btnSaveChange按鈕 BS.EndEdit(); if (BeforeEndEdit()) { byte PrevTableStatus = TBStatus; try { if (UpdateData()) { TBStatus = 0; SetControls(); AfterEndEdit(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "操作錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error); TBStatus = PrevTableStatus; } SetButtons(); } }
public ActionResult GetClientReport(ReportCondition c) { var now = DateTime.Now; c.FromDate = now.AddMonths(-12); c.ToDate = now; var data = BS.GetClientReport(c); var list = new List <ClientReportInfo>(); for (DateTime i = c.FromDate.Value; i <= c.ToDate; i = i.AddMonths(1)) { var m = i.ToString("yyyy-MM"); var d = data.FirstOrDefault(x => x.Time == m); if (d != null) { list.Add(d); } else { list.Add(new ClientReportInfo() { Time = m }); } } var result = new JsonNetResult() { Data = list, MaxJsonLength = int.MaxValue }; result.Settings.DateFormatString = "yyyy-MM-dd"; return(result); }
static void Main(string[] args) { Console.WriteLine(Normal.Cdf(-0.6) - 0.274253117750074); Console.WriteLine(Normal.Cdf(-0.5) - 0.308537538725987); Console.WriteLine(Normal.Cdf(-0.4) - 0.344578258389676); Console.WriteLine(Normal.Cdf(-0.3) - 0.382088577811047); Console.WriteLine(Normal.Cdf(-0.2) - 0.420740290560897); Console.WriteLine(Normal.Cdf(-0.1) - 0.460172162722971); Console.WriteLine(Normal.Cdf(0) - 0.5); Console.WriteLine(Normal.Cdf(0.1) - 0.539827837277029); Console.WriteLine(Normal.Cdf(0.2) - 0.579259709439103); Console.WriteLine(Normal.Cdf(0.3) - 0.617911422188953); Console.WriteLine(Normal.Cdf(0.4) - 0.655421741610324); Console.WriteLine(Normal.Cdf(0.5) - 0.691462461274013); Console.WriteLine(Normal.Cdf(0.6) - 0.725746882249926); Console.WriteLine(BS.EuropeanOption(100, 1, 100, 0.2, 0.05, OptionType.Call) - 10.450575619322300); Console.WriteLine(BS.EuropeanOption(100, 1, 100, 0.2, 0.05, OptionType.Put) - 5.573518069393707); Console.WriteLine(BS.EuropeanOption(100, 3, 100, 0.2, 0.05, OptionType.Call) - 20.924371241045776); Console.WriteLine(BS.EuropeanOption(100, 3, 100, 0.2, 0.05, OptionType.Put) - 6.995168883551568); Console.WriteLine(BS.EuropeanOption(110, 1, 100, 0.2, 0.05, OptionType.Call) - 6.040077440561824); Console.WriteLine(BS.EuropeanOption(110, 1, 100, 0.2, 0.05, OptionType.Put) - 10.675314135640370); Console.WriteLine(BS.EuropeanOption(110, 3, 100, 0.2, 0.05, OptionType.Call) - 16.210868138551504); Console.WriteLine(BS.EuropeanOption(110, 3, 100, 0.2, 0.05, OptionType.Put) - 10.888745545307848); }
private void Write(bool outcoming) { var arguments = new List <object>() { ParamType.UInt8, PacketId, ParamType.UInt16, TrailerId, ParamType.Float, Position.X, ParamType.Float, Position.Y, ParamType.Float, Position.Z, ParamType.Float, Quaternion.W, ParamType.Float, Quaternion.X, ParamType.Float, Quaternion.Y, ParamType.Float, Quaternion.Z, ParamType.Float, Velocity.X, ParamType.Float, Velocity.Y, ParamType.Float, Velocity.Z, }; if (outcoming) { arguments.Insert(2, ParamType.UInt16); arguments.Insert(3, FromPlayerId); } BS.WriteValue(arguments.ToArray()); arguments = new List <object>() { ParamType.Float, AngularVelocity.X, ParamType.Float, AngularVelocity.Y, ParamType.Float, AngularVelocity.Z, }; BS.WriteValue(arguments.ToArray()); }
private void Write(bool outcoming) { var arguments = new List <object>() { ParamType.UInt8, PacketId, ParamType.UInt8, CameraMode, ParamType.Float, CameraFrontVector.X, ParamType.Float, CameraFrontVector.Y, ParamType.Float, CameraFrontVector.Z, ParamType.Float, CameraPosition.X, ParamType.Float, CameraPosition.Y, ParamType.Float, CameraPosition.Z, ParamType.Float, AimZ, ParamType.Bits, WeaponState, 2, ParamType.Bits, CameraZoom, 6, ParamType.UInt8, AspectRatio }; if (outcoming) { arguments.Insert(2, ParamType.UInt16); arguments.Insert(3, FromPlayerId); } BS.WriteValue(arguments.ToArray()); }
private void Write(bool outcoming) { var arguments = new List <object>() { ParamType.UInt8, PacketId, ParamType.UInt8, HitType, ParamType.UInt16, HitId, ParamType.Float, Origin.X, ParamType.Float, Origin.Y, ParamType.Float, Origin.Z, ParamType.Float, HitPosition.X, ParamType.Float, HitPosition.Y, ParamType.Float, HitPosition.Z, ParamType.Float, Offsets.X, ParamType.Float, Offsets.Y, ParamType.Float, Offsets.Z, ParamType.UInt8, WeaponId, }; if (outcoming) { arguments.Insert(2, ParamType.UInt16); arguments.Insert(3, FromPlayerId); } BS.WriteValue(arguments.ToArray()); }
private void Read(bool outcoming) { var arguments = new List <object>() { ParamType.UInt8, "packetId", ParamType.UInt16, "lrKey", ParamType.UInt16, "udKey", ParamType.UInt16, "keys", ParamType.Float, "position_0", ParamType.Float, "position_1", ParamType.Float, "position_2", }; if (outcoming) { arguments.Insert(2, ParamType.UInt16); arguments.Insert(3, "fromPlayerId"); } var result = BS.ReadValue(arguments.ToArray()); PacketId = (int)result["packetId"]; if (outcoming) { FromPlayerId = (int)result["fromPlayerId"]; } LRKey = (int)result["lrKey"]; UDKey = (int)result["udKey"]; Keys = (int)result["keys"]; position = new Vector3((float)result["position_0"], (float)result["position_1"], (float)result["position_2"]); }
public ActionResult UpdateDesginFollowStatus(Guid designId, string customerId, bool follow) { BS.UpdateDesginFollowStatus(designId, customerId, follow); return(new JsonResult() { Data = "OK" }); }
public void TestMethod3() { BS bS = new BS(); double resCall = bS.computeCall(50, 55, 1, 0.65, 0.09); Assert.IsTrue(Math.Abs(resCall - 12.64216) < 0.0001); }
public ActionResult RefundOrder(Guid orderId) { BS.RefundOrder(orderId); return(new JsonResult() { Data = "OK" }); }
public ActionResult BookPositionsInternal(Guid deskId, DateTime selectedDate, List <string> positions) { BS.BookPositionsInternal(deskId, selectedDate, positions); return(new JsonResult() { Data = new { Status = "OK" } }); }
public ActionResult SetIsPublic(Guid designId, bool ispublic) { BS.SetIsPublic(designId, ispublic); return(new JsonResult() { Data = "OK" }); }
public ActionResult DeleteAddress(Guid addressId) { BS.DeleteAddress(addressId); return(new JsonResult() { Data = "OK" }); }
public void Sprout_CreatesAnObjectFromInterface() { //act var implementation = BS.Sprout <IFoo>(); //assert Assert.NotNull(implementation); }
public ActionResult UpdateShopStatus(Guid shopId, int status) { BS.UpdateShopStatus(shopId, status); return(new JsonResult() { Data = "OK" }); }
public ActionResult UpdateProductType(ZZ_Category item) { BS.UpdateProductType(item); return(new JsonResult() { Data = "OK" }); }
public ActionResult DeleteProductType(int itemId) { BS.DeleteProductType(itemId); return(new JsonResult() { Data = "OK" }); }
public ActionResult CompleteOrder(LogisticsInfo logisticsInfo) { var result = BS.CompleteOrder(logisticsInfo); return(new JsonResult() { Data = result }); }
public ActionResult ProcessingOrder(Guid orderId) { var result = BS.ProcessingOrder(orderId); return(new JsonResult() { Data = result }); }
public ActionResult DeleteOrder(Guid orderId) { var result = BS.DeleteOrder(orderId); return(new JsonResult() { Data = result }); }
public ActionResult DeleteProduct(Guid templateId) { var r = BS.DeleteProduct(templateId); return(new JsonResult() { Data = r }); }
public ActionResult RefundOrder(Guid orderId) { var result = BS.RefundOrder(orderId); return(new JsonResult() { Data = result }); }
public ActionResult RequestRefund(Guid orderId) { var refundResult = BS.RequestRefund(orderId); return(new JsonResult() { Data = new { status = refundResult } }); }
public ActionResult DeskPostions(SearchPositionCondition condition) { var deskPositions = BS.GetDeskPostions(condition); return(new JsonResult() { Data = deskPositions }); }
public ActionResult ShopDesks(SearchDeskCondition condition) { var desks = BS.GetShopDesks(condition); return(new JsonResult() { Data = desks }); }
public ActionResult ShopDetail(Guid shopId) { var shop = BS.GetShopDetail(shopId); return(new JsonResult() { Data = shop }); }
public ActionResult Shops(SearchShopCondition condition) { var shops = BS.GetShops(condition); return(new JsonResult() { Data = shops }); }
// Use this for initialization void Start() { compassImage = gameObject.GetComponentInChildren<Image> (); compassImage.enabled = false; angleCalculated = false; bsInAng = gameCamera.GetComponent<BS> (); compassRectangle = gameObject.GetComponentsInChildren<RectTransform> ()[1]; angle = 999f; }
// Use this for initialization void Start() { nameOfCamType = gameObject.name; logged = true; bsInLog = gameObject.GetComponent<BS> (); tsScript = compassTimer.GetComponent<TS> (); if(Directory.Exists("./GAMELOGS/"+WS.returnPlayerName()+"/"+gameObject.name)) Debug.Log("Directory already exists!"); else Directory.CreateDirectory("./GAMELOGS/"+WS.returnPlayerName()+"/"+gameObject.name); }
public LOGBRUSH(System.Drawing.Color color) { this.lbStyle = BS.BS_SOLID; this.lbColor = WindowsWrapper.ColorToCOLORREF(color); this.lbHatch = HS.HS_HORIZONTAL; }
public LOGBRUSH(BS style) { this.lbStyle = style; this.lbColor = 0; this.lbHatch = HS.HS_HORIZONTAL; }