with a colon : split into multiple fields and print out the contents of the 1th column field
How to specify multiple delimiters in awk at the same time
For example, now there is a file Some.log file content as follows
Grape (100g) 1980
raisins (500g) 1990
Plum (240g) 1997
Apricot (180g) nectarine
(200g) 2008
Now we want to split the Some.log file by the "Fruit Name (weight) year".
$ Awk-f ' [()] ' {print $ $ $ $ $} ' Some.log
Grape 100g 1980
raisin
, but be aware that COLUMNS only column names, unsupported functions, and multi-column ranges in parentheses must be in an incremental trend:According to DATE , DATETIME scope:CREATE TABLE members ( firstname VARCHAR(25) NOT NULL, lastname VARCHAR(25) NOT NULL, username VARCHAR(16) NOT NULL, email VARCHAR(35), joined DATE NOT NULL)PARTITION BY RANGE COLUMNS(joined) ( PARTITION p0 VALUES LESS THAN (‘1960-01-01‘), PARTITION p1 VALUES LESS THAN (‘1970-01-01‘), PARTITION p2 V
Import Java.util.Scanner;Class Calendarmain{Main function entrypublic static void Main (string[] args){SYSTEM.OUT.PRINTLN ("* * * * * Please enter the date (format: 2011-01) * * * * *);Scanner sc = new Scanner (system.in);String ym = Sc.next ();Intercept stringstring[] Yearmonth = Ym.split ("-");Convert a string into an integer typeint year = integer.parseint (yearmonth [0]);int month = Integer.parseint (yearmonth [1]);Year.fun (year);Month.fun (month,year);}}Get the number of leap yearsClass ye
knows about C and C ++ stan-Dards; others may be added in the future.
Standard may be one:
"Iso9899: 1990""C89"The iso c standard from 1990. c89 is the customary shorthand for this version of the standard.
The-ANSI option is equivalent to-STD = c89.
"Iso9899: 199409"The 1990 C standard, as amended in 1994.
"Iso9899: 1999""C99""Iso9899: 199x""C9x"The Rev
time record the price difference between the two transactions, the price will be at least a difference of 10 yuan.6, if the market fluctuation in a narrow range, then the trade alternately, the middle will generate profits.7, if there is unilateral market, how to carry out the sale? For example, 2000 yuan to sell a bitcoin, while in 1990 to hang a buy order, then the price continues to rise, a short period of time will not fall back to
3.3. MethodsDefine object var xiaoming = {name: "Xiaoming", brith:1990}//bind a function to an object var xiaoming = {name: "Xiaoming", brith:1990, Age:functioN () {var y = new Date (). getFullYear ();return y-this.brith; }}//functionxiaoming.age;//26xiaoming.age ();Inside a method, this is a special variable that always points to the current object, that is, the xiaoming variable. So, This.birth can get Xi
:56:44 mysqld_safe Starting mysqld daemon with databases from/home/hadoop/ruanJian/mysql/data2016-08-30 15:56:49 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. please use -- explicit_defaults_for_timestamp server option (see docu Mentation for more details). 15:56:49 1990 [ERROR] Fatal error: Can't change to run as user 'mysql'; Please check that the user exists! 15:56:49 1990 [ERROR] Abor
Lucene takes field as the Key-value storage unit, and the value of field can be stored as string, int, long, double, float, and byte[], and it is often necessary to store complex data types such as list, map, and so on during development. Here's how to convert a complex object to a single Key-value store into Lucene.Lucene supports multi-domain value storage, the same document can store multiple keys of the same field, the simple understanding is Lucene support Key=value and Key=[value1,value2]
Copy Code code as follows:
#!/usr/bin/env Python2
#-*-Coding:utf-8-*-
__author__ = ' Jalright '
"""Implementing a calendar with Python"""
Def is_leap_year (year):"""Judge whether it is a leap year, return a Boolean value"""If Year/4==0 and year/400!=0:Return Trueelif year/100 = = 0 and year/400 ==0:Return TrueElseReturn Falsedef getmonthdays (Year,month):"""How many days are there in the month of the specified date"""Days = #31天居多, set to default valueIf month = 2: #2月份要判断是否是闰年If Is
The previous blog introduced the use of the simple query API in ES, and this article describes the use of the aggregation API provided by ES. The aggregation capabilities provided by ES can be used for simple data analysis. This article is still an example of the data provided above. The data are as follows:
Studentno
name
male
Age
Birthday
Classno
Address
Isleader
1
Liu bei
Man
24
1985-02-03
1
Hunan Governor Shas
The history of Web discussions on Web development technology, of course, is to start with the origins of the Web. As we all know, the most popular application architecture on the internet is invented by Tim Berners-lee. The web was formerly the enquire (enquire Within Upon Everything) project by Tim Berners-lee in 1980. The first Web server, nxoc01.cern.ch, started running in November 1990, and Tim Berners-lee saw the earliest web page on the "WorldWi
columns first.
If name the values of the columns are the same, they are birthday sorted by the values of the columns.
If the birthday values of the columns are also the same, the phone_number values are sorted by.
This sort method is very, very special, very, huge, very very very important, because as long as the nodes and records are in order, we can use the dichotomy to quickly locate the search. The bottom of the content depends on this diagram, we understand the picture.2.1 Fu
| +----------------+----------------------+-----------------------+------------+It can be seen that the hash distribution is extremely uniform:;2. Key partition PS:: The so-called key partition refers to MySQL by default using the table's primary key or unique partition management to create an instance:CREATE TABLEkey_emp (Tidint, TnameChar(255)) PARTITION by KEY(TID) Partitions8; PS: Because it is similar to hash, it is not tested too much!!!3. Sub-partition PS:: As the name suggests is to
Sometimes a partition function is built on the job, but a partition function like a date can have a value of hundreds of if it's not going to kill me. So I wrote a bit of code to automatically generate a monthly partition function and a corresponding partition theme starting from 1990. Use [TestDB]GODECLARE @STR NVARCHAR(MAX)SET @STR = 'CREATE PARTITION FUNCTION [pf_rangebymonth_fromyear1990] (DATETIME) as RANGE left for VALUES ('DECLARE @STR2 NVARCHA
1. Create a mock all databaseMysql>create database test;2. Create a simulation of all the tablesMysql>create TABLE student (ID INT) NOT null UNIQUE PRIMARY KEY, name VARCHAR (a) NOT NULL,Sex varchar (4), birth year, Department varchar (+), address varchar (50));3. Inserting data into the tableMysql>insert into student VALUES (901, ' Zhang boss ', ' Male ', 1985, ' computer Department ', ' Haidian District, Beijing ');INSERT into student VALUES (902, ' Zhang Dick ', ' Male ', 1986, ' Chinese depa
--using the specified database Usetest;--Create a database with the name MydabCREATE DATABASEMydab;--Deleting a databaseDROP DATABASEMydab;--Create a tableCREATE TABLEt_mytable (--primary key is primary key column, element cannot be duplicated, cannot be empty--auto_increment Auto-complete column to ensure the primary key is not duplicatedIdINT PRIMARY KEYauto_increment, UserNameVARCHAR( -), SexVARCHAR(2), birthday DATE, phoneVARCHAR( One))DEFAULTCHARSET=UTF8;--default Format--Delete a tableDROP
In Excel, you sometimes need to combine the contents of two cells with a formula, and you can use the connector. However, if two cells are text and dates, for example, if you include a date "May 1, 1990" In Cell E15, you now want to display the words "Lidong's birth date is May 1, 1990" In another cell, if you use the formula directly:
= "Lidong's birth date is" e15
The formula will return "Lidong's birt
The following is a summary of the SQL data query statements, the need for friends can come to reference the next
Where Condition expression--Statistical function
Copy Code code as follows:
Select count (1) from student;
--like Fuzzy Query--statistics on the number of people in the class surnamed Zhang
Copy Code code as follows:
Select COUNT (*) from the student where realname like ' Zhang% ';
- -The number of two characters in the class
Copy Code code as follows:
Select COUNT (
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.