blocks:Label| Username:Input (name= ' user[name] ')or use tag text directly:Label Username:Input (name= ' user[name] ')Accept only plain text tokens, such as Script,style, and textarea do not need to start with the | character, for example:HtmlHeadTitle Csser, focus on web front-end technologyScriptif (foo) {Bar ();} else {Baz ();}Again as an alternative, we can use the dot '. ' To represent a block of text, for example:P.Foo ASDFAsdfAsdfasdfafAsdfAsd.Output:AsdfAsdfasdfafAsdfAsd.If the dot num
be referenced/assigned in an instance methodYou can think of a class variable as a global variable that is shared by classes, subclasses, and their instances.
Class Foo@ @foo = 1EndClass Bar P @ @foo + + 1 # => 2EndClass Baz P @ @foo + + 1 # => 3EndThe class variables (module variables) defined in the module are shared by all classes that contain the module.
Module Foo@ @foo = 1EndClass BarInclude FooP @ @foo + + 1 # => 2EndClass BazInclude
1=================== Ant class ===============2 usingSystem;3 usingSystem.Collections.Generic;4 usingSystem.Linq;5 usingSystem.Text;6 usingSystem.Threading.Tasks;7 8 namespacekehouzuye.entity9 {Ten /// One ///Ant class A /// - Public classME - { the Public stringName {Get;Set; } - - PublicME (stringname) - { + This. Name =name; - } + /// A ///Say hello at /// - Public voidSayhai () -
Map is a very useful feature, let's give a simple exampleOperation of two list elements(Map + ' (1 2 3) ' ( ) → (51 62 73)If action for two list elements(Map if ' (True nil true nil True) ' (1 2 3 4 5) ' (6 7 8 9 10) → ' (1 7 3 9 5)This is a bit of a meaning, rather with a bunch of bool values to determine whether to pick elements from the first list, or to pick from the second list. Then make a new list.Use a lambda expression for two lists(Map (FN (x y) (* x y)) ' (3 4) ' (20 10) → (60 40)Ext
, The acpi, speedstep, and FN function keys are used, wireless, sleep. I got it all done.
3. If you have computer obsessive-compulsive disorder or want to do some development, it is best to use gentoo and gentoo documents. Install a package, bin, lib, and include. Unlike debian, the foo and foop-devel versions are required. Gentoo is very suitable for developers.
For me, the only difference between ubuntu and gentoo is that the latter can always sol
Differences between p and puts in Ruby: rubyputs
P and puts are especially common methods in Ruby. Many children's shoes may think that they are similar and do not pay attention to them when using them. However, they are obviously different from each other after careful consideration.
Here is an example.Copy codeThe Code is as follows:Class FooDef inspect"Foo from inspect"End
Def to_s"Foo from to_s"EndEnd
Foo = Foo. newP fooPuts fooP "p: Puts "p:
The
P and puts are the most commonly used methods in Ruby, and many children's shoes may think they are similar and are not noticed when they are used, but they are obviously different when they are carefully studied.
Let me give you an example.
Copy Code code as follows:
Class Foo
def inspect
"Foo from Inspect"
End
def to_s"Foo from to_s"EndEnd
Foo = foo.newP FooPuts FooP "P: Puts "P:
The output of this piece of code
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.