As a PHP developer, perhaps the most useful thing is Pear's class library. We know, Pear::P ager is specifically for paging, while Pear::html_ajax is a class library of AJAX applications. But Pager is more than just a page link for HTML, which is already ready for Ajax that is redder than super girls, and see how these two packages are integrated.
Pager and Javascript
Now that the first step,
. Enter the following command on the terminal:
Sudo update-alternatives -- install/usr/bin/gcc/usr/bin/gcc-4.4 40
Sudo update-alternatives -- install/usr/bin/gcc/usr/bin/gcc-4.1 30
Set the default GCC version. Run the following command:
Sudo update-alternatives -- config gcc
Result:
There are 2 choices for the alternative gcc (providing/usr/bin/gcc ).Se
Displaying a large amount of data on a page is a common practice in Web projects, but is limited to the size of the screen, and in order to make it easier for users to read, we often need to display the data in pagination, so paging is an essential part of the project. PEAR::P Ager is a powerful paging class that is very convenient to use.
System requirements: php4.3.*/php5,pear::P ager
PEAR::P ager have two kinds of paging display mode, one is jumping, the other is sliding. What's the differe
adds one} Else {$ Page_count = $ amount/$ page_size; // if there is no remainder, the number of pages equals the total data volume divided by the result of each page}}Else {$ Page_count = 0;}
// Flip link$ Page_string = '';If ($ page = 1 ){$ Page_string. = 'Page 1 | previous page | ';}Else {$ Page_string. = '}If ($ page = $ page_count) | ($ page_count = 0 )){$ Page_string. = 'next page | last page ';}Else {$ Page_string. = '}// Obtain data and return results in two-dimensional array formatIf ($
-in is what, nothing more than the page number display, the switch between the page number, so, our plug-in should be around the basic needs to start, and temporarily do not consider other possible needs.Determine plugin HTML and CSSAfter determining the needs of the plug-in, the second step is the UI of the plugin, HTML and CSS.Suppose the basic UI is as follows:Basic Page-Paging UISee the basic UI above, do not know what kind of HTML structure you will think of. For our developers, HTML and CS
Implementation mode
There are many ways to achieve this by summarizing some of the most common ways, and then adding others later.
Viewpager + Radiogroup
Viewpager + fragmenttabhost
Viewpager +tablayout
Viewpager+radiogroup
Feel this is the simplest one, I do not put code to say that I understand the idea of it
By adding pager and radiogroup to monitor, monitor two control changes to achieve linkage
When the Viewpager display
……Totaldownloadsize:44MIsthisok[y/N]:y3. After the installation is complete, verify that[[emailprotected]~]#java-versionjavaversion"1.6.0_37"OpenJDKRuntimeEnvironment(IcedTea61.13.9)(rhel-1.13.9.4.el5_11-x86_64)OpenJDK64-BitServerVM(build23.25-b01,mixedmode)4. The path to the default installation via Yum is/usr/lib/jvm[[emailprotected]~]#cd/usr/lib/jvm[[emailprotected]jvm]#lltotal24drwxr-xr-x3rootroot4096Jan1220:01java-1.6.0-openjdk-1.6.0.37.x86_64lrwxrwxrwx1rootroot21Jan1220:01jre->/etc/
->/etc/alternatives/java*
Alternatives is a multiple version management software under Linux, which can be used to achieve version switching of JDK, which is described later. First come to the alternatives directory to see what's on the ground.
fordreamxin@compiler207:/etc/alternatives$ ls java*
Java java.1.gz javac
Ubuntu GNU/Linux 12.04 lts (precise pangolin) released. I wanted to manually install the Sun JDK 6 and 7 on Ubuntu.
Installing Sun JDK 6 on Ubuntu 12.04:
Download the Sun JDK 6 BinFrom here.
Make the BIN file executeable:
chmod +x jdk-6u32-linux-x64.bin
Extract the BIN file:
./jdk-6u32-linux-x64.bin
Move extracted folder to this location:
sudo mv jdk1.6.0_32 /usr/lib/jvm/
Install new Java source in system:
sudo update-alternatives --ins
A very exquisite php paging class that can be directly applied to the paging system is a necessary tool for mysql database paging, you only need to embed class files and paging CSS styles to achieve exquisite paging. This is a simple, convenient, and fully functional paging class. you can change the CSS style file as needed to control the page color. using the php paging class, you can save yourself a lot of time, you only need to embed it in the paging area. The following describes how to use i
A very exquisite php paging class that can be directly applied to the paging system is a necessary tool for mysql database paging, you only need to embed class files and paging CSS styles to achieve exquisite paging. A very exquisite php paging class that can be directly applied to the paging system is a necessary tool for mysql database paging, you only need to embed class files and paging CSS styles to achieve exquisite paging.
This is a simple, convenient, and fully functional paging class.
.
General idea: Insert a pagination character (for example,
This method is more user-friendly. After all, the paging content captured by manual control is more full of our thinking, And the HTML Tag cannot be closed to some extent.
Page displayPaging display is one of the important means to batch send large volumes of data to the client. It is usually used to split the result set in the database into segments for display.
CategoryPHP pages are divided into list pages and content pages. The basi
Let's just look at the code. Pager. class. the php code is as follows: classPager {*** total number of int pages ** protected $ pageTotal; ***** protected $ previous; ***** protected $ next; * ** starting number of the int intermediate page ** protected $ startPage; *** ending number of the int intermediate page ** pr
Let's just look at the code. Pager. class. the php code is as follows: class
A very exquisite php paging class that can be directly applied to the paging system is a necessary tool for mysql database paging, you only need to embed class files and paging CSS styles to achieve exquisite paging.
A very exquisite php paging class that can be directly applied to the paging system is a necessary tool for mysql database paging, you only need to embed class files and paging CSS styles to achieve exquisite paging.
This is a simple, convenient, and fully functional paging c
to close HTML tags when cutting content. if this is not done well, the effect after paging is obviously not good.
Method 2: Paging by pagination
Paging with a paging character is more ideal than the first method.
General Idea: insert a pagination character (for example:
). When the document is displayed, the content of the article is divided. each part represents the content of a page, and the page number is displayed by passing parameter control.
This method is more user-friendly. after all,
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.