We all know QQ user volume billion, each user has a lot of friends, therefore, the amount of data is very large, how to achieve QQ friends recommend it?Here's an example:A has QQ friend BB has QQ friend CThen A,c may be a friend.When a is logged in, it will recommend C to a, and when C is logged in, it will recommend A to C.Demoinput Datamap阶段key:主value:从key:从value:主将一条记录分别作为key,value进行输出。tom-->jasonjason-->tomtom-->lgdlgd-->tomreduce阶段将同一个key的values值
. Boolean values can be calculated using and/or/not.
1.1 Variables
The variable name must be a combination of uppercase and lowercase letters, numbers, and _, but cannot start with a number;
Common naming methods, such as name_list and Name_List.
2.1 Input and Output
Python 2.X
In Python2.X, raw_input and input functions both have input functions, but there are differences, as shown in:
It can be seen that input is a variable by default. Therefore, when you enter tom directly, the prompt is n
One, shell input function1. Keyboard inputWay One:[Email protected] four]#CatTest.SH#!/bin/Bash #-the e parameter resolves the escape character in the statementEcho-E"My name is user1\n my name is User2"#-n parameter allows the echo command to end without wrappingEcho-N"My name is user1\n my name is User2"Echo#输出一个空行 # An application exampleEcho-N"Please enter your name:"Read nameEcho$nameEcho "My name is $name"[email protected] four]#./test.SHMy name is user1my name was user2my name is user1\n
-command in its execution resultTouch./file-$ (date +%f-%h-%m-%s). txtQuotes supported by bash:·· : Command substitution"": weak reference, you can implement variable substitution:': Strong reference, do not complete variable substitution⑨File name wildcardGlobbing*: Any character of any length? : Any single character[]: matches any single character within the specified range[Abc],[a-m],[a-z],[a-za-z][: Space:]: Blank[:p UNCT:]: Punctuation[: Lower:]: lowercase letters[: Upper:]: Uppercase[: Alp
=(Element) name;WuyiElement sexelement =(Element) sex; the //8. Set the value to the node -Nameelement.settextcontent ("TomTom"); WuSexelement.settextcontent ("Femalefemale"); - //9. Create a Transformerfactory object AboutTransformerfactory transformerfactory =transformerfactory.newinstance (); $ //10. Create a Transformer object -Transformer Transformer =Transformerfactory.newtransformer (); - //11. C
background running time. Some apps can request 10 minutes of extra time. A small number of apps do require unlimited background uptime, and iOS is allowed.
To be exact, in iOS5, there are 5 types of apps that allow unlimited background running time:
1. You can play the audio app in the background. For example, when Instacast is playing a blog.
2. You can track your location in the background of the app. For example, the TomTom navigation system makes
Gowalla, OpenTable, TomTom, Zagat, and Yellow Pages Group into a single database, allowing developers to access and obtain location information.
Twitter said that the extended database allows developers to easily provide users with more locations to mark, making it easier to associate Twitter messages with specific locations.
Although this is not a major news, it shows that Twitter continues to use location data as a means to strengthen its service
are some practical PHP libraries that can execute Web development projects faster and more efficiently. Today, the small series will list 15 such PHP libraries, welcome to the tasting!1, MinkMink is a library of PHP 5.3 that can be used to simulate the interaction between a Web application and a browser in a test. This library enables developers to use a single API to operate on a variety of different browser emulators simultaneously. Mink also provides an effective way to control the browser,
Write while reading. 1. create a user useradd-m-d/home/tomtom-Goracle-m to create a home directory for the user, and copy the files in/etc/skel for initialization. -G indicates joining a user group. The user's default settings are stored in/etc/defa...
Write while reading.1. create a userUseradd-m-d/home/tom-G oracle-M: create a home directory for the user and copy the files in/etc/skel to initialize the directory. -G indicates joining a user group.Th
code, classes, values, message templates, and configuration data. Currently, we can choose from a large number of PHP libraries that are responsible for fast and efficient Web development. In today's article, I will list my favorite 15 PHP resource libraries, hoping to help developers build their own projects better. Let's join the question right away.
1) Mink
Mink is a PHP 5.3 library used to simulate the interaction process between Web applications and browsers during testing. This library c
This article mainly introduces the detailed process for PHP engineers to configure VIM, including VIM configuration and VIM configuration code. if you are interested, refer
About my vim configurations
I often write code on the server. a friend provides his vim configuration and shares it with you.
Interface:
. Vimrc
The content is as follows:
"============================================== ====================================== Set nocompatible "be iMproved, requiredfiletype off "required" git
take a look at seven major improvements to iPhone OS 4:
Seven major improvements to iPhone OS 4
I. Multi-task:
Apple iPhone OS 4 officially supports multi-task functions, which can be achieved by double-clicking the Home Key. Apple uses APIs to implement multi-task functions without additional power consumption. These APIs include background audio, VoIP, background address location information, push, local reminder, process competition, and fast program switching, pandora, Skype,
$ exitexit$ whoamiian
In what group do I belong?
Similarly, you can use the groups command to find out which group you are in. You can use the id command to find information about users and groups. Add a user id parameter to the groups or id to view the user id information, instead of the current user id. View the example in Listing 2. Note that the id command displays the SELinux context and basic id information without a user id.
List 2. Decision-making group members
[ian@echidna ~]$ iduid=100
registration because it is provided for internal use. I think this project serves as a job for students to learn about SQL 2000, ASP. NET, and software architecture. I am confident that I can pass the course, but I don't know if I can get a high score. After the test, I will clearly describe the development process of this assignment so that you can evaluate it and find out my mistakes.
Tomorrow I will go to Leeds and join my girlfriend. next Monday, we will start our trip to England for the
role: Can make markdown syntax highlighting. 1. Install. Managed using the pathogen plugin. CD ~/.vim/bundlegit clone https://github.com/plasticboy/vim-markdown.git2. Configuration, after the installation is completed, automatically by pathogen, but markdown write Jekyll blog, you need to configure the YAML syntax. Add the following configuration in ~/.VIMRC:Let g:vim_markdown_frontmatter=13.markdown Code completion tool SnipmateCD ~/.vim/bundlegit clone https://github.com/
ID Introduction to Commands:This command is used to view the user's account attribute information 1 . command format:ID [option] USERNAME2 . Command function:used to view the attribute information for a user account that already exists on the system. [[email protected] test1]# ID Tomuid=666 (Tom) gid=666 (Tom) group =666 (Tom), (Donggen) 3. Command parameters: - u View only the user's ID number uid- G View only the user's group ID number GID- G View only the user's additional group I
Look at the C + + code, lack the right editor, and tinker with Vim.
Installing the Vundle for plug-in managementgit clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim --depth=1
Install Youcompleteme, code completioncd ~/.vim/bundle/ git clone https://github.com/Valloric/YouCompleteMe.git --depth=1cd YouCompleteMe/git submodule update --init --recursive./install.py --clang-completer --system-libclang
Modify ~/.vimrc , add the following paragraph, manage addition
About my VIM configuration
Often write code on the server, a friend provided about his vim configuration, here to share to everyone.
Interface Effect Chart:
. VIMRC
The contents are as follows
"========================================================================= set nocompatible" be iMproved, required FileType off "required" Git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/vundle.vim "Set" Runtime path to include Vundle and initialize set Rtp+=~/.vim/bundle/vundle.
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.