Posts

exception - Good Patterns For VBA Error Handling -

Are there some good patterns to deal with error in VBA? Specifically, what I should do is this situation: ... some code ... ... some code where an error may occur ... ... some code ... ... some other code where a different error could occur ... ... some other code ... ... some code that should always be run (like the end block). .. I want to handle both errors, and resume the execution of the error after the code can occur. Also, at the end, the code should always run at the end - before an exception has been thrown before. How can I get this result? error handling in VBA Get on error error handler label resume ( next | error handler label ) error goto 0 (current error handler disabled) er Object Resets the property properties normally to zero or zero-strings, which is in the error handling routine, but this Psht the error. Clear . Error handling routine ending errors. Category 513-65535 User Errors are available for custom class errors...

c# - Is this locking Okay? -

मेरे पास तालिका है जिसमें अनुक्रम संख्या है तालिका संरचना अनुक्रम जनरेटर साल के अंत महीने का महीना intNetNumber int वर्ष + महीना प्राथमिक कुंजी बनाते हैं अनुक्रम हर महीने रीसेट हो जाता है। मैं डीएएल उत्पन्न करने के लिए सबसोनिक का उपयोग कर रहा हूं। अगले अनुक्रम संख्या प्राप्त करने के लिए मैंने एक वर्ग लिखा है जो अनुरोधकर्ताओं के लिए अगले नंबर देता है: निजी स्थिर पढ़ने के लिए ऑब्जेक्ट _ लॉक = नया ऑब्जेक्ट (); निजी स्थिर रीडोनली स्ट्रिंग FormatString = "{0} {1} {2} {3}"; निजी स्थिर रीडोनली स्ट्रिंग संख्याफ़ॉर्मेट = "000000"; सार्वजनिक स्थिर वस्तु GetNextNumber (स्ट्रिंग उपसर्ग) {ताला (_ लॉक) {int yr = DateTime.Now.Year; इंट महीने = दिनांक समय.अब.माँथ; अनुक्रम जनरेटर संकलन col = नया अनुक्रम जनरेटर चयन ()। जहां (अनुक्रम जनरेटर। कॉलम। साल, तुलना। एक््वल, यार)। जहां (अनुक्रम जनरेटर। कॉलम। मौन, तुलना। एक्लॉल्स्, महीना) .लोड (); If (col == रिक्त || col.Qount == 0) {सीक्वेंस जनरेटर tr = नया अनुक्रम जनरेटर (); Tr.Year = yr; Tr.Month = माह; टीआर। NextNumber = 1...

How to copy external CSS and JavaScript in XSLT -

मेरे पास एक XSL रूपांतरण है जो एचटीएमएल का उत्पादन करता है। head तत्व में मेरे पास एक सीएसएस फ़ाइल संदर्भ है। & lt; link rel = "stylesheet" प्रकार = "text / css" href = "css / styles सीएसएस "/ & gt; मैं बाहरी संदर्भों के बिना एक स्टैंडअलोन HTML परिणाम बनाना चाहूंगा और इस प्रकार मैं बाहरी सीएसएस संदर्भों को शामिल करना चाहूंगा। कोड दोहराव को रोकने के लिए, मैं हार्ड कोड को शैलियों को XSLT टेम्पलेट में नहीं करना चाहता, इसलिए मैं सीएसएस फ़ाइल की फाइल सामग्री की प्रतिलिपि बनाने के लिए कुछ एक्सएसएलटी कमांड की तलाश कर रहा हूं। मुझे पता है xsl: शामिल या xsl: import काम नहीं करेगा, क्योंकि उन्हें एक्सएसएलटी फाइल की उम्मीद है न तो & lt; xsl: copy-of select = "document ('css / styles.css')" / & gt; क्योंकि यह कुछ एक्सएमएल आज्ञाकारी की अपेक्षा करता है। मेरे पास कुछ जावास्क्रिप्ट कार्य घोषणाएं भी हैं जो मैं भी प्रतिलिपि बनाना चाहूंगा। क्या यह शुद्ध XSLT के साथ संभव है, या मुझे एक्सएसएलटी फ़ाइल (या एचटीएमएल फ़ाइ...

SQL conditional SELECT -

I would like to create a stored procedure with parameters that indicate which field should be selected. I would like to pass two parameters "selectField1" and "selectField2" each as bools. I want something SELECT if (selectField1 = true) field 1 Do not select ELSE field 1 (selectField2 = true) Field 2 of field 2 from ELSE table Want the ability to return the areas with permission, which means that the number of returning areas should also be dynamic. It will work with 2 variables. More than anything else will be confused. Choose Selection (selectfield1 = true and selectField2 = true) Select field 1, from field 2 to the table end (selectField1 = true) Start Select from Table 1 Field 1 Select first (selectField2 = true) SELECT field from end field 2 This example will help with dynamic SQL multiples is true, at least 1 column is assuming. announcement @ sql varchar (MAX) SET @sql = 'select' IF (selectField1 = true) BEGIN SET @sql = @sql + ...

Making a TFS Branch Read-Only -

We are trying to follow the strategy of the branches and have reached this point where we represent a release With a branch that should now be read-only. For Branches | In the Security tab, it presents six user groups, each of which has 10 permissions in addition to reading, do I have to go through them and prohibit 60 check boxes, or this branch is a better way to read only ? Right-click the branch in the Source Control Explorer, and lock ... option Edit: It is missing a lot when people are finding it, so I will make it more clear. Lock locks in the form of a "pending change" for the person locking the item. Unless the lock is in effect, it will appear as a pending change. When one committed committed to that pending change, the lock continues . While lock is in effect, the lock branch is effectively read only, because (easy to do) locker is the only user who can commit. h / t @AakashM to be shown in the comment

c# - Keep MEX binding insecure while securing HTTP binding w/ UsernamePasswordValidator? -

After We are using Username PasswordValidator with a certificate to secure access to our WCF services. However, the custom authorization policies we are using are SERVICE behaviors, not endpoint behavior, so they apply to all end points, including the MEX endpoint. Want to be able to obtain and receive service references using Visual Studio without commenting, but since both Mex and wshttp endpoint are secure, then we "Add Service Service" .. " Is there any way around this? Is it binding on both of you? If so, try 2 separate bindings - one for MEX endpoint and one for wshttp: For service - something like this: & lt; wsHttpBinding & gt; Binding name = "wsHttpBindingMessageUname" & gt; Security mode = "Message" & gt; Message client CredentialType = "UserName" chat serviceCredential = "True" install securitycontax = "false" /> gt; & lt; / force Kari & gt; & lt; / wsHttpBindi...

jboss - accessing request parameters from inside validator -

Is there a proper way to access other form fields from an accredited user? context.getViewRoot (). FindComponent ("formid: exampleField: Example")? fe I'm going to be a valid investigator checking whether the city's area and country is within a custom verifier. Your question again and again I am going to explain it as: "You want to write a custom legalization that checks that if a city area is present, then the area of ​​the country is equivalent to 'US'." First create a Vatilator interface: @documented @ validate class (value = countryAcclasUS.L. . Class) @ Target (Elimenttaip. Tiipii) @ Riseteshn (retention policy. Aryuentiim) public @ interface Kantryaeclsss [string message () should be the country to default, "the city of the country"; } Then create a valid category: Public category country User OAVaider Applicant accredited & lt; CountryEqualsUS & gt; {Public Zero Start (country features arg0) {} P...