hidden-features

Hidden Features of JavaScript? [closed]

落花浮王杯 提交于 2019-11-26 00:08:41
问题 What \"Hidden Features\" of JavaScript do you think every programmer should know? After having seen the excellent quality of the answers to the following questions I thought it was time to ask it for JavaScript. Hidden Features of HTML Hidden Features of CSS Hidden Features of PHP Hidden Features of ASP.NET Hidden Features of C# Hidden Features of Java Hidden Features of Python Even though JavaScript is arguably the most important Client Side language right now (just ask Google) it\'s

Hidden Features of C++? [closed]

混江龙づ霸主 提交于 2019-11-25 23:19:17
问题 No C++ love when it comes to the \"hidden features of\" line of questions? Figured I would throw it out there. What are some of the hidden features of C++? 回答1: Most C++ programmers are familiar with the ternary operator: x = (y < 0) ? 10 : 20; However, they don't realize that it can be used as an lvalue: (a == 0 ? a : b) = 1; which is shorthand for if (a == 0) a = 1; else b = 1; Use with caution :-) 回答2: You can put URIs into C++ source without error. For example: void foo() { http:/

Hidden features of Scala

最后都变了- 提交于 2019-11-25 23:00:55
What are the hidden features of Scala that every Scala developer should be aware of? One hidden feature per answer, please. Willis Blackburn Okay, I had to add one more. Every Regex object in Scala has an extractor (see answer from oxbox_lakes above) that gives you access to the match groups. So you can do something like: // Regex to split a date in the format Y/M/D. val regex = "(\\d+)/(\\d+)/(\\d+)".r val regex(year, month, day) = "2010/1/13" The second line looks confusing if you're not used to using pattern matching and extractors. Whenever you define a val or var , what comes after the

Hidden Features of C#? [closed]

老子叫甜甜 提交于 2019-11-25 21:46:19
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not