Search

Rss Posts

Rss Comments

Login

 

Posts from June, 2008

What searching system is most popular in Runet ?

Jun 07

What searching system is most popular in Runet ?
In obedience to statistics of visited of poulyarnykh of the Russian sites:

  • Yandex (48.8%)
  • Google (31.0%)
  • Rambler (5.94%)
  • Aport (5.77%)
  • Mail.ru (3,9%)
  • MSN (1.93%)
  • Yahoo (0.4%)
  • Altavista (0.06%)

Is there registration in catalogues, for what it?

Jun 07

Is there registration in catalogues, for what it? Catalogues are the ground posts of the internet. Once registration of site in catalogues was by the unique inexpensive method to declare about the site. Now, when the searching systems are used by more than 95% users, catalogues remain the all those ground posts, but already for the robots of the searching systems. Registration in catalogues gives the strong improvement of nakhodimosti site in the searching systems, thus, that most important, exactly on a type,to the bringing a profit queries. We use the own, continuously filled up lists of catalogues, that gives an effect much the best, maybe, immeasurably the best, than automatic systems of registration.

Weight of reference Thick

Jun 07

Weight of reference Thick reference (strong reference) is reference from a page with large weight (by authority). Authority of this referring page, in same queue, the higher, than anymore amount and than stronger than reference already on this page. Authority of page for every search engine is determined variously, for example for Google it PR of page (visible as a green strip in Google barins). For Yandeksa – authority of page is not shown presently (possibly that it was not traded them).De autre part: weight of reference the less than, than other more Refs.s are on this page (and external and internal). At the standard calculation of “outgoing authority” authority of page is as though gone shares between all Refs.s on this page. At non-standard – possibly not equally. Sometimes under weight of reference understand clean not weight (described higher), but weight taking into account different coefficients, for example subjects.

vIC

Jun 07

The self-weighted index of quoting (vIC) is a quantitative index of popularity of web page or web site, determined as an amount of Refs.s on this page or site from other server-resources, every reference is important here, depending on “authoritativeness” of web site which it is located on.

Banner Banner

Jun 07

Banner Banner – it more frequent than all an animation graphic picture placed with the purpose of advertising on some site. Sometimes it is compared to the outdoor advertising.

Ban of site

Jun 07

Ban of site – from angl. of to ban – to forbid. Expression, meaning prohibition of site for codeindexing and ranging of site the moderator of the searching system. Usually used to the site, to applying the methods of searching spam. It is necessary to distinguish ban of site from the different type of pessimizacii site. As a rule, ban of site results in the complete exception of site from the index of the searching system and prohibition of him for further indexation. For taking off an embargo correspondence is required with the moderator of the searching system.

Regular expressions for treatment of lines of Utf-8 in PHP

Jun 07

At development of multilingual sites for html-pages most more comfortable and predpochtitel’ney to use the code of Utf-8, providing support all or almost all existent languages and encoding ascii-characters (Roman alphabet, numbers and special characters) by one byte, and national alphabets — a few. Thus, the code of Utf-8 has variable physical length of every character. In this connection sometimes there are problems at programming of multilanguage sites.

For example, in a programming of PHP of function of strlen and substr language give out improper results, if there are characters of national alphabet in a line (as intended for work with an onebyte code). Certainly, in PHP there are such functions as mb_strlen and mb_susbtr, specially intended for work with multibyte lines. But, by default support of Multibyte String Functions in PHP is turned off,that automatically limits the choice of khostinga for the designed site. In addition, during connecting of the module of mb_string the set of the supported languages is specified. And that is why there is probability, that the language required you can not appear in the list of supported.

However, there is other, more comfortable and flexible decision of problem. Taking advantage of functions of PCRE, correctly perceiving the code of Utf-8, it is possible to write the functions of utf8_strlen and utf8_substr:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function utf8_strlen($s)
{
return preg_match_all('/./u', $s, $tmp);
}
</code>
<code>
function utf8_substr($s, $offset, $len = 'all')
{
if ($offset&lt;0) $offset = utf8_strlen($s) + $offset;
if ($len!='all')
{
if ($len&lt;0) $len = utf8_strlen($s) - $offset + $len;
$xlen = utf8_strlen($s) - $offset;
$len = ($len&gt;$xlen) ? $xlen : $len;
preg_match('/^.{' . $offset . '}(.{0,'.$len.'})/us', $s, $tmp);
}
else
{
preg_match('/^.{' . $offset . '}(.*)/us', $s, $tmp);
}
return (isset($tmp[1])) ? $tmp[1] : false;
}

Continuing the theme of work with lines in the code of Utf-8, will consider a few functions, workings without set in PHP of expansion of Multibyte String Functions, namely utf8_strpos and utf8_substr_count:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function utf8_strpos($haystack, $needle, $offset = 0)
{
    # get substring (if isset offset param)
    $offset = ($offset<0) ? 0 : $offset;
    if ($offset>0)
    {
        preg_match('/^.{' . $offset . '}(.*)/us', $haystack, $dummy);
        $haystack = (isset($dummy[1])) ? $dummy[1] : '';
    }
 
    # get relative pos
    $p = strpos($haystack, $needle);
    if ($haystack=='' or $p===false) return false;
    $r = $offset;
    $i = 0;
 
    # calc real pos
    while($i<$p)
    {
        if (ord($haystack[$i])<128) 
        {
            # ascii symbol
            $i = $i + 1; 
        }
        else 
        {
            # non-ascii symbol with variable length 
            # (handling first byte)
            $bvalue = decbin(ord($haystack[$i]));        
            $i = $i + strlen(preg_replace('/^(1+)(.+)$/', '\1', $bvalue));
        }
        $r++;
    }
    return $r;
}
 
function utf8_substr_count($h, $n)
{
    # preparing $n for using in reg. ex.
    $n = preg_quote($n, '/');
 
    # select all matches
    preg_match_all('/' . $n . '/u', $h, $dummy);
    return count($dummy[0]);
}
 
Get Adobe Flash playerPlugin by wpburn.com wordpress themes
27 queries. 0.451 seconds.