public void setRespFalse() { A1.SetActive(false); A2.SetActive(false); A3.SetActive(false); A4.SetActive(false); A5.SetActive(false); A6.SetActive(false); A7.SetActive(false); B1.SetActive(false); B2.SetActive(false); B3.SetActive(false); B4.SetActive(false); B5.SetActive(false); B6.SetActive(false); B7.SetActive(false); C1.SetActive(false); C2.SetActive(false); C3.SetActive(false); C4.SetActive(false); C5.SetActive(false); C6.SetActive(false); C7.SetActive(false); }
private void ResultStage() { Console.WriteLine("Show matrices? y/n"); ConsoleKey answer = Console.ReadKey(true).Key; //A1, A2, B2, C2, A, b1, c1, bi, Y3, y1, y2, Y3squared, Y3cubed if (answer == ConsoleKey.Y) { Console.WriteLine("Matrices:"); A1.ShowMatrix("A1"); A2.ShowMatrix("A2"); B2.ShowMatrix("B2"); C2.ShowMatrix("C2"); A.ShowMatrix("A"); b1.ShowMatrix("b1"); c1.ShowMatrix("c1"); bi.ShowMatrix("bi"); Y3.ShowMatrix("Y3"); y1.ShowMatrix("y1"); y2.ShowMatrix("y2"); result.ShowMatrix("result"); } Console.WriteLine("Press any key to exit..."); Console.ReadKey(); }
public static BigInt operator /(BigInt B1, BigInt B2) { B2 = (BigInt)B1.SameSize(B2); BigInt B2Copy = B2.Clone(); BigInt Q = new BigInt(B2Copy.Size, 0); BigInt R = new BigInt(B2Copy.Size, 0); switch (B1.LookAtSign(B2Copy)) { case signt2.pp: _Divmod(ref Q, ref R, ref B1, ref B2Copy, signt.positive); return(Q); case signt2.np: _Divmod(ref Q, ref R, ref B1, ref B2Copy, signt.negative); return(Q); case signt2.pn: _Divmod(ref Q, ref R, ref B1, ref B2Copy, signt.negative); return(Q); case signt2.nn: _Divmod(ref Q, ref R, ref B1, ref B2Copy, signt.positive); return(Q); default: throw new Exception("Could not determine the sign of the result value."); } }
private static long OoMapperSimple(int mappingsCount) { var s = new B2(); var d = new A2(); return Benchmark(mappingsCount, () => d = Mapper.Map(s, d)); }
private static long HandWtittenSimple(int mappingsCount) { var s = new B2(); var d = new A2(); return Benchmark(mappingsCount, () => d = Map(s, d)); }
public void Manage_sub_channels_using_classes() { var a = new A(); var b1 = new B1(); var b2 = new B2(); var c = new C(); var bus = new EventStream(false); bus.Subscribe(TestActor, typeof(B2)); bus.Publish(c); bus.Publish(b2); ExpectMsg(b2); bus.Subscribe(TestActor, typeof(A)); bus.Publish(c); ExpectMsg(c); bus.Publish(b1); ExpectMsg(b1); bus.Unsubscribe(TestActor, typeof(B1)); bus.Publish(c); //should not publish bus.Publish(b2); //should publish bus.Publish(a); //should publish ExpectMsg(b2); ExpectMsg(a); ExpectNoMsg(TimeSpan.FromSeconds(1)); }
private void Final() { Console.WriteLine("Show all? y/n"); ConsoleKey response = Console.ReadKey(true).Key; if (response == ConsoleKey.Y) { Console.WriteLine("If started"); A1.ShowMatrix("A1"); A2.ShowMatrix("A2"); B2.ShowMatrix("B2"); C2.ShowMatrix("C2"); A.ShowMatrix("A"); b1.ShowMatrix("b1"); c1.ShowMatrix("c1"); b.ShowMatrix("b"); Y3.ShowMatrix("Y3"); y1.ShowMatrix("y1"); y2.ShowMatrix("y2"); result.ShowMatrix("result"); Console.WriteLine("If ended"); } Console.WriteLine("Press enter to exit"); while (Console.ReadKey().Key != ConsoleKey.Enter) { } }
public void restartBarras() { randomCachos(); if (A == 0) { A1.SetActive(true); A2.SetActive(false); } else { A1.SetActive(false); A2.SetActive(true); } if (B == 0) { B1.SetActive(true); B2.SetActive(false); } else { B1.SetActive(false); B2.SetActive(true); } }
/// <summary> /// /// </summary> /// <param name="options"></param> /// <returns></returns> private async Task <int> UploadFiles(Options options) { var b2 = new B2(); b2.Login(options.AccountId, options.ApplicationKey, options.BucketName).Wait(); b2.OnLargeFileUploadProgress += OnLargeFileUploadProgress; var scannedFiles = FilesystemScanner.Scan(options.Source, options.Recursive); Progress <StreamProgress> progress = new Progress <StreamProgress>(); progress.ProgressChanged += Progress_ProgressChanged; var tasks = new Dictionary <Task, string>(); foreach (var file in scannedFiles) { if (file.Length < 100 * (1000 * 1000)) { while (tasks.Count >= options.SimultaneousConnections) { var tempTasks = tasks.Keys.ToArray(); var i = Task.WaitAny(tempTasks); if (i >= 0) { var completedTask = tempTasks[i]; var path = tasks[completedTask]; if (completedTask.IsFaulted || completedTask.IsCanceled) { var error = "Unknown error"; if (completedTask.Exception != null) { error = completedTask.Exception.Message; while (completedTask.Exception.InnerException != null) { error += "\r\n" + completedTask.Exception.InnerException.Message; } } Console.Error.WriteLine(path + ": " + error); } else { Console.WriteLine(path); } tasks.Remove(completedTask); } } await b2.UploadFile(file.Info.FullName, file.RelativePath.ToUnixPath(), "application/octet-stream", null, progress); } else { Console.WriteLine($"File too large than 100Mb detected, use UploadLargeFile instead of normal upload - file name => {file.Info.Name}"); await UpLargeFile(file, b2); } } return(0); }
void Reset() { if (isChange) { for (int i = 0; i < 4; i++) { Change [i].color = new Color(0.0f, 0.0f, 0.0f, 0.0f); } } StopCoroutine("Rexar"); isPlaying = false; isCopied = false; B1.GetComponent <TrailRenderer>().time = 0.0f; B1.SetActive(false); B1.GetComponent <Ball>().Dead = false; B2.GetComponent <TrailRenderer>().time = 0.0f; B2.SetActive(false); B2.GetComponent <Ball>().Dead = false; B3.SetActive(false); B3.GetComponent <TrailRenderer>().time = 0.0f; B3.GetComponent <Ball>().Dead = false; B4.SetActive(false); B4.GetComponent <TrailRenderer>().time = 0.0f; B4.GetComponent <Ball>().Dead = false; ChangeColor(0); }
private static long OoMapperSimple(int mappingsCount) { var s = new B2(); var d = new A2(); return(Benchmark(mappingsCount, () => d = Mapper.Map(s, d))); }
private void DisplayThirdLevel() { B2.Clear(); B3.Clear(); B3.ReadOnly = false; B5.Clear(); B7.Clear(); B8.Clear(); B10.Clear(); B11.Clear(); B11.ReadOnly = false; B13.Clear(); B14.Clear(); B14.ReadOnly = false; B15.Clear(); B16.Clear(); B4.Text = "2"; B4.ReadOnly = true; B12.Text = "1"; B12.ReadOnly = true; }
private void pictureBox1_MouseClick(object sender, MouseEventArgs e) { // Muestra los numeros de RGB de un pixel seleccionado por el mouse int R2, G2, B2; R2 = 0; G2 = 0; B2 = 0; Color c = new Color(); for (int i = e.X; i < e.X + 5; i++) { for (int j = e.Y; j < e.Y + 5; j++) { c = bmp.GetPixel(i, j); R2 = R2 + c.R; G2 = G2 + c.G; B2 = B2 + c.B; } } R2 = R2 / 25; G2 = G2 / 25; B2 = B2 / 25; textBox1.Text = R2.ToString(); textBox2.Text = G2.ToString(); textBox3.Text = B2.ToString(); // Modificamos el valor rgb seleccionado por el mouse el promedio de los 5pixeles a su alrededor c1 = Color.FromArgb(R2, G2, B2); //textBox4.BackColor=c; }
private void B2_Tick(object sender, EventArgs e) { PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5H^7ost ^5M^7enu\n\n^5God Mode\n^2-->^5Max Ammo\nAll Perks\nRapide Fire\nLock Controller"); if (Key_IsDown((uint)0) == "R1") { B2.Stop(); B3.Start(); } if (Key_IsDown((uint)0) == "X") { byte[] buffer = new byte[] { 0xFF, 0xFF, 0xFF }; PS3.SetMemory(0x01227631, buffer); PS3.SetMemory(0x01227649, buffer); PS3.SetMemory(0x012276cd, buffer); PS3.SetMemory(0x012276d9, buffer); PS3.SetMemory(0x012276b5, buffer); PS3.SetMemory(0x012276c1, buffer); PS3.SetMemory(0x012276d9, buffer); PS3.SetMemory(0x012276e5, buffer); // byte[] buffer1 = new byte[] { 0xFF }; PS3.SetMemory(0x0122778a, buffer1); } if (Key_IsDown((uint)0) == "R3") { B2.Stop(); HostMenuMain.Start(); } if (Key_IsDown((uint)0) == "L1") { B2.Stop(); B1.Start(); } }
//public GameObject Starter; //bool A = true; //bool B = true; // Use this for initialization void Awake() { isPlaying = false; isCopied = false; //StartCoroutine ("Updat"); Rb1 = B1.GetComponent <Rigidbody2D> (); Rb2 = B2.GetComponent <Rigidbody2D> (); Rb3 = B3.GetComponent <Rigidbody2D> (); Rb4 = B4.GetComponent <Rigidbody2D> (); Rb5 = B5.GetComponent <Rigidbody2D> (); Rb6 = B6.GetComponent <Rigidbody2D> (); Rb7 = B7.GetComponent <Rigidbody2D> (); Tr1 = B1.transform; Tr2 = B2.transform; Tr3 = B3.transform; Tr4 = B4.transform; Tr5 = B5.transform; Tr6 = B6.transform; Tr7 = B7.transform; Pos1 = Out1.transform.position; Pos2 = Out2.transform.position; Pos3 = Out3.transform.position; Pos4 = Out4.transform.position; Pos5 = Out5.transform.position; Pos6 = Out6.transform.position; Pos7 = Out7.transform.position; S = GetComponent <SpriteRenderer> (); }
void Reset() { isPlaying = false; isCopied = false; B1.GetComponent <TrailRenderer>().time = 0.0f; B1.SetActive(false); B1.GetComponent <Ball>().Dead = false; B2.GetComponent <TrailRenderer>().time = 0.0f; B2.SetActive(false); B2.GetComponent <Ball>().Dead = false; B3.SetActive(false); B3.GetComponent <TrailRenderer>().time = 0.0f; B3.GetComponent <Ball>().Dead = false; B4.SetActive(false); B4.GetComponent <TrailRenderer>().time = 0.0f; B4.GetComponent <Ball>().Dead = false; B5.SetActive(false); B5.GetComponent <TrailRenderer>().time = 0.0f; B5.GetComponent <Ball>().Dead = false; B6.SetActive(false); B6.GetComponent <TrailRenderer>().time = 0.0f; B6.GetComponent <Ball>().Dead = false; B7.SetActive(false); B7.GetComponent <TrailRenderer>().time = 0.0f; B7.GetComponent <Ball>().Dead = false; ChangeColor(0); }
private void DisplaySecondLevel() { B2.Clear(); B8.Clear(); B8.ReadOnly = false; B12.Clear(); B13.Clear(); B15.Clear(); B16.Clear(); B16.ReadOnly = false; B3.Text = "3"; B3.ReadOnly = true; B4.Clear(); B4.ReadOnly = false; B5.Clear(); B5.ReadOnly = false; B6.Text = "2"; B6.ReadOnly = true; B7.Clear(); B7.ReadOnly = false; B9.Text = "4"; B9.ReadOnly = true; B10.Clear(); B10.ReadOnly = false; B14.Text = "1"; B14.ReadOnly = true; }
public void Test2() { B2 b = new B2(); var a = Mapper.Map <B2, A2>(b); Assert.AreEqual("99", a.fld3[0]); }
private void B1_TextChanged(object sender, TextChangedEventArgs e) { if (B1.Text.Length > 0) { B2.Focus(); } }
private void A1_Tick(object sender, EventArgs e) { PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5M^7ain ^5M^7enu\n\n^2-->^5Host Menu\nClient 1 Menu\nReset Menu\nAccount Menu\nTeleport Menu\nVision Menu\nCredit Menu\n\n\n^3Client 0 : ^2" + textBox1.Text + "\n^3Client 1 : ^2" + textBox2.Text + "^5"); if (Key_IsDown((uint)0) == "X") { HostMenuMain.Stop(); B1.Start(); } if (Key_IsDown((uint)0) == "R1") { HostMenuMain.Stop(); Client1.Start(); } if (Key_IsDown((uint)0) == "R3 + L3") { HostMenuMain.Stop(); B1.Stop(); B2.Stop(); B3.Stop(); B4.Stop(); B5.Stop(); Client1.Stop(); C1.Stop(); C2.Stop(); C3.Stop(); C4.Stop(); ResetMenu.Stop(); D1.Stop(); D2.Stop(); D3.Stop(); D4.Stop(); D5.Stop(); AccountMenu.Stop(); E1.Stop(); E2.Stop(); E3.Stop(); E4.Stop(); E5.Stop(); TeleportMenu.Stop(); F1.Stop(); F2.Stop(); F3.Stop(); F4.Stop(); VisionMenu.Stop(); G1.Stop(); G2.Stop(); G3.Stop(); G4.Stop(); G5.Stop(); G6.Stop(); OtherMenu.Stop(); H1.Stop(); PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed"); simpleButton2.Enabled = true; toolStripStatusLabel2.Text = "Not Started !"; toolStripStatusLabel2.ForeColor = Color.Red; simpleButton3.Enabled = false; } }
public ActionResult <Employee> GetEmployee(string email) => fs(B2.getEmployeeFromDatabase(_db, email)) //_db //.Employees //.SingleOrDefault(e => e.Email == email) //.Apply(Optional) .Map(e => (ActionResult <Employee>)Ok(e)) .IfNone(() => NotFound());
public void Test2() { A2 a = new A2(); B2 b = new B2(); Context.objMan.GetMapper<B2, A2>().Map(b, a); //DynamicAssemblyManager.SaveAssembly(); Assert.AreEqual("99", a.fld3[0]); }
public void Test2() { A2 a = new A2(); B2 b = new B2(); Context.objMan.GetMapper <B2, A2>().Map(b, a); //DynamicAssemblyManager.SaveAssembly(); Assert.Equal("99", a.fld3[0]); }
public string[] ToLines() { return(new string[] { A1.ToString(), A2.ToString(), A3.ToString(), B1.ToString(), B2.ToString(), B3.ToString(), C1.ToString(), C2.ToString(), C3.ToString(), Start.ToString() }); }
public void Test_StructToStruct() { B2 b = new B2(); b.fld1 = 99; var a = Mapper.Map <B2, A2>(b); Assert.AreEqual(a.fld1, 99); }
// Update is called once per frame void Update() { //StateManager sm = TrackerManager.Instance.GetStateManager(); //IEnumerable<TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours(); B1.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q1.gameObject.SetActive(true); } }); B2.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q2.gameObject.SetActive(true); } }); B3.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q3.gameObject.SetActive(true); } }); B4.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q4.gameObject.SetActive(true); } }); B5.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(true); Q5.gameObject.SetActive(true); } }); BlackFade.GetComponent <Button> ().onClick.AddListener(delegate { if (click) { BlackFade.gameObject.SetActive(false); Q1.gameObject.SetActive(false); Q2.gameObject.SetActive(false); Q3.gameObject.SetActive(false); Q4.gameObject.SetActive(false); Q5.gameObject.SetActive(false); } }); }
void GameStart() { Minigame.SetActive(false); Bumbu1.SetActive(false); Bumbu2.SetActive(false); telurGoreng.SetActive(false); NasiP.SetActive(false); NasiG.SetActive(false); Panel1 = false; Panel2 = false; Panel3 = false; Panel4 = false; score = 0; Achieve.value = score; startPos = AIoned.transform.position; Debug.Log(startPos); AI1 = true; AI2 = false; AI3 = false; AI4 = false; Time.timeScale = 1; if (Level == 1) { Achieve.maxValue = 45; timerF = 60; Hitung = true; } if (Level == 2) { Achieve.maxValue = 60; timerF = 100; Hitung = true; } if (Level == 3) { Achieve.maxValue = 100; timerF = 140; Hitung = true; } Winlose.SetActive(false); B0.SetActive(false); B1.SetActive(false); B2.SetActive(false); B3.SetActive(false); PauseBG.SetActive(true); Pauz.SetActive(false); }
public void Test_StructToStruct() { A2 a = new A2(); B2 b = new B2(); b.fld1 = 99; a = Context.objMan.GetMapper <B2, A2>().Map(b, a); Assert.AreEqual(a.fld1, 99); }
public ActionResult <Employee> GetEmployee(string email) { var optionalEmployee = fs(B2.getEmployeeFromDatabase(_db, email)); //var employee = _db.Employees.SingleOrDefault(e => e.Email == email); //var optionalEmployee = employee.Apply(Optional); var optionalResult = optionalEmployee.Map(e => (ActionResult <Employee>)Ok(e)); var result = optionalResult.IfNone(() => NotFound()); return(result); }
public void Test_StructToStruct() { var a = new A2(); var b = new B2 { Fld1 = 99 }; a = Context.ObjMan.GetMapper <B2, A2>().Map(b, a); a.Fld1.ShouldBe(99); }
public void Test2() { var a = new A2(); var b = new B2(); Context.ObjMan.GetMapper <B2, A2>().Map(b, a); // DynamicAssemblyManager.SaveAssembly(); a.Fld3[0].ShouldBe("99"); }
/// <summary> /// 设置精度 /// </summary> /// <param name="n1">角度保留到小数点后的位数</param> /// <param name="n2">方位角保留到小数点后的位数</param> /// <param name="n3">大地线长度保留到小数点后的位数</param> public void SetAccurate(int n1, int n2, int n3) { B1.Set_Accurate(n1); L1.Set_Accurate(n1); A12.Set_Accurate(n2); B2.Set_Accurate(n1); L2.Set_Accurate(n1); A21.Set_Accurate(n2); S = Methods.Set_Accurate(S, n3); }
public void TestOrderRunAfter() { var a = new A2(); var b = new B2(); var s = new IBuildStep[] { b, a }; var sorted = Builder.SortSteps(s); Assert.That(sorted, Is.EqualTo(new IBuildStep[] { a, b })); }
static long EmitMapper_Custom(int mappingsCount) { var s = new B2(); var d = new A2(); var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < mappingsCount; ++i) { d = emitMapper.Map(s, d); } sw.Stop(); return sw.ElapsedMilliseconds; }
static long BenchBLToolkit_Simple(int mappingsCount) { var s = new B2(); var d = new A2(); d = BLToolkit.Mapping.Map.ObjectToObject<A2>(s); var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < mappingsCount; ++i) { d = BLToolkit.Mapping.Map.ObjectToObject<A2>(s); } sw.Stop(); return sw.ElapsedMilliseconds; }
static A2 HandwrittenMap(B2 s, A2 result) { result.str1 = s.str1; result.str2 = s.str2; result.str3 = s.str3; result.str4 = s.str4; result.str5 = s.str5; result.str6 = s.str6; result.str7 = s.str7; result.str8 = s.str8; result.str9 = s.str9; result.n1 = s.n1; result.n2 = (int)s.n2; result.n3 = s.n3; result.n4 = s.n4; result.n5 = (int)s.n5; result.n6 = (int)s.n6; result.n7 = s.n7; result.n8 = s.n8; return result; }
public static void Main() { B1 b = new B2(); // b.Print(); // Erro de compilação; ((Printer)b).Print(); }
public void Test_StructToStruct() { B2 b = new B2(); b.fld1 = 99; var a = Mapper.Map<B2, A2>(b); Assert.AreEqual(a.fld1, 99); }
static long EmitMapper_Simple(int mappingsCount) { var mapper = ObjectMapperManager.DefaultInstance.GetMapper<B2, A2>(); var s = new B2(); var d = new A2(); var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < mappingsCount; ++i) { mapper.Map(s, d); } sw.Stop(); return sw.ElapsedMilliseconds; }
public B5(B2 b2) { this.b2 = b2; }
public void Test2() { B2 b = new B2(); var a = Mapper.Map<B2, A2>(b); Assert.AreEqual("99", a.fld3[0]); }
public void ManageSubChannelsUsingClasses() { var a = new A(); var b1 = new B1(); var b2 = new B2(); var c = new C(); var bus = new EventStream(false); bus.Subscribe(TestActor, typeof(B2)); bus.Publish(c); bus.Publish(b2); ExpectMsg(b2); bus.Subscribe(TestActor, typeof(A)); bus.Publish(c); ExpectMsg(c); bus.Publish(b1); ExpectMsg(b1); bus.Unsubscribe(TestActor, typeof(B1)); bus.Publish(c); //should not publish bus.Publish(b2); //should publish bus.Publish(a); //should publish ExpectMsg(b2); ExpectMsg(a); ExpectNoMsg(TimeSpan.FromSeconds(1)); }
static long AutoMapper_Simple(int mappingsCount) { var s = new B2(); var d = new A2(); var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < mappingsCount; ++i) { d = AutoMapper.Mapper.Map<B2, A2>(s, d); } sw.Stop(); return sw.ElapsedMilliseconds; }
public void Test_StructToStruct() { A2 a = new A2(); B2 b = new B2(); b.fld1 = 99; a = Context.objMan.GetMapper<B2, A2>().Map(b, a); Assert.AreEqual(a.fld1, 99); }
static long HandWtitten_Simple(int mappingsCount) { var s = new B2(); var d = new A2(); var sw = new Stopwatch(); sw.Start(); for (int i = 0; i < mappingsCount; ++i) { d = HandwrittenMap(s, d); } sw.Stop(); return sw.ElapsedMilliseconds; }