Posts

c# - Instead of making an if() for each control type, is there a cast that will allow me to dynamically set the type of control? -

I am running through my controls on this web page again and when to modify a piece of data data I am disabling other controls on the page, such controls include textboxes, listboxes and buttons. All of these controls, so there was a way to just set its properties universal data type cast control of any kind and capable then I was thinking protected void DisableSQRcontrols (Property Control page) {foreach (Control Ctrl in Page Ctrl.Controls) if (ctrl is text box) ((text box) ctrl). Competent = false; And if (ctrl button is) ((button) ctrl). Enabled = false; And if (ctrl listbox is) ((listbox ctrl). Enabled = false; And if (ctrl.Controls.Count> 0) DisableSQRcontrols (ctrl); } I protected void disabled DisablesSQRcontrols (Control page) {foreach (page control Ctrl.Controls Ctrl) to change the top like some Want to If ((ctrl is text box) || (ctrl is button) || (ctrl is listbox)) ((universal controlcode ctrl). Competent = false; And if (ctrl.Controls.Count> 0) DisableSQRc...

security - Are passwords on modern Unix/Linux systems still limited to 8 characters? -

It was a matter of years that the Unix password was limited to 8 characters, or if you made the password more time There is no additional difference in 8 characters. Is it still on the most modern Unix / Linux system? If so, the system? Is there an easy way to tell if a given system supports the password so far and if so, then what would be the most effective (if any)? I have done something searching the web on this subject and can not really get anything definite; Whatever came up was from the early days of the 2000s, when I think the 8-character limit was still normal (or enough to adhere to that extent). Password Encryption Function can use MD5 (which can be used by the Magic Liquor prefix) in glibc2 (any modern Linux distribution) Which is then believed to be important, all input letters (see). For a simple test on your system, you can try to do something like this: $ 1 $ @@ $ '; print crypto ("> (which gives on my system) @@ nDzfhV1wWVg @@ nDzf...

c# - ASP.NET HtmlTextArea attributes and newline -

I would like to change some features of HtmlTextArea in a SharePoint web part which is developing in C #. HtmlTextArea is being used as a customized display for some SQL Server 2005 data that I am dragging and I want to change the font, color, etc. and want to do it for read-only. I think there are a few ways, such as HtmlTextArea.Attributes.Add, HtmlTextArea.Attributes.AddAttributes, and HtmlTextArea.Attributes.CssStyle, but I'm not sure how to use it properly, nor how to use them. I know that with just one ASP.NET Textaria control I can use inline CSS, so I am trying to find a way to set inline CSS inside C #. In addition to this, I would like to assist in placement, find a way to add a new line between the controls. I have put all my controls in CreateChildControls, but I do not think how I can control their placement. For example, I have something like this: protected override zero CreateChildControls () {clients = new dropdown list (); Customers.ID = "Customer...

jsf - Does rich:messages tag need to be in an a4j:region? -

I have never used a & lt; Rich: messages & gt; A & lt; Tag in the area of ​​a4j: Area & gt; Tag, sometimes I'm guessing that the message tag should be within the A4j area, but was not able to determine from the richface documents. any idea? Thanks in advance. No, there is no need Ajax area is a major AJAX component. This limiting the portion of the component tree to be processed on the server side after the AJAX request. Processing means call during decoding, validation and model update phase. The most common reasons for using an area are: Avoid repeal of JSF lifecycle processing during the validity of the unnecessary input of the given form for the given Ajax request; Showing an Individual Indicator of an Ajax Status Increasing Performance of Rendering Processing (selfRendered = "true / You can read more about this tag.

ruby on rails - Nested Has Many Through Plugin and Named Scopes -

I have a user model (: name, password, email:), and event model (: name,: etc.) and Interest Model (: Name) [> All Singles & lt;] Then I created two joining tables -> User lists and events; Each has no primary key and only includes user_id / interest_id and event_id / interest_id. [> Plural & lt;] use my model user.rb = & gt; Has_many: users_interests has_many: interests, via = & gt; : Users_interests has_many: events_interests, via = & gt; : Interests have_many: events ,: through = & gt; : Events_interests event.rb = & gt; Has_many: events_interests are_ many: interests, via = & gt; : Events_interests has_many: users_interests ,: through = & gt; : Interests have_many: users ,: through = & gt; : Users_interests interest.rb = & gt; Has_and_belongs_to_many: User has_and_belongs_to_many: events events_interests.rb = & gt; Belongs_to: Interests related: Events users_interests.rb = & gt; Related: For user related: Inter...

android - How to highlight a TextView or LinearLayout when click it? -

मेरे पास एक LinearLayout है जिसमें तीन टेक्स्ट व्यूएं हैं जब TextView पर उपयोगकर्ता क्लिक करता है तो मैं एक TextView या संपूर्ण लेआउट को हाइलाइट करना चाहता हूं। क्या यह ऐसा करने का कोई तरीका है? धन्यवाद। मैं 2 supperpose लेआउट & lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" एंड्रॉइड: layout_width = "match_parent" एंड्रॉइड: layout_height = "match_parent" एंड्रॉइड : पृष्ठभूमि = "@ रंग / सफेद" & gt; & Lt; LinearLayout Android: आईडी = "@ + आईडी / रूट" एंड्रॉइड: layout_width = "match_parent" एंड्रॉइड: layout_height = "match_parent" एंड्रॉइड: पृष्ठभूमि = "? एंड्रॉइड: एटीआर / चयन करने योग्य आईटम बैकग्राउंड" एंड्रॉइड: क्लिक करने योग्य = "सच" & gt; ... & lt; / LinearLayout & gt; & Lt; / LinearLayout & gt; findViewById (R.id.root) .setOnClickListener (...);

Can I run Ubuntu Enterprise Cloud on Sun sparc servers? -

I want to deploy private cloud using Ubuntu server 9 .10. One-SPR ISO is available My question is that none of the Cloud Packages included in 9 .10 will work on Spark hardware? I know that "Commodity hardware" usually means x86, but there are spark boxes which I have more. SN's hypervisor LDOM can be used on SPARC architecture to run Solaris VMS. As you know, UEC (Ubuntu Enterprise Cloud) comes with Ubuntu Server 910 and Nilgiri 1.6. Along with Eucalyptus, only Xen / KVM is supported and even VMWare ESX to an extent as a Hypervisor. You have to see if Eucalyptus can be configured as LDOM as a hypervisor.