Friday, 15 March 2013

javascript - Knockout JS Validation to existing view model -


यह मेरा वर्तमान कोड असम्बद्ध है:

मैं वर्तमान में दोनों & amp;

मैंने दोनों दस्तावेज के माध्यम से पढ़ा है और उन्हें अपनी मौजूदा स्क्रिप्ट पर लागू करने की कोशिश की है, दोनों सफलतापूर्वक नहीं चले गए हैं यहां मैंने नॉकआउट मान्यकरण को लागू करने का प्रयास किया है:

मेरी स्क्रिप्ट बहुत सरल है, मैं बस इस तरह के दो अवलोकनों पर सत्यापन करना चाहूंगा:

  self.emailAdd = Ko.observable ("");   

मैंने इसे ऐसा करने की कोशिश की है:

  self.emailAdd = ko.observable ("")। विस्तार ({आवश्यक: {संदेश: कृपया अपना ईमेल पता प्रदान करें। '}});    

मेरे आवेदनों के नीचे jQuery के मान्यकरण को रखा और 'सहेजने' के साथ दृश्य मॉडल का नाम बांधा गया : <पूर्व> $ ("# getAcc") मान्य करें ({submitHandler: authViewModel.save});

asp.net - Have to specify Assembly name for all class references -


VS 2010, .NET 4.0, VB, EF 4.4

In my web application deployment I had problems on server ... error "Could not load type" when I try to run it on server Googling was doing around I also found that there should not be a "App_Code" folder in my web app (shared with other corporate web sites but copying code) so I used to route all sections from App_Code to root ("BLL" One of our code libraries' namespaces) Moved Older.

Now when I VS If I run the app in the IDE then I get the error "Configuration error. Type could not be loaded 'BLL.Roles'" coming from the load of web.config. If I add the assembly name of the app in front of "BLL.Rolls"; "APNAMLLolls" I get out of this line and I get an error in the next reference of "BLL".

I have a Klein and my project is rebuilding.

Why are sections not being recognized as part of the app?

I may be wrong but I believe because you are using a web site and web No applications only Access classes that are in the App_Code folder. If you are working with a web application, then you can access sections, even if they are inside the folder. In that case you may have to move your files into a new project which is under an application format and not a web site format. I will try to move your files into a web application project.

jboss7.x - jBoss slowness in a VMWare ESXI Virtual Machine -


We have a Java EE application that runs in JBoss 7.1.1, and we have virtualmachine (like VMware ESXI)

The thing is, when we run our app in VM, the performance decreases by almost 50%.

It seems as if GC goes crazy ... so far I can tell, when GC runs, it takes more than usual "end", and in the meantime it stops the application .

Does anyone have such an experience?


Edit
  • XMX and XMS = 1 GB in JVM
  • VM has 4 GB RAM
  • Ubuntu server 64
  • Oracle JVM 64

    I would say that Before moving the app to VM with the configuration, it was running on 32 bit system and 32 bit JVM and using the same JVM parameter.

    The trick is that you have gone 64 bit with 64 bit Java but still have submitted the size of the pile of the same size to your application, what really happened is that Your app has half the memory available, which used to be 64bit jvm, each object is twice the size of one of the 32bit jvm.

    I have provided some configuration, which I recommend:

    • Increase the hep size for 2g
    • or 32bit jvm

      Use

      Given that your application does not exceed 1.3g, it thinks that the best performance will be achieved by 32 bit JVM Running with and -Xms1300m-Xmx1300m.

      You can also move forward and 32 bit VM with 32-bit Linux installation. 64 bit jvm is only useful if you need more than 1.3 caps, otherwise it only adds too much overhead.

      In addition to this, you will see jvm

        -verbose: gc - XX: + PrintGCDetails   

      this will show you what with GC It's going to be more helpful in tuning your jvm.

python - [django]: How to validate request for new account from mail? -


I have a simpler way to create a new user in Django

Also, I request that (From the user), I want to send in the administrator's email, and just the administrator can enable that account. The user has to wait an answer from the administrator. If the administrator enables that account, then the user is going to be able to use the account!

with user is_active = False , then you can easily DJGongo Adradman can filter on the panel. Or you can use the degego signal , such as the signal to send an email to the administrator's email, the email can be included with an activation link which is unique to activating the user . To keep the inactive user you can create a different model and generate a random handwriting key for each record. You can use that random-hash key (token) in the activation link that you are sending to the administrator's email.

There are already some apps that allow you to handle registrations, for example but in your case this is a bit difficult because you want administrators to activate those users. So I suggest you look at the source code. It is very clear and easy to understand. Just read the code and you get the point.

android - When is populated the listview associated to a ListFragment -


मेरे पास यह कोड एक ListFragment के अंदर है:

  TextView tv = (TextView) यह। getListView () getChildAt (0)। tv.setBackgroundColor (। getResources () getColor (R.color.White)); tv.setTextColor (। getResources () getColor (R.color.OtherColor));   

मुझे इस कोड को ऐक्टिविटी सिलेटेड पर लिखना है, लेकिन टीवी शून्य है।

अगर मैं इस कोड को अंदर लिस्ट आईटेमक्लिक में लिखता हूं, तो यह पूरी तरह से कार्य करता है।

है यह क्या दुर्बल है जो मैं चाहता हूं?

कोड:

  सार्वजनिक शून्य पर गतिविधिक्रियाकृत (बंडल सहेजे गए इन्स्टैंसस्टेट) {super.onActivityCreated (SavedInstanceState); स्ट्रिंग [] मूल्य = नया स्ट्रिंग [] {getResources ()। GetString (आर। स्ट्रिंग.मेनू_पार्टीडा), getResources ()। GetString (R.string.menu_acciones), getResources ()। GetString (R.string.menu_resultado)}; ArrayAdapter & LT; स्ट्रिंग & gt; एडेप्टर = नए अर्रे एडाप्टर & lt; स्ट्रिंग & gt; (getActivity (), आर। लय आउट.लिस्ट_इटेम_मेनू, मान); setListAdapter (अनुकूलक); }    

दृश्य केवल "सृजन" कॉलबैक के क्रियान्वयन के बाद ही आकर्षित होते हैं, वहां इस घटना के लिए कोई कॉलबैक नहीं है हालांकि आप पोस्ट () यूआई हैंडलर को एक रननबल और एक ही चीज़ प्राप्त कर सकते हैं:

  getListView ()। पोस्ट (नया रननाबल () {सार्वजनिक शून्य चला ( ) {TextView tv = (TextView) this.getListView ()। GetChildAt (0); टीवी.सेटबैकग्राम रंग (getResources ()। GetColor (R.color.White)); टी वी .सेट टेक्स्ट क्वॉलर (getResources ()। GetColor (R.color लेकिन अन्यथा, यह परिवर्तन ऐसा नहीं करेगा जो आप की उम्मीद करते हैं क्योंकि पंक्ति सूची को सूची-सूची में पुनर्नवीनीकरण किया जाता है। (स्क्रॉलिंग के दौरान आप उन्मूलन व्यवहार देखेंगे।) आपको  स्थिति 0    पर पंक्ति के लेआउट को बदलने के लिए एक कस्टम एडॉप्टर बनाना चाहिए। आप रननबल से दूर हो सकते हैं क्योंकि आपके पास केवल तीन पंक्तियाँ हैं, लेकिन सबसे अच्छा समाधान एडाप्टर का विस्तार करना है।   

backslash - Changing "/" into "\" in R -


I have to change "\" in my "R" code I have something like this:

  tmp & lt; - paste (getwd (), "tmp.xls", sep = "/")   

This is my tmp c: / study / tmp .xls

And I should have it: c: \ study \ tmp.xls

Is it possible to change it in R?

According to the update comments.

If this file is to be saved, as @gababb has suggested, you file.path () :

  File.path (getwd (), "tmp.xls")   

update 2: you want double back-slash

TMP is a string and if you want a real backslash that you have to save - though with a backslash, when r double slash (example For, when looking for a file with the path indicated by the string), it appears that double slash would be considered as one

what happens when you Cat ()

  cat ("c: \\ study \\ tmp" second slash "has disappeared"  

Basic Answer:

has an escape character in r , \ , if so If you really want to print it, then you need to escape the escape character: \\ This is what you want to put in your paste statement. P>

You can also use . $ $ Form.sep platform as your sep argument, which will make your code more portable

  Tmp & lt; - paste (getwd (), "tmp.xls", sep = .platform $ file.sep)   

If you already have a string that you want to change, you

  gsub ("/", "\\", tmp, fixed = TRUE ) Can use    

c# - Stream chaining in computing a checksum: avoiding memory issues -


I have a FileStream attached to an XML file which I would like to read directly in a SHA512 < / P>

This problem is two times:

  1. I want to leave some of the nodes in Xml
  2. The file is quite large, and the whole thing Can not load in memory

    I can read the entire file in an XML structure, delete the node, then type it into the stream that SHA512.ComputeHash < Plugged in / code> It will be a performance loss, but I like to be able to remove the nodes as an operation in some currents and then somehow combines the streams together in one stream which SHA512 ComputeHash (stream) can be passed in .

    How can I complete this?

     using  (var hash = (Var reader = XmlReader.creative ("input. Xml ") using the new SHA512Cng ()) using (var author = XmlWriter.Create (stream)) (var stream = new cryptostream (stream.null, hash, cryptostream mode.)) {While ( Reader.Read ()) {// ... write author node ...} author.flush (); stream.FlushFinalBlock (); var result = hash.hash;}