IDC Commentary Network (idcps.com) February 28 Report: According to the host statistics agency WEBHOSTINGTOP data show, as of February 26, the best cost-effective virtual host ranked in the forefront of IPage, Fatcow, InMotion, Justhost and Webhostinghub and other service providers. Compared to the recent, only ipage preferential price changes, from $1.89 to $2.25, however, the price is still the lowest. Be
WordPress site, good space in China, just limit capacity... Translation to the IP age space outside China, but found a fatal problem: Chinese URLs are not supported !!! Http://my.oschina.net/cart/ 400 bad request-http://my.oschina.net/cart/
/** Long article Pagination class* @package Cutpage* @author yytcpt (no shadow)* @version 2008-03-27* @copyrigth http://www.d5s.cn/*/Class cutpage{var $pagestr; The content of the Shardvar $pagearr; The array format of the text being slitvar $sum _word; The total number of words (Chinese characters in the UTF-8 format are also included)var $sum _page; Total pagesvar $page _word; How many words a pagevar $cut _tag; Automatic page Breaksvar $cut _custom; Manual page Breaksvar $
will specifically explain the generation of static aspects of the article introduction.Pagination ClassPHP/** Long article pagination class*/ classcutpage{Private $pagestr;//what's being sliced Private $pagearr;//array format for sliced text Private $sum _word;//Total Words (Chinese characters in the UTF-8 format are also included) Private $sum _page;//Total Pages Private $page _word;//How many words a page Private $cut _tag;//automatic page Breaks
First, set up the database paging class
Package Newsbean;Import java.sql.*;
public class dbconnection{Use MS JDBC hereString sdbdriver = "Com.microsoft.jdbc.sqlserver.SQLServerDriver";Specify Database name/urlPrivate final String url = "jdbc:microsoft:sqlserver://";Private final String servername= "LocalSqlServer";Private final String portnumber = "1433";Private final String databasename= "Mybusidb";String sConnStr = "Jdbc:microsoft:sqlserver://localsqlserver:1433;databasename=ourcompany";Priv
interface classes are required: IDocument, IPage, and ITextUnit.Based on these classes, we first create a. cpp file and. h file, and organize the project (EBook) directory structure as follows: Figure 2: Project directory structure
Here, Document, Page, and TextUnit are specific implementation classes. IDocument, IPage, and ITextUnit are interfaces provided externally, thus implementing Implementation and
Characters in UTF-8 format are also included)Private $ sum_page; // the total number of pages.Private $ page_word; // Number of words on a pagePrivate $ cut_tag; // automatic paging characterPrivate $ cut_custom; // Manual paging characterPrivate $ ipage; // The number of pages to be split.Private $ url; Function _ construct ($ pagestr, $ page_word = 1000 ){$ This-> page_word = $ page_word;$ This-> cut_tag = array ("","","
","
","". ",". ",".","! ","
, according to the request to display different sections of content, to achieve the paging effect. This method once content read, from the front-end JS processing paging, experience good.This example code illustrates the use of PHP will be a long article content paging, you can automatically and manually paging. As for the generation of static HTML page is not covered in this article, we will specifically explain the generation of static aspects of the article introduction.Paging class
/** Long
disadvantage is: if the record set increases, it is necessary to establish a temporary record set each time, but also more time-consuming, but reduced network traffic.
Example:
(
From Worx English version of ISBN1861002610
The key place I have made the Chinese translation
)
CREATE PROCEDURE usp_pagedauthors
@iPage int,
@iPageSize int
As
BEGIN
--Disable row counts
SET NOCOUNT on
--Declare variables
DECLARE @iStart INT--Start record
DECLARE @iEnd INT
requires a look at the interface provided by your program. C + + encapsulation is particularly good (personally feel much better than Java, Java into the jar package can easily be decompile, C + + to decompile more difficult), I just give you compiled the library and interface header file on it.
From an example to talk about the implementation of the scheme
Need
Let's look at a scene first. Suppose you have an electronic document, a document with multiple pages (page), a plurality of text un
'************************************' Getpagecount the total number of pages'************************************Private Function Getpagecount (irecordcount)If irecordcount Mod xpagesize = 0 ThenGetpagecount = IrecordcountxpagesizeElseGetpagecount = irecordcountxpagesize+1End IfEnd Function'************************************' Getmidpageindex calculates the page index of the middle page'************************************Private Function Getmidpageindex ()Getmidpageindex = (xpagecount)-1End F
Stored Procedure | paging/* This stored procedure is used to display the paging of the registered user * *
CREATE PROCEDURE Usp_pageduserreg
@iPage int,
@iPageSize int
As
Begin
--Turn off automatic counter function
SET NOCOUNT on
--declare variables
DECLARE @iStart INT--Start record
DECLARE @iEnd INT--end record
DECLARE @iPageCount INT--Total number of pages
--Create the temporary table to build temporary tables
Create Table #PagedUserReg
(
ID int
Retrieve URL:
String strurl = (* It). Second;
Call the download function again.
(Ccrawl *) Arg)-> downloadfile ( tianwangfile, link4sefile, iurl, ngsock );
Start to download the actual web page.
In the downloadfile function, the actual download function is implemented by file_length = http. Fetch (strurllocation, downloaded_file, filehead, location, nsock.
Char * downloaded_file = NULL,* Filehead = NULL,* Location = NULL;
The downloaded webpage files are stored in downloaded_file, filehea
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.