one or two differences
List:
1. You can add the contents of the list append
2. You can count the number of times a list segment appears in the entire list
3. You can insert a string and append each letter of the entire string as a list segment to the list Extedn
4. You can query the position of a list segment in the entire list index
5. You can insert a list segment at a specified location
6. You can delete the last list segment of a list pop
7. You can delete a list segment in the specified l
List and metadata usage in python.
I. Differences between the two
List:
1. added the list content append.
2. count the number of times a list segment appears in the entire list
3. You can insert a string and split each letter of the entire string as a list segment and append it to extedn in the list.
4. You can query the index of a list segment in the whole list.
5. insert a list segment at a specified position
6. You can delete the last list segment pop.
7. remove a list segment from the specif
I. Differences between the two
List:
1. added the list content append.
2. count the number of times a list segment appears in the entire list
3. You can insert a string and split each letter of the entire string as a list segment and append it to extedn in the list.
4. You can query the index of a list segment in the whole list.
5. Insert a list segment at a specified position
6. You can delete the last list segment pop.
7. Remove a list segment from the specified list
8. Reverse can be sorted i
Jack is the head of a New York company, and Jack's salary is low because of the economic crisis. Jack more than 6 o'clock in the morning every day to the company, more than 8 o'clock in the evening still in the company overtime, and sometimes even busy at night 10 o'clock more. The exertion of work is nothing, but what makes Jack sad is that he has no confidence
How to Use and differentiate lists and metadata in Python.
I. Differences between the two
List:
1. added the list content append.
2. count the number of times a list segment appears in the entire list
3. You can insert a string and split each letter of the entire string as a list segment and append it to extedn in the list.
4. You can query the index of a list segment in the whole list.
5. insert a list segment at a specified position
6. You can delete the last list segment pop.
7. remove a list
quotes
\ B return
\ N line feed
\ T horizontal tab
\ V vertical tab
>>> Name = 'My \ tname \ tis \ tjack'
>>> Name # directly output the variable name, which cannot be identified by escape characters
'My \ tname \ tis \ tjack'
>>> Print (name) # Call the print function, which can be used normally.
My name is jack
④ Raw escape character suppression
In some specific circumstances, escape characters may not be required, such as using system files in
. Because no one recognized your mother, after the plastic surgery your mother has been recycled, this is the overall rewriting of the prototype.
Nima! It's enough for you! Don ' t bb! Show me The code!
function person (name) {this.name = name} function Mother () {} Mother.prototype = {//mother prototype age:18, home: [' Bei
Jing ', ' Shanghai ']}; Person.prototype = new Mother (); The person's prototype is mother//viewed with the Chrome Debug tool, providing a __proto__ interface to vie
understand JavaScript objects. JavaScript objects are actually dictionary objects or Map objects in Java, it is also called an associated array, that is, to associate an object through a key. This object itself can be an object. According to this definition, we can know that JavaScript objects can represent any complex data structure.
Object AttributesAn attribute is composed of key-value pairs, that is, the name of the attribute and the value of the attribute. The attribute name is a string,
\ t Horizontal tab
\v Vertical Tab
>>> name = ' My\tname\tis\tjack '
>>> name #直接输出变量name, escape character is not recognized
' My\tname\tis\tjack '
>>> print (name) #调用print函数, can be used normally
My name is Jack
④raw Escape Character Suppression
You may not need to use escape characters in certain situations, such as using System files in Windows
>>> path = ' C:\new\text.txt '
>>> Print (PATH)
C:
EW Ext.txt # System will recognize \ n and \ t as
execution Result: 5 Tom is a good boy6 Tom is a good Do?1 #5 + string stitching 2 a = ' abc ' 3 b = ' 123 ' 4 C1 = a + b 5 print (C1) 6 execution Result: 7 abc123 8 The method is inefficient and the Join method is efficient: 9 C2 = ". Join ([A, b]) Print (C2) 11 Execution Result: abc123Python's built-in approach:python built-in methods3. Boolean valuesA Boolean value has only two states, true or false, either true or false. (Note case)Print (4>2) print (4Boolean values are often used in condit
structure.Object AttributesAn attribute is composed of key-value pairs, that is, the name of the attribute and the value of the attribute. The attribute name is a string, and the value can be any JavaScript Object (everything in JavaScript is an object, including a function ). For example, declare an object:Copy codeThe Code is as follows:// Declare an objectVar jack = new Object ();Jack. name = "
structure.
Object Attributes
An attribute is composed of key-value pairs, that is, the name of the attribute and the value of the attribute. The attribute name is a string, and the value can be any JavaScript Object (everything in JavaScript is an object, including a function ). For example, declare an object:Copy codeThe Code is as follows: // declare an objectVar jack = new Object ();Jack. name = "
Collection as a non-repeating listUnordered collectionSadd (name,values): Add an element to the collection that corresponds to nameSmembers (name): Gets all members of the collection that the name corresponds to127.0.0.1:6379> Sadd name John Jack Jack Andy (integer) 3127.0.0.1:6379> smembers name1) "Andy" 2) "John" 3) "Jack"SCard (name): Gets the number of elemen
will not be collected at any time by GC
/**
* Test strong type, you can see we call multiple GC He's still not recycled
* * *
private static void Teststrongreference () {person
jack = new Man ("Jack");
System.GC ();
System.GC ();
System.out.println (Jack);
SoftReference
Soft references his feature is that when memory is sufficient it does no
serializing I want to ignore the member that is the default value Staff Jack = new Staff {Name = ' jack ', age = $, Gender = ' Male ', departmentname = ' personnel Department ', Leader = null }; var jsetting = new Jsonserializersettings (); jsetting.defaultvaluehandling = Defaultvaluehandling.ignore; String json = Jsonconvert.serializeobject (
. jdbc. Driver
Javax. jdo. option. ConnectionUserName
Hive
Javax. jdo. option. ConnectionPassword
Hivepass
C. Check
$ Hive
Hive> use dw2;
OK
Time taken: 3.43 seconds
Hive> create table hwz2 (id int, name string) row format delimited fields terminated ',';
OK
Time taken: 2.519 seconds
Hive> show tables;
OK
Hwz2
Time taken: 0.419 seconds
Hive> load data local inpath 'demo.txt 'overwrite into table hwz2;
Copying data from file:/home/hadoop/demo.txt
Copy
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service