public static async Task Main(string[] args) { ExcelPackage.LicenseContext = LicenseContext.Commercial; process methodobject = new process(); await methodobject.Readfromdb(); }
private void Start() { vrPlayer.transform.position = new Vector3(0, 200, 0); vrPlayer.transform.eulerAngles = new Vector3(90.0f, 0.0f, 0.0f); processor = gameObject.GetComponent(typeof(process)) as process; change = false; }
private static void initialize() { writeLog($@"{pathLog}\{logFileName}", string.Empty); XmlDocument doc = new XmlDocument(); doc.Load("config.xml"); lstProcesses = new List <process>(); foreach (XmlNode node in doc.DocumentElement) { if (node.Name.Contains("timeSleep")) { timeSleep = int.Parse(node.InnerText); } else { process stProcess = new process() { name = node.Attributes[0].InnerText, popups = new List <popup>() }; foreach (XmlNode child in node.ChildNodes) { stProcess.popups.Add(new popup() { title = child.Attributes[0].InnerText, contain = child.Attributes[1].InnerText, button = child.Attributes.Count > 2 ? child.Attributes[2].InnerText : "" }); } lstProcesses.Add(stProcess); } } }
private void button2_Click(object sender, EventArgs e) { processcount++; if (processcount < numericUpDown2.Value) { process p = new process(); p.addProcess(textBox4.Text, Convert.ToInt32(textBox3.Text)); textBox3.Text = ""; textBox4.Text = ""; processes.AddLast(p); } if (processcount == numericUpDown2.Value) { drawHoles(); process p = new process(); p.addProcess(textBox4.Text, Convert.ToInt32(textBox3.Text)); processes.AddLast(p); label2.Visible = false; label5.Visible = false; label6.Visible = false; numericUpDown2.Visible = false; textBox3.Visible = false; textBox4.Visible = false; button2.Visible = false; label9.Visible = false; label7.Visible = true; radioButton1.Visible = true; radioButton2.Visible = true; radioButton3.Visible = true; button3.Visible = true; } }
public AddpartViewModel(process process) { this.process = process; this.num = process.parts.Count + 1; types = new List <TypePart>(); types.Add(new TypePart(1)); types.Add(new TypePart(2)); types.Add(new TypePart(3)); types.Add(new TypePart(4)); types.Add(new TypePart(5)); types.Add(new TypePart(6)); types.Add(new TypePart(7)); types.Add(new TypePart(8)); types.Add(new TypePart(9)); types.Add(new TypePart(10)); save = new Command(() => { var part = new part() { Name = name, Cost = cost, Id_Pro = process.Id, num_type = numtype, num = num, alpart = alhcost }; Ico.getValue <db>().GetUnivdb().parts.Add(part); Ico.getValue <db>().GetUnivdb().SaveChanges(); }); }
public string Argument(string hability, evidence evidence, process process) { switch (hability) { case "getImageInfo": return(argGetImageInfo(evidence)); case "getListProcess": return(argGetListProcess(evidence)); case "getNetScan": return(argGetNetScan(evidence)); case "getCommands": return(argGetCommands(evidence)); case "verInfo": return(argVerInfo(evidence)); case "processDlls": return(argListDlls(evidence, process)); default: // Default stuff return("noInfo"); } }
private string argListDlls(evidence evidence, process process) { string response; response = @"-f " + evidence.Route + " --profile=" + evidence.Profile + " dlllist -p " + process.Pid; return(response); }
private void corrosionAndExpand(int mode) { try { //int[,] filter ={{0,1,0},{1,1,1},{0,1,0}}; int[,] filter = { { 1, 0 }, { 1, 1 } }; int times; if (mode == 1) { times = Convert.ToInt16(this.corrTimesTxtBox.Text); } else { times = Convert.ToInt16(this.expandTxtBox.Text); } process.copy(inPic, out outPic); for (int i = 0; i < times; i++) { outPic = process.corroAndExpand(outPic, filter, 1, 1, mode); } this.outPicBox.Image = process.ReturnPhoto(outPic); getContrast(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void addprocessforMMU(process a) { if (a.estado == "Listo" || a.estado == "Procesando") { processMMU.Add(a); } }
public View7isabViewModel(process process) { this.actionUP = () => { this.val = Ico.getValue <db>().GetUnivdb().card_7isab.ToList().Where(c => c.card.id_prosess == process.Id).FirstOrDefault(); }; this.process = process; parts = process.parts.ToList(); foreach (part part in parts) { newcost += part.Cost; } var card_7 = Ico.getValue <db>().GetUnivdb().card_7isab.ToList().Where(c => c.card.id_prosess == process.Id).FirstOrDefault(); if (card_7 == null) { OpenSample4Dialog(); AcceptSample4Dialog(); this.CreateCard(card_7); } else { this.inTilData(); } back = new Command(() => { Ico.getValue <ContentApp>().back(); }); }
public EditprocessesViewModel(process process) { this.Name = process.Name; this.date = process.date; this.Code = process.Code; this.Num = process.num; save = new Command(() => { MessageBox.Show(" data of " + process.Id); var pr = Ico.getValue <db>().GetUnivdb().processes.Single(p => p.Id == process.Id); // Ico.getValue<db>().GetUnivdb().parts.RemoveRange(pr.parts); pr.Name = Name; pr.date = date; pr.Code = Code; pr.num = Num; Ico.getValue <db>().savedb(); MessageBox.Show("data svaed"); // Your code... // Could also be before try if you know the exception occurs in SaveChanges Ico.getValue <ContentApp>().page = new PCrad(); Ico.getValue <ContentApp>().clear(); }); back = new Command(() => { Ico.getValue <ContentApp>().back(); }); }
private void button1_Click(object sender, EventArgs e) { process p = new process(); p.Progress += p_Progress; p.Foo(); }
public static double Preemptive_Priority(List <process> p) { LinkedList <process> sorted_processes = new LinkedList <process>(); List <process> SortedPriority = p.OrderBy(pr => pr.getPriority()).ToList(); //List<process> SortedBurst = p.OrderBy(b => (b.getBurst() - b.getExe())).ToList(); double totalburst = 0.0; foreach (var item in SortedPriority) //copying arranged list in linked list { totalburst += item.getBurst(); } int var = p.Count; double waitingtime = 0.0; process old = SortedPriority[0]; foreach (var item in SortedPriority) { if (item.getArrival() < old.getArrival()) { old = item; } } for (double time = 0.0; time <= totalburst; time++) { //SortedBurst = SortedBurst.OrderBy(b => (b.getBurst() - b.getExe())).ToList(); for (int j = 0; j < var; j++) { if (SortedPriority[j].getArrival() <= time) { if (old != SortedPriority[j]) { waitingtime = waitingtime + (time - SortedPriority[j].getDeparture()); old.setDeparture(time); //SortedBurst[j].setDeparture(time); old = SortedPriority[j]; } sorted_processes.AddLast(SortedPriority[j]); SortedPriority[j].setExe((SortedPriority[j].getExe()) + 1); //SortedBurst[j].setDeparture = time if (SortedPriority[j].getBurst() == SortedPriority[j].getExe()) { SortedPriority.RemoveAt(j); var--; } break; } } } //return waitingtime = CalcWaitingTime(sorted_processes); return(waitingtime / p.Count); }
public Viewsa7abViewModel(process process) { inTilData(process); back = new Command(() => { Ico.getValue <ContentApp>().back(); }); }
static async Task Main(string[] args) { string strFilePath = @"C:\Users\Lenovo\Documents\emailvalidation_Processed.csv"; DateTime lastModified = System.IO.File.GetLastWriteTime(strFilePath).ToUniversalTime(); DownloadFileFromInformatica(); process p = new process(); Program pobject = new Program(); await pobject.GetReferencing(); p.cosmosClient = pobject.cosmosClient; p.database = pobject.database; p.containermain = pobject.containermain; p.containerretry = pobject.containerretry; List <getmainmail> responses = File.ReadAllLines(@"C:\Users\Lenovo\Documents\emailvalidation_Processed.csv").Skip(1).Select(v => FromCsv(v)).ToList(); Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("200", "EMAIL_VALID"); dict.Add("210", "DOMAIN_EXISTS"); dict.Add("220", "RETRY"); dict.Add("250", "EMAIL_EXISTS_BUT_SPAM"); dict.Add("260", "DOMAIN_EXISTS_BUT_SPAM"); dict.Add("270", "RETRY"); dict.Add("300", "EMAIL_NOT_VALID"); dict.Add("310", "DOMAIN_EXISTS_BUT_SPAM"); foreach (var value in responses) { value.id = value.VerifyEmailResponse.VerifyEmailResult.ServiceResult.Email.Complete; if (value.VerifyEmailResponse.VerifyEmailResult.ServiceStatus.StatusNbr != 220 && value.VerifyEmailResponse.VerifyEmailResult.ServiceStatus.StatusNbr != 270) { signal SignalObject = new signal(); Key keyobject = new Key(); List <Key> keyslist = new List <Key>(); keyobject.value = value.id; keyslist.Add(keyobject); SignalObject.keys = keyslist; List <Attribute> attributelist = new List <Attribute>(); Attribute attributeobjectnew = new Attribute(); Attribute attributeobjectold = new Attribute(); Guid g = Guid.NewGuid(); SignalObject.correlationId = g.ToString(); attributeobjectnew.key = "EmailMatchType.new"; attributeobjectnew.value = dict[value.VerifyEmailResponse.VerifyEmailResult.ServiceStatus.StatusNbr.ToString()]; attributeobjectold.key = "EmailMatchType.old"; attributeobjectold.value = dict["220"]; attributelist.Add(attributeobjectnew); attributelist.Add(attributeobjectold); SignalObject.attributes = attributelist; SignalObject.originatingSystemDate = lastModified; SignalObject.internalProcessingDate = DateTime.UtcNow; value.partitionKey = value.id.Substring(0, 2); await SendSignalviaHttpAsync(SignalObject); await p.AddingAndDeleting(value); } } }
private static void Merge(process[] input, int low, int middle, int high, sort type) { int left = low; int right = middle + 1; process[] tmp = new process[(high - low) + 1]; int tmpIndex = 0; while ((left <= middle) && (right <= high)) { if ((input[left].arrivalTime < input[right].arrivalTime) && type == sort.arrivalTime) { tmp[tmpIndex] = input[left]; left = left + 1; } else if ((input[left].priority < input[right].priority) && type == sort.priority) { tmp[tmpIndex] = input[left]; left = left + 1; } else if ((input[left].index < input[right].index) && type == sort.index) { tmp[tmpIndex] = input[left]; left = left + 1; } else { tmp[tmpIndex] = input[right]; right = right + 1; } tmpIndex = tmpIndex + 1; } if (left <= middle) { while (left <= middle) { tmp[tmpIndex] = input[left]; left = left + 1; tmpIndex = tmpIndex + 1; } } if (right <= high) { while (right <= high) { tmp[tmpIndex] = input[right]; right = right + 1; tmpIndex = tmpIndex + 1; } } for (int i = 0; i < tmp.Length; i++) { input[low + i] = tmp[i]; } }
private void aquivatodo(List <process> a, int index, process b) { //lista a tiene que ser la lista de procesos activos de MMU if (algoritmoMMU == "FIFO") { if (lista1.Count <= paginadoMMU) { Console.WriteLine("agrego en seccion 1"); Console.WriteLine("elementos en lista =>" + a.Count); Console.WriteLine("en el queue: " + lista1.Count); if (lista1.Contains(b)) { fallosMMU = fallosMMU + 1; lista1.Enqueue(b); Console.WriteLine("Fallos " + fallosMMU); } else { lista1.Enqueue(b); Console.WriteLine("Agregado sin Fallo"); } mandaraListviewMMU = "Elementos en Queue =>" + lista1.Count + " Proceso => " + b.nombreProceso + ". Fallos => " + fallosMMU; lvDetallesMMU.Items.Add(mandaraListviewMMU); } else { if (lista1.Count > 0) { lista1.Dequeue(); } Console.WriteLine("agrego en seccion 2"); Console.WriteLine("elementos en lista =>" + a.Count); Console.WriteLine("en el queue: " + lista1.Count); if (lista1.Contains(b)) { fallosMMU = fallosMMU + 1; lista1.Enqueue(b); Console.WriteLine("Fallos " + fallosMMU); } else { lista1.Enqueue(b); Console.WriteLine("Agregado sin Fallo"); } mandaraListviewMMU = "Elementos en Queue =>" + lista1.Count + " Proceso => " + b.nombreProceso + ". Fallos => " + fallosMMU; lvDetallesMMU.Items.Add(mandaraListviewMMU); } } }
public Addsa7ab(process process, Action accept, Action Cancel) { InitializeComponent(); this.DataContext = new Addsa7abiVewModel(process) { acc = accept, con = Cancel }; }
public void set_entityName(KBEngine.PropsEntity e) { process _p = (cp) => { cp.name = e.name; }; SAFE_PROCESS(e, _p); }
public processes(process process) { Name = process.Name; nowcost = process.NewCost; Code = process.Code; code_ = new Code_(Code); this.process = process; }
public void set_HP(KBEngine.PropsEntity e, float HP) { process _p = (cp) => { cp.m_HP = HP; }; SAFE_PROCESS(e, _p); }
public void set_MaxMP(KBEngine.PropsEntity e, float MP) { process _p = (cp) => { cp.m_MaxMP = MP; }; SAFE_PROCESS(e, _p); }
public void set_MaxPP(KBEngine.PropsEntity e, float PP) { process _p = (cp) => { cp.m_MaxPhysPower = PP; }; SAFE_PROCESS(e, _p); }
public ViewProcessViewModel(process process) { this.name = process.Name; this.code = process.Code; this.num = process.num; var lc = process.cards; if (lc.ToList().Count > 0) { if (lc.ToList().FirstOrDefault().card_7isab?.ToList().FirstOrDefault().visa != null) { visibility = Visibility.Hidden; } } this.date = process.date.GetDateTimeFormats()[0]; this.nowcost = process.NewCost; parts = new ObservableCollection <ItemPart>(process.parts.ToList().Select(p => new ItemPart(p) { action = (t) => { parts.Remove(t); }, action_kanoni = () => { var card = Ico.getValue <db>().GetUnivdb().card_kanoni.ToList().Where(c => c.id_part == p.Id).FirstOrDefault(); if (card == null) { Sample4Content = new AddPartCard(p, AcceptSample4Dialog, CancelSample4Dialog); OpenSample4Dialog(); } else { Ico.getValue <ContentApp>().page = new Viewkanoni(card); } } })); back = new Command(() => { Ico.getValue <ContentApp>().back(); }); addpart = new Command(() => { Ico.getValue <ContentApp>().page = new AddPart(process); }); card_s7ab = new Command(() => { Ico.getValue <ContentApp>().page = new Viewsa7ab(process); }); card_7isab = new Command(() => { // Univ.lib.Card_7isab card = new Univ.lib.Card_7isab(new processes(process)); Ico.getValue <ContentApp>().page = new View7isab(process); }); viewcardmo7sabi = new Command(() => { // Ico.getValue<ContentApp>().page = new Addmo7asbi( process); OpenSample4Dialog(); }); card_mo7asbi = new Command(() => { // Task.Run(()=> { Card_mo7sabi card = new Card_mo7sabi(new processes(process)); }); }); }
public void set_atk(KBEngine.Role e) { process _p = (_e) => { _e.SyncAtk(e.atk); }; SAFE_PROCESS(e, _p); }
public void set_run(KBEngine.Role e) { process _p = (_e) => { _e.SyncRun(e.run > 0); }; SAFE_PROCESS(e, _p); }
//=================================== // Desc: ashe hero ani sync //=================================== public void set_die(KBEngine.Role e) { process _p = (_e) => { _e.SyncDie(e.die > 0); }; SAFE_PROCESS(e, _p); }
public string executeCommand(string command, evidence evidence, process process) { constructArguments construct = new constructArguments(); Service.Service getResponse = new Service.Service(); string argument = construct.Argument(command, evidence, process); string result = getResponse.getVolatilityResponse(argument); return(result); }
//以下是辅助功能部分 private void run_Click(object sender, EventArgs e) { //showRight(pathname); outPic = new process(); if (inPic1.transToGray(out outPic, 1)) { this.outPicBox.Image = Image.FromStream(outPic.fs); isRshow = true; outPic.fs.Close(); } }
private bool ActivosAun(process a) { if (a.remainingT > 0) { return(true); } else { return(false); } }
public void Next() { String parsedData = ""; switch (_currentState) { case states.OT: switch (_data.OperationType) { case 'I': _currentState = states.I; break; case 'U': _currentState = states.U; break; case 'D': _currentState = states.D; break; } break; //Level 1 ----------------------------------------------------------------------- case states.I: switch (_data.TableName.ToLower()) { case "accountidtosystemid": _currentState = states.IT1; break; case "userbrokers": _currentState = states.IT2; break; } break; case states.D: switch (_data.TableName.ToLower()) { case "accountidtosystemid": _currentState = states.DT1; break; case "userbrokers": _currentState = states.DT2; break; } break; case states.U: switch (_data.TableName.ToLower()) { case "accountidtosystemid": _currentState = states.UT1; break; case "userbrokers": _currentState = states.UT2; break; } break; //Level 2 ----------------------------------------------------------------------- case states.IT1: //Split row old version parsedData = _data.RowOldVersion.Split(';')[0].Split('=')[1]; switch (IsFollower(parsedData)) { case true: _currentState = states.IT1F; break; case false: _currentState = states.IT1P; break; } break; case states.IT2: parsedData = _data.RowOldVersion.Split(';')[1].Split('=')[1]; switch (IsFollower(parsedData)) { case true: _currentState = states.IT2F; break; case false: _currentState = states.IT2P; break; } break; case states.UT2: // <------------ operation!!! //Update fileds _isOperation = true; commands = new process((o) => { Console.WriteLine("Update fileds"); } ); break; case states.DT1: parsedData = _data.RowOldVersion.Split(';')[0].Split('=')[1]; switch (IsFollower(parsedData)) { case true: _currentState = states.DT1F; break; case false: _currentState = states.DT1P; break; } break; case states.DT2: parsedData = _data.RowOldVersion.Split(';')[1].Split('=')[1]; switch (IsFollower(parsedData)) { case true: _currentState = states.DT2F; break; case false: _currentState = states.DT2P; break; } break; // Level 3 ----------------------------------------------------------------------------- case states.IT1F: _isOperation = true; commands = new process((o) => { Console.WriteLine("Sybscribe!!!"); } ); break; case states.IT2F: _isOperation = true; commands = new process((o) => { Console.WriteLine("Create follower object"); } ); break; case states.DT1F: _isOperation = true; commands = new process((o) => { Console.WriteLine("Unsubscribe follower"); } ); break; case states.DT1P: _isOperation = true; commands = new process((o) => { Console.WriteLine("Unsubscribe all"); } ); break; case states.DT2F: _isOperation = true; commands = new process((o) => { Console.WriteLine("Dispose follower obj"); } ); break; } }