public Machine(Form uiForm) { picDevice = new PIC8259(); vgaDevice = new VGA(); FloppyDrive = new Floppy(); dmaController = new DMAController(); keyboard = new KeyboardDevice(); ataDevice = new ATA(); if (SystemConfig.Machine.Floppies.Count > 0) { FloppyDrive.MountImage(SystemConfig.Machine.Floppies[0].Image); } switch (Settings.Default.graphics.ToUpper()) { //case "XNA": // throw new Exception("XNA not supported OwO"); // //gui = new XNAUI(uiForm, vgaDevice); // break; //case "SDL": // gui = new SDLUI(uiForm, vgaDevice); // break; } gui = new SHARPDX(uiForm, vgaDevice); // SharpDX it is //gui = new ASCII(uiForm, vgaDevice); // ASCII test Application.Idle += new System.EventHandler(ApplicationIdle); gui.KeyDown += new EventHandler <UIntEventArgs>(GUIKeyDown); gui.KeyUp += new EventHandler <UIntEventArgs>(GUIKeyUp); gui.Init(); devices = new IDevice[] { FloppyDrive, new CMOS(ataDevice), new Misc(), new PIT8253(), picDevice, keyboard, dmaController, vgaDevice, ataDevice }; CPU = new CPU.CPU(); picDevice.Interrupt += PicDeviceInterrupt; SetupSystem(); CPU.IORead += CPUIORead; CPU.IOWrite += CPUIOWrite; }
/// <summary> /// Initializes storage components /// </summary> private static unsafe void initStorage() { Disk.Init(); // Init partition schemes GPT.Register(); MBR.Register(); // Init filesystems Fat16.Register(); AHCI.Init(); ATA.Init(); NVMe.Init(); PacketFS.Init(); }
// constructor public RidgeRegression(int n, double penalty = 10e-5) { this.N = n; this.Penalty = penalty; // initialize all matrices and vectors this.ATA = new Matrix <double>(n, n); ATA.SetIdentity(new MCvScalar(penalty)); // add regulation weights ATA[n - 5, n - 5] = 0; // bias term has no regulation this.ATb = new Matrix <double>(n, 1); ATb.SetZero(); this.W = new Matrix <double>(n, 1); W.SetZero(); this.Inv = new Matrix <double>(n, n); Inv.SetZero(); }
/// <summary> /// Prints the item report /// </summary> /// <returns>The item report</returns> public override string ItemReport() { string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n"; report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n"; report += "\n"; if (HP != 0) { report += "HP: " + HP.ToString() + "\n"; } if (TP != 0) { report += "TP: " + TP.ToString() + "\n"; } if (ATP != 0) { report += "ATP: " + ATP.ToString() + "\n"; } if (DFP != 0) { report += "DFP: " + DFP.ToString() + "\n"; } if (MST != 0) { report += "MST: " + MST.ToString() + "\n"; } if (ATA != 0) { report += "ATA: " + ATA.ToString() + "\n"; } if (EVP != 0) { report += "EVP: " + EVP.ToString() + "\n"; } if (LCK != 0) { report += "LCK: " + LCK.ToString() + "\n"; } if (EFR != 0) { report += "EFR: " + EFR.ToString() + "\n"; } if (EIC != 0) { report += "EIC: " + EIC.ToString() + "\n"; } if (ETH != 0) { report += "ETH: " + ETH.ToString() + "\n"; } if (ELT != 0) { report += "ELT: " + ELT.ToString() + "\n"; } if (EDK != 0) { report += "EDK: " + EDK.ToString() + "\n"; } report += "\n"; report += "HUmar: " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n"; report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n"; report += "HUcast: " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n"; report += "HUcaseal: " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n"; report += "RAmar: " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n"; report += "RAmarl: " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n"; report += "RAcast: " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n"; report += "RAcaseal: " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n"; report += "FOmar: " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n"; report += "FOmarl: " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n"; report += "FOnewm: " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n"; report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n"; return(report); }
public virtual int _GetUniqueIdentifier() { var hashCode = 399326290; hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdID?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdOrderID_Remote?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdOrderExternalCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdOrderDescr?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdRegDateTime?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDateTime?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDeliveryDateTime?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDepositorCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDepositorFullName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdCustomerCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdCustomerFullName?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdStatus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdMemo?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdPurpose?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDeliveryValue?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDeliveryNotes?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdIsReturn?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdPrdTypeDescr?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdWrhRoutingCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDlsId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDlsDescr?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDlsAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDlsZipCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDlsCity?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdDlsArea?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdRoutingStatus?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdWeight?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdVol?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdCtn?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdBar?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdPalEuro?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdPalInd?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdPalElsa?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdParOU?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLfdVar?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVoucherDateTime?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVoucherNumber?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVoucherSeries?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVoucherId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdAgencyCode?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdAgencyDescr?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdAgencyAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdTelRouteId?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVchPlateNr?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVchRouteNr?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVhrDate?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdVhrID?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdLastUpdateDateTime?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdReadyForLoading?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (OrdStatusString?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Polyline?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Warehouse?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (Truck?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (WarehouseAddress?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ETA?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (ATA?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestLat?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (DestLong?.GetHashCode() ?? 0); hashCode = hashCode * -1521134295 + (COE?.GetHashCode() ?? 0); return(hashCode); }
/// <summary> /// Prints the item report /// </summary> /// <returns>The item report</returns> public override string ItemReport() { string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n"; report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n"; if (RequirementLevel != 0) { report += "Requirement: Level " + RequirementLevel + " \n"; } if (Type == ItemType.Frame) { report += "Slots: " + Slots.ToString() + "\n"; } report += "Base DFP: " + DFP.ToString() + "\n"; report += "Base EVP: " + EVP.ToString() + "\n"; report += "DFP Roll: " + VariableDFP.ToString() + "/" + (MaxDFP - DFP).ToString() + "\n"; report += "EVP Roll: " + VariableEVP.ToString() + "/" + (MaxEVP - EVP).ToString() + "\n"; report += "\n"; if (HP != 0) { report += "HP: " + HP.ToString() + "\n"; } if (TP != 0) { report += "TP: " + TP.ToString() + "\n"; } if (ATP != 0) { report += "ATP: " + ATP.ToString() + "\n"; } if (MST != 0) { report += "MST: " + MST.ToString() + "\n"; } if (ATA != 0) { report += "ATA: " + ATA.ToString() + "\n"; } if (LCK != 0) { report += "LCK: " + LCK.ToString() + "\n"; } if (EFR != 0) { report += "EFR: " + EFR.ToString() + "\n"; } if (EIC != 0) { report += "EIC: " + EIC.ToString() + "\n"; } if (ETH != 0) { report += "ETH: " + ETH.ToString() + "\n"; } if (ELT != 0) { report += "ELT: " + ELT.ToString() + "\n"; } if (EDK != 0) { report += "EDK: " + EDK.ToString() + "\n"; } report += "\n"; report += "HUmar: " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n"; report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n"; report += "HUcast: " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n"; report += "HUcaseal: " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n"; report += "RAmar: " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n"; report += "RAmarl: " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n"; report += "RAcast: " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n"; report += "RAcaseal: " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n"; report += "FOmar: " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n"; report += "FOmarl: " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n"; report += "FOnewm: " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n"; report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n"; return(report); }
/// <summary> /// Prints the item report /// </summary> /// <returns>The item report</returns> public override string ItemReport() { string report = ItemReaderText + "\n" + "Hex: " + HexString + "\n\n"; report += "Type: " + Enum.GetName(typeof(ItemType), Type) + "\n"; report += "Weapon Type: " + Enum.GetName(typeof(WeaponType), WeaponType) + "\n"; if (RequirementATP != 0) { report += "Requirement: " + RequirementATP + " ATP\n"; } else if (RequirementATA != 0) { report += "Requirement: " + RequirementATA + " ATA\n"; } else if (RequirementMST != 0) { report += "Requirement: " + RequirementMST + " MST\n"; } report += "Grind: " + Grind.ToString() + "/" + MaxGrind.ToString() + "\n"; report += "Special: " + Enum.GetName(typeof(SpecialType), Special) + "\n"; report += "ATP: " + MinATP.ToString() + "-" + MaxATP.ToString() + "\n"; report += "ATA: " + ATA.ToString() + "\n"; if (HP != 0) { report += "HP: " + HP.ToString() + "\n"; } if (TP != 0) { report += "TP: " + TP.ToString() + "\n"; } if (DFP != 0) { report += "DFP: " + DFP.ToString() + "\n"; } if (MST != 0) { report += "MST: " + MST.ToString() + "\n"; } if (EVP != 0) { report += "EVP: " + EVP.ToString() + "\n"; } if (LCK != 0) { report += "LCK: " + LCK.ToString() + "\n"; } if (EFR != 0) { report += "EFR: " + EFR.ToString() + "\n"; } if (EIC != 0) { report += "EIC: " + EIC.ToString() + "\n"; } if (ETH != 0) { report += "ETH: " + ETH.ToString() + "\n"; } if (ELT != 0) { report += "ELT: " + ELT.ToString() + "\n"; } if (EDK != 0) { report += "EDK: " + EDK.ToString() + "\n"; } report += "\n"; report += "Native: " + NativePercentage.ToString() + "%\n"; report += "A. Beast: " + ABeastPercentage.ToString() + "%\n"; report += "Machine: " + MachinePercentage.ToString() + "%\n"; report += "Dark: " + DarkPercentage.ToString() + "%\n"; report += "Hit: " + HitPercentage.ToString() + "%\n"; report += "\n"; report += "HUmar: " + (((EquipMask & HUmarMask) > 0) ? "x" : "") + "\n"; report += "HUnewearl: " + (((EquipMask & HUnewearlMask) > 0) ? "x" : "") + "\n"; report += "HUcast: " + (((EquipMask & HUcastMask) > 0) ? "x" : "") + "\n"; report += "HUcaseal: " + (((EquipMask & HUcasealMask) > 0) ? "x" : "") + "\n"; report += "RAmar: " + (((EquipMask & RAmarMask) > 0) ? "x" : "") + "\n"; report += "RAmarl: " + (((EquipMask & RAmarlMask) > 0) ? "x" : "") + "\n"; report += "RAcast: " + (((EquipMask & RAcastMask) > 0) ? "x" : "") + "\n"; report += "RAcaseal: " + (((EquipMask & RAcasealMask) > 0) ? "x" : "") + "\n"; report += "FOmar: " + (((EquipMask & FOmarMask) > 0) ? "x" : "") + "\n"; report += "FOmarl: " + (((EquipMask & FOmarlMask) > 0) ? "x" : "") + "\n"; report += "FOnewm: " + (((EquipMask & FOnewmMask) > 0) ? "x" : "") + "\n"; report += "FOnewearl: " + (((EquipMask & FOnewearlMask) > 0) ? "x" : "") + "\n"; return(report); }