public void CreateWorker(string id, string puppetMasterUrl, string serviceUrl, string entryUrl) { Logger.LogInfo("[WORKER] " + id + " " + puppetMaster + " " + serviceUrl + " " + entryUrl); if (puppetMasterUrl != "") { Logger.LogInfo("CONTACTING PUPPET MASTER"); try { IPuppetMaster pm = (IPuppetMaster)Activator.GetObject(typeof(IPuppetMaster), puppetMasterUrl); pm.CreateWorker(id, puppetMasterUrl, serviceUrl, entryUrl); } catch (Exception ex) { if (ex is RemotingException || ex is SocketException) { Logger.LogErr("Puppet Master @ " + puppetMasterUrl + " is down. --> " + ex.Message); } } } else { IPuppetMaster p = new PM(); p.CreateWorker(id, puppetMasterUrl, serviceUrl, entryUrl); } Logger.LogInfo("Waiting 1 second for node start"); Thread.Sleep(1000); }
private readonly static AF[] s_PMtoAF = CreatePMtoAFConversionMatrix(); // Propagation-to-AceFlags conversion matrix private static PM[] CreateAFtoPMConversionMatrix() { var afToPm = new PM[16]; for ( int i = 0; i < afToPm.Length; i++ ) { afToPm[i] = PM.Invalid; } // // This table specifies what effect various combinations of inheritance bits // have on how ACEs are inherited onto child objects // Important: Not all combinations of inheritance bits are valid // afToPm[( int )( 0 | 0 | 0 | 0 )] = PM.F | 0 | 0 | 0 | 0 ; afToPm[( int )( 0 | AF.OI | 0 | 0 )] = PM.F | 0 | PM.CO | 0 | PM.GO ; afToPm[( int )( 0 | AF.OI | 0 | AF.NP )] = PM.F | 0 | PM.CO | 0 | 0 ; afToPm[( int )( 0 | AF.OI | AF.IO | 0 )] = 0 | 0 | PM.CO | 0 | PM.GO ; afToPm[( int )( 0 | AF.OI | AF.IO | AF.NP )] = 0 | 0 | PM.CO | 0 | 0 ; afToPm[( int )( AF.CI | 0 | 0 | 0 )] = PM.F | PM.CF | 0 | PM.GF | 0 ; afToPm[( int )( AF.CI | 0 | 0 | AF.NP )] = PM.F | PM.CF | 0 | 0 | 0 ; afToPm[( int )( AF.CI | 0 | AF.IO | 0 )] = 0 | PM.CF | 0 | PM.GF | 0 ; afToPm[( int )( AF.CI | 0 | AF.IO | AF.NP )] = 0 | PM.CF | 0 | 0 | 0 ; afToPm[( int )( AF.CI | AF.OI | 0 | 0 )] = PM.F | PM.CF | PM.CO | PM.GF | PM.GO ; afToPm[( int )( AF.CI | AF.OI | 0 | AF.NP )] = PM.F | PM.CF | PM.CO | 0 | 0 ; afToPm[( int )( AF.CI | AF.OI | AF.IO | 0 )] = 0 | PM.CF | PM.CO | PM.GF | PM.GO ; afToPm[( int )( AF.CI | AF.OI | AF.IO | AF.NP )] = 0 | PM.CF | PM.CO | 0 | 0 ; return afToPm; }
public void detectTest4() { IPM pm = new PM(".solution."); }
public static extern bool PeekMessage(out MSG lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax, PM wRemoveMsg);
public void Run() { Console.WriteLine("\nEnter the command: "); string command = Console.ReadLine(); if (Validation.Validation.Validations(command)) { Console.WriteLine($"Command {command} is valid."); if (command.ToLower() == "add") { Console.WriteLine("\nRole: "); string role = Console.ReadLine(); bool roleVal = Validation.Validation.ValidationRole(role); if (roleVal == false) { string enterRoleAgain; do { Console.WriteLine("Role is invalid."); Console.WriteLine("Enter a role again. "); enterRoleAgain = Console.ReadLine(); } while (enterRoleAgain != "dev" && enterRoleAgain != "ceo" && enterRoleAgain != "pm" && enterRoleAgain != "dsnr" && enterRoleAgain != "st"); if (enterRoleAgain == "dev") { DEV dev = new DEV(); dev.Role = enterRoleAgain; _devService.Add(dev); } else if (enterRoleAgain == "ceo") { CEO ceo = new CEO(); ceo.Role = enterRoleAgain; _ceoService.Add(ceo); } else if (enterRoleAgain == "pm") { PM pm = new PM(); pm.Role = enterRoleAgain; _pmService.Add(pm); } else if (enterRoleAgain == "dsnr") { DSNR dsnr = new DSNR(); dsnr.Role = enterRoleAgain; _dsnrService.Add(dsnr); } else if (enterRoleAgain == "st") { ST st = new ST(); st.Role = enterRoleAgain; _stService.Add(st); } } if (roleVal == true) { Console.WriteLine("Role is valid."); bool roleExists = Validation.Validation.IsRoleExists(); if (role.ToLower() == "ceo") { if (roleExists == false) { CEO ceo = new CEO(); { ceo.Role = role; } _ceoService.Add(ceo); } else if (roleExists == true) { Console.WriteLine("Ceo already exists, there can only be one!"); } } else if (role.ToLower() == "pm") { if (roleExists == false) { PM pm = new PM(); pm.Role = role; _pmService.Add(pm); } else if (roleExists == true) { Console.WriteLine("PM already exists, there can only be one!"); } } else if (role.ToLower() == "dev") { Console.WriteLine("\nUsername: "******"Developer with that username already exists. Please enter a new one!"); string enterUsernameAgain = Console.ReadLine(); DEV dev = new DEV(); dev.Role = role; dev.UserName = enterUsernameAgain; _devService.Add(dev); } } else if (role.ToLower() == "dsnr") { Console.WriteLine("\nUsername: "******"Designer with that username already exists. Please enter a new one!"); string enterUsernameAgain = Console.ReadLine(); DSNR dsnr = new DSNR(); dsnr.Role = role; dsnr.UserName = enterUsernameAgain; _dsnrService.Add(dsnr); } } else if (role.ToLower() == "st") { Console.WriteLine("Username: "******"Software tester with that username already exists. Please enter a new one!"); string enterUsernameAgain = Console.ReadLine(); ST st = new ST(); st.Role = role; st.UserName = enterUsernameAgain; _stService.Add(st); } } } } else if (command.ToLower() == "update") { Console.WriteLine("\nRole: "); string role = Console.ReadLine(); bool roleVal = Validation.Validation.ValidationRole(role); if (roleVal == false) { string enterRoleAgain; do { Console.WriteLine("Role is invalid."); Console.WriteLine("Enter a role again. "); enterRoleAgain = Console.ReadLine(); } while (enterRoleAgain != "dev" && enterRoleAgain != "ceo" && enterRoleAgain != "pm" && enterRoleAgain != "dsnr" && enterRoleAgain != "st"); if (enterRoleAgain == "ceo") { CEO ceo = new CEO(); ceo.Role = enterRoleAgain; _ceoService.Add(ceo); } if (enterRoleAgain == "dev") { DEV dev = new DEV(); dev.Role = enterRoleAgain; _devService.Add(dev); } } if (roleVal == true) { Console.WriteLine("Role is valid."); bool roleExists = Validation.Validation.IsRoleExists(); if (role.ToLower() == "ceo") { if (roleExists == false) { CEO ceo = new CEO(); { ceo.Role = role; } _ceoService.Add(ceo); } else if (roleExists == true) { Console.WriteLine("Ceo already exists, there can only be one!"); } } if (role.ToLower() == "dev") { DEV dev = new DEV(); dev.Role = role; _devService.Update(dev); } } } else if (command.ToLower() == "display") { _ceoService.DisplayAll(); } else if (command.ToLower() == "list") { _pmService.DisplayRole(); _devService.DisplayRole(); _dsnrService.DisplayRole(); _stService.DisplayRole(); } else if (command.ToLower() == "remove") { _ceoService.Remove(); } else if (command.ToLower() == "help") { _ceoService.Help(); } else if (command.ToLower() == "ceolist") { _ceoService.DisplayRole(); } else if (command.ToLower() == "devlist") { _devService.DisplayRole(); } else if (command.ToLower() == "pmlist") { _pmService.DisplayRole(); } else if (command.ToLower() == "dsnrlist") { _dsnrService.DisplayRole(); } else if (command.ToLower() == "stlist") { _stService.DisplayRole(); } } else { Console.WriteLine("Incorrect command! Try again."); } }
public static extern bool PeekMessage(out Message message, IntPtr handleWindow, uint wMsgFilterMin, uint wMsgFilterMax, PM wRemoveMsg);
/// <summary> /// Evaluates the model of polar motion for a nonrigid Earth due to tidal gravitation /// </summary> /// <param name="rmjd">Epoch in modified julian day for calculation of polar motion </param> /// <param name="IBAND">Parameter defining the range of periods for the terms which are included in computations; if equal to 1 only the quasi diurnal terms are computed, otherwise the full model</param> /// <returns></returns> public PM pmsdnut2(double rmjd, bool IBAND = true) // SUBROUTINE PMSDNUT2 (RMJD, PM) { /* - - - - - - - - - - - * P M S D N U T 2 * - - - - - - - - - - - * * This routine is part of the International Earth Rotation and * Reference Systems Service (IERS) Conventions software collection. * * This subroutine evaluates the model of polar motion for * a nonrigid Earth due to tidal gravitation. This polar motion * is equivalent to the so-called "subdiurnal nutation." The model * is a sum of a first order polynomial and 25 trigonometric terms * (15 long periodic and 10 quasi diurnal) with coefficients given * in Table 5.1a of the IERS Conventions (2010). * * :------------------------------------------: * : : * : IMPORTANT : * : : * : In the present version this subroutine : * : neglects the linear trend and the long : * : periodic terms of the expansion, for the : * : reasons explained in Section 5.x.x of : * : the IERS Conventions (2010), last para- : * : graph before Table 5.1. If the full : * : expansion is needed, set the parameter : * : iband to 0 instead of 1, that is replace : * : the statement : * : PARAMETER ( iband = 1 ) : * : to PARAMETER ( iband = 0 ) : * : : * :__________________________________________: * * In general, Class 1, 2, and 3 models represent physical effects that * act on geodetic parameters while canonical models provide lower-level * representations or basic computations that are used by Class 1, 2, or * 3 models. * * Status: Class 3 model * * Class 1 models are those recommended to be used a priori in the * reduction of raw space geodetic data in order to determine * geodetic parameter estimates. * Class 2 models are those that eliminate an observational * singularity and are purely conventional in nature. * Class 3 models are those that are not required as either Class * 1 or 2. * Canonical models are accepted as is and cannot be classified as * a Class 1, 2, or 3 model. * * Given: * rmjd d Time expressed as modified Julian date * * Returned: * pm d(2) Vector of length 2 (Note 1) * * Notes: * * 1) The polar motion coordinates (dx, dy) are expressed in * microarcseconds. * * Called: * FUNDARG Compute the angular fundamental arguments * * Test case: * given input: rmjd = 54335D0 ( August 23, 2007 ) * * expected output: (dx) pm(1) = 24.65518398386097942D0 microarcseconds * (dy) pm(2) = -14.11070254891893327D0 microarcseconds * * References: * * Petit, G. and Luzum, B. (eds.), IERS Conventions (2010), * IERS Technical Note No. 36, BKG (2010) * * Revisions: * 2005 March A.Brzezinski Original code * 2008 November 26 B.E.Stetzler Initial changes to code * 2008 December 01 B.E.Stetzler Provided test case * 2009 August 18 B.E.Stetzler Capitalized all variables for FORTRAN * 77 compatibility * 2010 May 14 B.E.Stetzler Replaced call to PMARGS to FUNDARG * for universal fundamental argument * subroutine * 2010 May 17 B.E.Stetzler Validated test case using internally * computed GMST and call to FUNDARG * matched previous external call to * PMARGS for all six parameters * 2010 June 23 B.E.Stetzler Modified coefficients of the long * and short period terms in polar * motion and secular polar motion * rate to coincide with Table 5.1a * ---------------------------- * D E F I N I T I O N S * ---------------------------- * iband - parameter defining the range of periods for the terms which * are included in computations; if equal to 1 only the quasi * diurnal terms are computed, otherwise the full model * iarg - array defining for each of the 25 trigonometric terms a set * of 6 integer multipliers of the fundamental angular arguments * arg - vector of the following 6 fundamental arguments used to * compute the angular argument of the trigonometric functions * arg(1:6) = [ GMST+pi, el, elp, f, d, om ]; this vector is * evaluated by the subroutine FUNDARG which is called as an * external subroutine. Originally evaluated by the subroutine * PMARGS. * period - array of periods of the trigonometric terms of expansion, in * mean solar days; only for a check - not used in computations * xs, xc - sine and cosine coefficients of the x coordinate of the pole, * in microarcseconds * ys, yc - sine and cosine coefficients of the y coordinate of the pole, * in microarcseconds * angle - angular argument of the trigonometric functions * angle = Sum(i=1:6) iarg(i,j)*arg(i), for j=1,25 */ /* Compute the periodical part of the model */ /* Coordinates of the pole are set to zero first */ PM pm = new PM { dX = 0.0, dY = 0.0 }; // PM(1) = 0D0 & PM(2) = 0D0 /* Evaluate the vector of the fundamental arguments * arg(1:6) = [ GMST+pi, el, elp, f, d, om ] at t = rmjd */ /* Convert the input epoch to Julian centuries of TDB since J2000 */ double T = (rmjd - Constants.RMJD0) / 36525.0; // T = (RMJD-RMJD0)/36525D0 /* Compute GMST + pi */ double GMST = (T * (T * (T * -6.2e-6 + .093104) + 3164400184.8128662) + 67310.54841) % 86400.0; /* GMST = MOD ( 67310.54841D0 + * . T*( (8640184.812866D0 + 3155760000D0) + * . T*( 0.093104D0 + * . T*( -0.0000062 ))), 86400D0 ) */ double L = 0.0, F = 0.0, D = 0.0, LP = 0.0, OM = 0.0; CommonFunctions.fundarg(T, ref L, ref LP, ref F, ref D, ref OM); // CALL FUNDARG ( T, L, LP, F, D, OM ) double[] arg = new double[6]; arg[0] = GMST / Constants.RAD2SEC + Constants.PI; // ARG(1) = GMST / RAD2SEC + PI arg[0] = arg[0] % Constants.TWOPI; // ARG(1) = DMOD( ARG(1), TWOPI ) arg[1] = L; // ARG(2) = L arg[2] = LP; // ARG(3) = LP arg[3] = F; // ARG(4) = F arg[4] = D; // ARG(5) = D arg[5] = OM; // ARG(6) = OM int jstart; if (IBAND) // IF (IBAND.EQ.1) THEN { jstart = 15; // JSTART = 16 } else // ELSE { jstart = 0; // JSTART = 1 } for (int j = jstart; j < 25; ++j) // DO 20 J=JSTART,25 { /* For the j-th term of the trigonometric expansion, compute the angular * argument angle of sine and cosine functions as a linear integer * combination of the 6 fundamental arguments */ double angle = 0.0; // ANGLE = 0D0 for (int i = 0; i < 6; i++) // DO 10 I=1,6 { angle += data.iarg[j, i] * arg[i]; // ANGLE = ANGLE + IARG(I,J) * ARG(I) } angle = angle % Constants.TWOPI; // ANGLE = DMOD( ANGLE, TWOPI ) /* Compute contribution from the j-th term to the polar motion coordinates */ double sa = Math.Sin(angle); double ca = Math.Cos(angle); pm.dX += data.xs[j] * sa + data.xc[j] * ca; // PM(1) = PM(1) + XS(J)*DSIN(ANGLE) + XC(J)*DCOS(ANGLE) pm.dY += data.ys[j] * sa + data.yc[j] * ca; // PM(2) = PM(2) + YS(J)*DSIN(ANGLE) + YC(J)*DCOS(ANGLE) } // 20 CONTINUE if (IBAND) // IF (IBAND.EQ.1) RETURN { return new PM { dX = pm.dX * dConversion, dY = pm.dY * dConversion } } ; /* Add the secular term of the model */ pm.dX += data.xrate * (rmjd - Constants.RMJD0) / 365.25; // PM(1) = PM(1) + XRATE * (RMJD-RMJD0) / 365.25D0 pm.dY += data.yrate * (rmjd - Constants.RMJD0) / 365.25; // PM(2) = PM(2) + YRATE * (RMJD-RMJD0) / 365.25D0 return(new PM { dX = pm.dX * dConversion, dY = pm.dY * dConversion }); // RETURN } }
public void GetUserInfo(ExPlanet[] spExPlanet) { try { HtmlElement dom = _WB.Document.GetElementById("fleetstatusrow"); HtmlElement tt = dom.Parent.Parent;//到这里获得表格对象 // TxtShowWeb.Text = tt.Children[0].Children[2].Children[0].InnerText; for (int i = 0; i <= 14; i++) { try { spExPlanet[i].Galaxy = Convert.ToInt32(_GalaxySystem.GetGalaxy()); //银河 spExPlanet[i].System = Convert.ToInt32(_GalaxySystem.GetSystme()); //太阳系 spExPlanet[i].Location = Convert.ToInt32(tt.Children[0].Children[i + 2].Children[0].InnerText.Trim()); //位置 spExPlanet[i].PlanetName = tt.Children[0].Children[i + 2].Children[2].InnerText; //玩家名字 } catch (Exception ee) { _Log.AddError("<GetUserInfo-星系星系>" + ee.Message); } if (tt.Children[0].Children[i + 2].Children[3].InnerHtml != null)//月球状态 { try { string MoonInfo = tt.Children[0].Children[i + 2].Children[3].InnerHtml; if (MoonInfo.IndexOf(_SerInfo.Moon) != -1) { spExPlanet[i].Moon = true; MoonInfo = MoonInfo.Substring(MoonInfo.IndexOf(_SerInfo.MoonSize) + _SerInfo.MoonSize.Length); MoonInfo = MoonInfo.Substring(0, MoonInfo.IndexOf(_SerInfo.MoonSizeEnd)); if (MoonInfo.IndexOf(".") > -1) { spExPlanet[i].MoonSize = Convert.ToInt32(MoonInfo.Replace(".", "").Trim()); } else { spExPlanet[i].MoonSize = Convert.ToInt32(MoonInfo.Trim()); } } } catch (Exception ee) { _Log.AddError("<GetUserInfo-月球状态>" + ee.Message); } } if (tt.Children[0].Children[i + 2].Children[4].InnerHtml != null)//垃圾情况 { try { string Wreckage = tt.Children[0].Children[i + 2].Children[4].InnerHtml; Wreckage = Wreckage.Substring(Wreckage.IndexOf(_SerInfo.Metal) + _SerInfo.Metal.Length); spExPlanet[i].Metal = Convert.ToInt32(Wreckage.Substring(0, Wreckage.IndexOf(_SerInfo.WreckageEnd)).Replace(".", "").Trim()); Wreckage = Wreckage.Substring(Wreckage.IndexOf(_SerInfo.Crystal) + _SerInfo.Crystal.Length); spExPlanet[i].Crystal = Convert.ToInt32(Wreckage.Substring(0, Wreckage.IndexOf(_SerInfo.WreckageEnd)).Replace(".", "").Trim()); } catch (Exception ee) { _Log.AddError("<GetUserInfo-月球状态>" + ee.Message); } } else { spExPlanet[i].Metal = 0; spExPlanet[i].Crystal = 0; } //用户名 try { spExPlanet[i].Username = tt.Children[0].Children[i + 2].Children[5].InnerText; if (tt.Children[0].Children[i + 2].Children[5].Children != null) { foreach (HtmlElement HE in tt.Children[0].Children[i + 2].Children[5].Children) { switch (HE.InnerText) { case "s":; break; case "i": spExPlanet[i].Inactive = true; break; case "I": spExPlanet[i].LongInactive = true; break; case "u": spExPlanet[i].Vacation = true; break; case "g": spExPlanet[i].Banned = true; break; case "n": spExPlanet[i].Username += "(n)"; break; //小绿人 case "v": spExPlanet[i].Vacation = true; //英国服务器的假期 break; case "b": spExPlanet[i].Banned = true; //英国服务器的被封 break; default: spExPlanet[i].Username = HE.InnerText; break; } } } } catch (Exception ee) { _Log.AddError("<GetUserInfo-用户信息>" + ee.Message); } try { if ((spExPlanet[i].Username != "") && (spExPlanet[i].Username != null)) { string PM; PM = tt.Children[0].Children[i + 2].Children[5].InnerHtml; string TmpPM = PM.Substring(PM.IndexOf(_SerInfo.Rankings) + _SerInfo.Rankings.Length, PM.IndexOf(_SerInfo.td) - PM.IndexOf(_SerInfo.Rankings) - _SerInfo.Rankings.Length).Trim(); if (TmpPM.Length == 0) { spExPlanet[i].Rankings = 0; } else { spExPlanet[i].Rankings = Convert.ToInt32(TmpPM); } } } catch (Exception ee) { _Log.AddError("<GetUserInfo-用户排名信息>" + ee.Message); } try { spExPlanet[i].Union = tt.Children[0].Children[i + 2].Children[6].InnerText; if ((spExPlanet[i].Union != "") && (spExPlanet[i].Union != null)) { string LM; LM = tt.Children[0].Children[i + 2].Children[6].InnerHtml; string TmpPM = LM.Substring(LM.IndexOf(_SerInfo.Rankings) + _SerInfo.Rankings.Length, LM.IndexOf(_SerInfo.Have) - LM.IndexOf(_SerInfo.Rankings) - _SerInfo.Rankings.Length).Trim(); if (TmpPM.Length == 0) { spExPlanet[i].UnionRankings = 0; } else { spExPlanet[i].UnionRankings = Convert.ToInt32(TmpPM); } spExPlanet[i].Members = Convert.ToInt32(LM.Substring(LM.IndexOf(_SerInfo.Have) + _SerInfo.Have.Length, LM.IndexOf(_SerInfo.Members) - LM.IndexOf(_SerInfo.Have) - _SerInfo.Have.Length).Trim()); } } catch (Exception ee) { _Log.AddError("<GetUserInfo-联盟信息>" + ee.Message); } } } catch (Exception ee) { _Log.AddError("<GetUserInfo>" + ee.Message); } }
public IActionResult GetProdWriterMovie([FromRoute, SwaggerParameter("Id of Person", Required = true)] int id) { PersonMovieListProdWrit personMovieListProdWrit = new PersonMovieListProdWrit(); personMovieListProdWrit.person = Service.Get(id).ToApi(); personMovieListProdWrit.personProdWritMovies = Service.GetPersonProdWritMovies(id).Select(PM => PM.ToApi()); return(Ok(personMovieListProdWrit)); }
public void LLVMTest2() { LLVM.LinkInMCJIT(); LLVM.InitializeX86TargetMC(); LLVM.InitializeX86Target(); LLVM.InitializeX86TargetInfo(); LLVM.InitializeX86AsmParser(); LLVM.InitializeX86AsmPrinter(); var mod = LLVMModuleRef.CreateWithName("Test1"); var options = LLVMMCJITCompilerOptions.Create(); options.NoFramePointerElim = 1; var engine = mod.CreateMCJITCompiler(ref options); var builder = mod.Context.CreateBuilder(); var lexicals = new List <LexicalElement>(); var globals = new LLVMSymbolTable(null); globals.Add("z", mod.AddGlobal(LLVMTypeRef.Int32, "z")); object z = 0; var handle = GCHandle.Alloc(z, GCHandleType.Pinned); engine.AddGlobalMapping(globals["z"], handle.AddrOfPinnedObject()); using (var fs = new FileStream("D:\\Repos\\PascalCompiler\\SyntaxAnalyzerTest\\test_source2.txt", FileMode.Open)) { using (var ss = new StreamReader(fs)) { var l = new LexerStateMachine(ss); l.AdvanceChar(); LexicalElement t; while ((t = l.NextToken()) != null) { if (t is LineFeedElement) { continue; } lexicals.Add(t); } } } var history = new List <ParserConfiguration>(); var exceptions = new List <SyntaxException>(); SyntaxNode treeRoot; var generator = new Generator(PascalDefinition.ProductionRules); var slr1Table = generator.Generate(PascalDefinition.NonTerminalKey.Start); slr1Table.AllowedErrorRecoveryKey.Add(PascalDefinition.NonTerminalKey.Statement, () => new StatementNode(new SyntaxNode[0])); var slr1Driver = new Slr1Driver(slr1Table); treeRoot = slr1Driver.Parse(new Queue <LexicalElement>(lexicals), CommonUtils.Closure( new HashSet <Item>() { new Item() { ProductionRule = PascalDefinition.ProductionRules[0], Cursor = 0 } }, generator.ProductionDict), typeof(SNode), history, exceptions); var translator = new LLVMTranslator.LLVMTranslator(mod, engine, builder, globals); translator.Visit(treeRoot); if (!mod.TryVerify(LLVMVerifierFailureAction.LLVMPrintMessageAction, out var error)) { Trace.WriteLine(error); } Trace.WriteLine(mod.PrintToString()); PM a = engine.GetPointerToGlobal <PM>(translator.func); a(); builder.Dispose(); engine.Dispose(); handle.Free(); }
public static extern bool PeekMessage(out MSG message, IntPtr handle, uint filterMin, uint filterMax, PM flags);
/// <summary> /// /// </summary> protected override void DoWork(CodeActivityContext context) { var patId1 = PatId.Get(context); var patient = Patient.GetEntityByID(patId1, PM); if (patient.IsNullEntity) { return; } short?docType = null; var docTypeTemp = DocType.Get(context); if (docTypeTemp.HasValue) { docType = (short)docTypeTemp.Value; } var dictId = DictatedBy.Get(context); if (dictId == 0) { return; } int?reviewId = null; int temp = ReviewRequiredBy.Get(context); if (temp > 0) { reviewId = temp; } int?cosignId = null; temp = CoSignRequiredBy.Get(context); if (temp > 0) { cosignId = temp; } int?transId = null; temp = TranscribedBy.Get(context); if (temp > 0) { transId = temp; } var encounterTemp = EncounterDate.Get(context); if (!encounterTemp.HasValue) { return; } var encounterDate = encounterTemp.Value; var transcribedDate = TranscribedDate.Get(context); var instId = Department.Get(context); var accountId = Account.Get(context); var template = Template.Get(context); var openAfterCreation = OpenAfterCreation.Get(context).Key == (int)OpenAfterCreationOptions.Yes; var status = (byte)Status.Get(context); if (CreateIfDuplicateExists.Get(context).Key == (int)CreateIfDuplicateExistsOptions.No) { // Check for a duplicate encounter var query = new ImpacRdbQuery(typeof(ObjectTable)); query.AddClause(ObjectTableDataRow.Pat_ID1EntityColumn, EntityQueryOp.EQ, patId1); query.AddClause(ObjectTableDataRow.DocTypeEntityColumn, EntityQueryOp.EQ, docType); query.AddClause(ObjectTableDataRow.Dict_IDEntityColumn, EntityQueryOp.EQ, dictId); query.AddClause(ObjectTableDataRow.Review_IDEntityColumn, EntityQueryOp.EQ, reviewId); query.AddClause(ObjectTableDataRow.CoSig_IDEntityColumn, EntityQueryOp.EQ, cosignId); query.AddClause(ObjectTableDataRow.Trans_IDEntityColumn, EntityQueryOp.EQ, transId); // Defect 11605, the Encounter_DtTm and Trans_DtTm store date time rather than the previous date part // so we should check items if it exists within the day of datetime query.AddClause(ObjectTableDataRow.Encounter_DtTmEntityColumn, EntityQueryOp.Between, encounterDate.Date, encounterDate.Date.AddDays(1)); if (transcribedDate.HasValue) { query.AddClause(ObjectTableDataRow.Trans_DtTmEntityColumn, EntityQueryOp.Between, transcribedDate.Value.Date, transcribedDate.Value.Date.AddDays(1)); } query.AddClause(ObjectTableDataRow.Inst_IDEntityColumn, EntityQueryOp.EQ, instId); query.AddClause(ObjectTableDataRow.Account_IDEntityColumn, EntityQueryOp.EQ, accountId); query.AddClause(ObjectTableDataRow.DocumentTemplateEntityColumn, EntityQueryOp.EQ, template); var objectEntity = PM.GetEntity(query); if (objectEntity != null && !objectEntity.IsNullEntity) { return; } } EscribeOperations.CreateDocument(patId1, docType, dictId, reviewId, cosignId, transId, encounterDate, transcribedDate, instId, accountId, template, status, openAfterCreation); }
/// <summary> /// Function to get a list of movie by person (Product or Writer) /// </summary> /// <param name="id">int id of person</param> /// <returns>PersonProdWritMovie</returns> public IEnumerable <PersonProdWritMovie> GetPersonProdWritMovies(int id) { return(Repository.GetPersonProdWritMovies(id).Select(PM => PM.ToClient())); }