• for..in loops iterate over the entire prototype chain, which is virtually never what you want. 意思是使用for..in会遍历整个原型链，这样不是很好的实现方法，推荐使用Object.keys formRules:{ name:true,...
for..in loops iterate over the entire prototype chain, which is virtually never what you want.

意思是使用for..in会遍历整个原型链，这样不是很好的实现方法，推荐使用Object.keys

formRules: {
name: true,
cardType: true,
certificateNo: true
},
formData: {
name: '',
certificateType: '',
certificateNo: ''
}

源代码：

for (const key in this.formData) {
if (!this.formData[key]) { this.formRules[key] = false; valid = false }
if (this.formData[key]) this.formRules[key] = true
}

修改后的代码：

Object.keys(this.formData).forEach(key => {
if (!this.formData[key]) { this.formRules[key] = false; valid = false }
if (this.formData[key]) this.formRules[key] = true
})


展开全文
• http://blog.dictionary.com/octothorpe/... What Is the Real Name of the #? On Facebook and Twitter, you tag your friends with the @ symbol and topics with the #. If you see something that sa...
http://blog.dictionary.com/octothorpe/

What Is the Real Name of the #?

On Facebook and Twitter, you tag your friends with the @ symbol and topics with the #. If you see something that says #WordoftheDay, the tweet or post will concern the Word of the Day in some way. But what do you call the # symbol? Where did it come from? Its myriad names and its appearance are intertwined.
The # symbol is commonly called the pound sign, number sign and more recently the hashtag. It is called the pound sign because the symbol comes from the abbreviation for weight, lb, or “libra pondo” literally “pound by weight” in Latin. When writing lb, it was not uncommon for scribes to cross the letters across the top with a line across the top, like a t. See the example below.
The phrase “number sign” arose in Britain because “pound sign” could easily be confused with the British currency. The # symbol is sometimes spoken as the word “number” as in the word “number two pencil.”

But what is its official name? The octothorpe. What does that mean? It’s actually a made-up word. It was invented in the same laboratories where the telephone came from. The scientists at Bell Laboratories modified the telephone keypad in the early 1960s and added the # symbol to send instructions to the telephone operating system. Since the # symbol didn’t have a name, the technicians made one up. They knew it should be called “octo-” something because it has eight ends around the edge. But how to make “octo” into a noun? What happened next is not entirely clear. According to one report, Bell Lab employee Don MacPherson named it after the Olympian Jim Thorpe. Another former employee claims it was a nonsense word that is a joke. Another unverifiable report is much more etymologically satisfying. The Old Norse word “thorpe” meant “farm or field”, so octothorpe literally means “eight fields.”
The word hash predates these other terms but was not very popular until recently. (Maybe because it reminds us of mediocre diner food.) It first referred to stripes on military jackets as early as 1910. In the 1980s, it came to refer to the # symbol. Since the ascent of social media, hashtag has become the favored word for the # symbol.
Similar symbols appear in many other places. Musicians recognize # as the sharp symbol, denoting a note one half step higher. Copy editors see a symbol meaning “space,” as in “add a space between two sentences.” In computer code, the # symbol means that everything that follows is only comment, not instructions.
Do you use the # often? What other characters would you like us to discuss on the the Dictionary.com blog?

转载于:https://www.cnblogs.com/jianglijs/p/7390078.html
展开全文
• What's in a name? In this lesson, I'll explain the concept of naming interactive elements for screen reader users, including forms, buttons, and links. You'll learn how to debug accessible names ...

What's in a name? In this lesson, I'll explain the concept of naming interactive elements for screen reader users, including forms, buttons, and links. You'll learn how to debug accessible names and descriptions using the Chrome Accessibility Developer Tools (previously a Canary experiment, now in Chrome), using multiple labeling techniques. We'll also listen to the effects of proper accessible names and descriptions in Voiceover and Safari.
For more information and the nitty-gritty browser implementation algorithm, refer to WAI-ARIA 1.1:
https://www.w3.org/TR/wai-aria-1.1/#namecalculation
https://www.w3.org/TR/accname-1.1/

Search box:

<form class="search">
<input aria-labelledby="search-button" />
<button id="search-button">
<span aria-hidden="true" class="icon icon-search"></span>
<span class="visuallyhidden">Search</span>
</button>
</form>

Input field is labelled by the button, button is labelled by the text content.

</a>

aria-labelledby can accpet multi ids.

DIalog:

<!-- For custom button, we can use aria-label & aria-describedby-->
<custom-button role="button" tabindex="0" aria-label="Cancel" aria-describedby="cancelNote">
X
</custom-button>
<fieldset>
<!-- it is good to use legend to tell users what this form is all about-->
<legend>
</legend>
<div>
<!-- label for-->
<label for="dogs">Dog</label>
<input type="text" id="dogs" name="dogs" />
</div>

<div>
<!-- best: using both for & label wrapping-->
<label for="cats">
Cat
<input type="text" id="cats" name="cats" />
</label>
</div>

<div>
<!-- who else will be the label -->
<label>
Who else?
<input type="text" placeholder="e.g. Frank the Lizard" name="superfriends" />
</label>
</div>
<div>
<input type="submit" value="Submit" />
</div>
</fieldset>
<p id="cancelNote">Closing this dialog will cancel your submission.</p>
</dialog>

转载于:https://www.cnblogs.com/Answer1215/p/11523236.html
展开全文
• <div><p>Firstly, this is a fantastic library, thank you for sharing it with the community. <p>I'm trying to use it in a node project, but I can't seem to find the documentation for usage with ...
• <div><p>for key in self.key_name: origin_data[key] = {'posts': [], 'prev_posts': [], 'responses': [], 'kg': [], 'kg_index': []}</p><p>该提问来源于开源项目&...
• I just need those <a href="https://github.com/jenssegers/date/tree/master/src/Lang">days translation</a> but unfortunately for some files I am confused of what is the language of each file. ...
• <div><p>Hello, I want to know what is the generator name set for server ? Can you indicate it on your overview page please?</p><p>该提问来源于开源项目：Glitchfiend/BiomesOPlenty</p></div>
• I wish to rename the package to <code>Better CoffeeScript</code> now, as it is added by me utilizing package.json. Will renaming the package result in resetting the package info at package control? ...
• But with releases , it is impossible - you have to rely on the name of the node in vm.args file. <p>why is it? is this some conceptual thing? In some cases you might want to run multiple instance of ...
• t tried this hack, but maybe we just need to avoid it by giving a clean error message for when a user name is re-used. <p>CAN THIS BE FIXED BY AGU? <p>This will really be bad for our novice AGU users...
• The first two are what you would normally call stars. According to the above definition, however, all shapes in the first row are star-shaped. The two in the second row are not. For each star shape, a...
• [](http://acm.zju.edu.cn/onlinejudge/showImage.do?name=0000%2F2819%2FYokohama2006_A.gif) Figure 1: Direction and angular radius of a telescope The end of the input is indicated with a line ...
• <div><p>I dont know if it matters too much since it is simple to change it but still, i didnt try manually rebooting and seeing if that changed things.</p><p>该提问来源于开源项目：evilsocket/...
• <div><p>Hi all, ...<p>What do you think? I am waiting for your thoughts and name suggestions... My suggestions: - EyeGuard</p><p>该提问来源于开源项目：slgobinath/SafeEyes</p></div>
• <ul><li>[ ] What version of the library are you using? Is it the latest version? The latest released version is <a href="https://bintray.com/springfox/maven-repo/springfox/_latestVersion"> ...
• <div><p>According to device boxes, feature name can be <code>null</code> or <code>undefined</code>. ...<p>What do you think about it ?</p><p>该提问来源于开源项目：GladysAssistant/Gladys</p></div>
• What's our name?

2020-12-29 16:25:02
<div><p>I think that version 1.0 is our last chance to change the name of the software we're developing to something other than CMS, a very common and misleading name. So I'm asking all of you...
• <p>If you squint hard enough you'll see that the problem is that there's a method called "what" (to be compatible with std::exception, I guess) and a field called "what" as ...
• But please let us know the new name, since we always try to keep track of what is going on in the ecosystem. <p>And we’d love to send you some swag for your efforts around Elasticsearch. Please send...
• <div><p>In the old days it was pretty safe to assume whatever ...<p>So you need to have a way to specify what the R class package is.</p><p>该提问来源于开源项目：robolectric/robolectric</p></div>
• What is react-native link? or Should you just use react-native link when linking any dependency or should you be more explicit and use react-native link dependency-name? From my experience ...


or Should you just use react-native link when linking any dependency or should you be more explicit and use react-native link dependency-name?
From my experience it is better to use react-native link dependency-name. This is due to the fact that react-native link will try to link (or re-link) all the dependencies that can be linked and this can lead to code duplication. Most of the issues that I have experienced have been when the Android native dependency is being linked. I think there has been some headway in stopping this from happening in subsequent updates, but the old adage applies here once bitten, twice shy

# 或者使用npm

https://www.cnblogs.com/maopixin/p/10034763.html

链接原生库

转载于:https://www.cnblogs.com/feng9exe/p/11133094.html
展开全文
• 八十年代生人，大部分用的都是同一套初中英语教材，假如叫..." "My name is Li Lei." "How are you?" "Fine,thank you.And you?" "Im fine too.How do you do." "How do you do." 这套经典教材，
• What is svchost.exe And Why Is It Running?...You are no doubt reading this article because you are wondering why on earth there are nearly a dozen processes running with the name svchost.
• <div><p>NameError: name 'watchlist' is not defined <strong>Which version are you running? The lastest version is on Github. Pip is for major releases.</strong></p> <pre><code>python import ...
• <p>What did you DO? (steps to reproduce) <p>I have just grabbed the latest ZIP file of the develop branch, then tried running the script with Python2. <p>torben-desktop\$ python2 bank2ynab.py Traceback...
• What is happening in the background is, that this deployment name for that tenant gets linked to the deployment region. This link is not changeable. So if you deploy the same file to a different ...
• What is this "def" I heard of?"def" is a replacement for a type name. In variable definitions it is used to indicate that you dont careabout the type. In variable definitions it is mandatory to eithe
• <p>i am getting a bit confused about my result, can you explan what happened here? (i stated: "My name is anton") <p>{ "partial" : "my name is" } { "partial" : "...
• you have 2 columns SSN and Name and then you have something like Title, Name and SSN in this order and then you should have again only SSN and Name. <p>In first change: SSN and Name => Title, ...

...