Arkisto ”Uusimmat aiheet’ Luokka

Magic WordPress

9 Joulukuu, 2010

Yhtenä premier web hosting-sivustot on WordPress. WordPress on yritys, joka on omistautunut auttamaan asiakkaitaan perustaa ammatillinen sivustot nopeasti ja helposti. On useita etuja käyttämällä WordPress web hosting-alustan. Tarjolla on runsaasti erilaisia malli design vaihtoehtoja, joiden avulla maallikko rakentaa ammatillinen verkkosivuilla vain muutaman tunnin. Toinen etu on, että WordPress on hakukone optimoitu, mikä tarkoittaa, että sivustosi näkyy näkyvästi hakukoneen tulokset. Lisäksi, WordPress voit nopeasti päivittää kävijöiden RSS-syötteen vaihtoehto kautta.

Koska WordPress on suhteellisen helppo käyttää ja on erittäin suosittu, on olemassa tuhansia laajennuksia, joiden avulla voit mukauttaa sivuston suunnittelu. WordPress on todella maaginen, jotta ihmiset eivät tiedä, ohjelmointi suunnitella hyvä sivusto. Esimerkiksi, Jos on erityinen tehtävä, jonka haluat sivustosi suorittaa, Voit ladata sopiva plugin ja aktivoida se sivustossasi menemällä WordPress tilin hallinta-välilehti. Niin monia vaihtoehtoja WordPress käyttäjien käytettävissä, kyky suunnitella luovasti ainutlaatuisen sivuston on vertaansa vailla.

Best web hosting, WordPress on gold standard. Siksi SEO, joka on jo otettu osaksi WordPress-alustalla, asiakkaan hakukonesijoitusta on korkeampi, kuin monet muut Website hosting sivustoja. Pitääkseen hakukoneen tulokset korkea-arvoinen tasolla, on tärkeää usein päivittää sivuston alkuperäinen sisältö. Lisäksi, Jos kirjaat myynnin tai erityinen tapahtuma sivustossasi, se löytyy hakukoneita nopeammin ja sijoitukseen kasvaa, niin että olet lähempänä alkuun hakukonetuloksia. Tämä puolestaan tuottaa lisää liikennettä sivustoosi ja laajentaa mahdollisille asiakaskuntaa.

Toinen suuri osa WordPress on sisäänrakennettu RSS-syöte. RSS-syöte on tehokas tapa kävijät säännöllisesti päivitettävän noin toimintaa. Kun uutta sisältöä on lisätty sivuston tai olet lähettänyt uuden blogimerkinnän, RSS-syötteen tilaavien kävijöiden ilmoitetaan heti sähköpostitse WordPress. Tämä toiminto säästää paljon aikaa, koska ohjelma tekee työn päivittäminen kävijät sinulle.

Joukossa lukuisia web hosting sivustoja, on olemassa monia etuja käyttämällä WordPress suunnittelu ja isäntä sivustosi. Ohjelma on erittäin käyttäjäystävällinen ja täysin muokattavissa juuri sellaiseksi markkinarako. Lisäksi, WordPress on jo hakukone optimoitu, joten voit etuna on Cinnamon hakukoneen tulokset. Jos haluat vilkaista joitakin sivustoja, jotka on suunniteltu WordPress, Seuraavassa on joitakin erinomaisia esimerkkejä: Department of Environmental Science Virginian yliopisto, Ford Motor Company ja Outreach Magazine.

Jos olet mukana online-markkinoinnin kampanja, harkita käyttämällä WordPress magic. Alustan avulla voit rakentaa hyvä sivusto helposti. Ammatillinen verkkosivuilla, että voit päivittää tiedostoa helposti, voi Hio ja lisätä markkinaosuus

Tämä viesti on myötävaikuttanut Kirsten Ramsburg, vanhempi kirjailija web hosting arvostelut yritys.

PHP Error Nesting Level Too Deep Recursive Dependency

March 12th, 2010

I’ve installed PHP 5.2 at one of my testing computers today and a couple of bits of code that previously worked fine in version 5.1.6 threw fatal errors in the new version. The error message was “Nesting level too deep – recursive dependency?” and it took a little time

to track down the root of the problem. Here’s what I’d done wrong.

In PHP there are two comparison operators, == and ===. It’s generally known that the first is not strict about type but the second is. Niin, for example

echo ( false == 0 ); // true

echo ( false === 0 ); // false

– 0 is an integer and false is a boolean

My problem arose from using non-strict typing with objects.

$a = new MyObj();
$b = new MyObj();
if( $a == $b )

I hadn’t considered what I was doing with this code. When comparing two objects using the non-strict comparison operator (==) PHP compares all the properties of the objects and if they match the objects are deemed to be equal. If they don’t match they are not equal. In effect, we have a recursive comparison of all the properties of each object, and all their properties, etc. until we reach basic data types like strings and integers.

If, kuitenkin, we use strict comparison (===), PHP will check whether the two objects are exactly the same object, not just objects with the same properties.

class MyObj
{
public $p;
}

$a = new MyObj();
$b = new MyObj();
$c = new MyObj();
$a->p = 1;
$b->p = 1;
$c->p = 2;
echo ( $a == $c ); // false
echo ( $a == $b ); // true
echo ( $a === $b ); // false

The problem arises if you have circular references in your objects properties. Niin, for example

class MyObj
{
public $p;
}
class OtherObj
{
public $q;
}

$a = new MyObj();
$b = new OtherObj();
$a->p = $b;
$b->q = $a; // the circular reference: $a->p->q === $a

$c = new MyObj();
$d = new OtherObj();
$c->p = $d;
$d->q = $c;// another circular reference: $c->p->q === $c

echo ( $a == $c ); // Fatal error:
Nesting level too deeprecursive dependency?

In order to compare $a to $c, PHP must compare their properties. So the logic in PHP goes something like this: $a == $c if $a->p == $c->p if $a->p->q == $c->p->q if $a->p->q->p == $c->p->q->p etc. indefinitely.

PHP 5.1 seemed to smooth over the problem somehow (probably after a certain level of recursion it simply returned false) – and usually it worked out fine. PHP 5.2 correctly produces the fatal error above.

Once you know the problem, the solution is easyuse strict comparison.

echo ( $a === $c ); // false (and no error)

The strict comparison will simply check whether the two objects are at the same location in memory and so doesn’t even look at the values of the properties.

N.B. The same problem can arise when using the negated comparison operators (use !== instead of !=) and when using in_array (use in_array’s third parameter to indicate strict comparison).

How to receive and parse emails using POP3 and PHP

March 1st, 2010

I would like to describe some methods on how to write the processor for incoming mail. I had to use such manipulation to parse e-mails received from various sources. This can be useful for writing your own spam filter system, answering machine or ticket system to receive applications by e-mail.

To implement the e-mail parser algorithm we need

  1. connect and log-on to e-mail server
  2. count the number of incoming letters
  3. recive e-mail from the server using POP3 protocol
  4. process the e-mail headers and body and make parsing
  5. implement any additional actions

Ok, there is very specific task for PHP coding, so we need hosting that supports external connection. I do not propose to write decision entirely because much has been realized by talented programmers already. Esimerkiksi, you can take a ready module which will allow accept e-mails from a remote server.

Thank’s to Manuel Lemos and his module (php class) which named pop3.php.

To connect that class to your code, you just need to use include or require command: require(“pop3.php”);


hostname=$hostname;
$result=$pop3_connection->Open();
 
// We are trying to open connection and display the result
echo $result;
// Trying to logon and display the error if any appear
$error=$pop3_connection->Login($käyttäjä,$accesscode,$apop);
if ($error<>'Password error: Logon failure: unknown user name or bad password.') {echo $error; exit;}
// Now get the statistic how many emails are stored and the size of them $result=$pop3_connection->Statistics($viestit, $size);
echo "$hostname contains  $viestit of $size bytes.";
 
//..... There we can receive e-mails in the cycle and parse them.... //
 
// If nothing to do - we can close the connection
$error=$pop3_connection->Close(); //
echo $error;
?>

Now we know how to connect and log-on to the POP3 server and how to request the number of Inbox e-mails and them sizes. Next, we should receive each e-mail and parse the headers and body array.

TO BE CONTINUED

Free MBOX to EML Converter

February 14th, 2010

It is good that today there are still programmers who write excellent software at no cost. What I am talking about? Want to tell you how I found another program for my collection of must-have utilities.

Apple MAC computers are widespread used in our office. This is the policy of the company. Despite the policy of the company, our boss prefers Windows and uses its featured laptop. Who should break the rules? Of course the boss, the rest is not allowed 🙂 I must say that I share that preference, so I have installed Windows 7 to my home laptop.

Our attorneys should pass some investigations from time to time and they should review the correspondence of our staff but they accepted only the files in the Outlook PST format.

In a previous article I wrote about incredibly necessary program Outlook Ohjattu tuominen, which saved me a lot of time when importing eml files into Outlook. The task that I had to complete just put me into shock. It is necessary to convert e-mails of our employees into the Outlook .PST file. How can we reconcile incompatible things? How to combine MAC OS with the Windows?

For a start I had to conduct an audit and found that our employees using various e-mail clients. There are just some of them: Turnpike, Mac Mail, Entourage, MailCopa, Ukkoslintu, Eudora, Berkeley Mail. The conversion task did not seem doable. I decided that if a search engine does not immediately bring me the solution, then I will say to my Boss that the mission is impossible. So I did search for the phraseentourage, thunderbird, mac mail, to eml to pst free mboxand the search was successful, it proved something I never expected. Moreover, the word FREE does not tally with me with the task that had to do. Imagine my surprise when on the description page of the another one eml to pst converter, I found the free mbox to eml converter.

The software review showed that despite the fact that the program is free, it has the incredible potential. Nevertheless the mailbox files format of different programs vary, the program was able accurately identify all meta signatures and correctly recognize the file format. I’m not kidding, all mailbox files Turnpike, Mac Mail, Entourage, MailCopa, Ukkoslintu, Eudora ja Berkeley Mail were transformed into arrays of e-mail files in EML format. Having the Outlook Ohjattu tuominen at my hands allow me to import all eml files into Outlook PST.

Free MBOX to EML Converter works as a batch-processor. First you should select all necessary mbox files from which you want to retrieve eml messages. It is easy to select all files with the Shift key. After that, you need click the Processing button, point to the empty directory at your hard drive and wait for the result. The program processing all files sequentially, it creates a directory for each file and fill it with extracted eml files. In my case I had a lot of mailbox files that were named in accordance with user-names of our employees. Eventually I got a lot of folders, each had a user name and contained all corresponding eml files retrieved from the mailbox.

Space Shuttle video from start to end

January 25th, 2010

NASA! I found this video absolutely amazing. Twelve minutes of action of Space Shuttle parts. Start from the Earth and down to the sea. Space cameras on each part of shuttle, looks very interesting. Very beautiful Space Shuttle Video.

STS-129 video highlights as compiled by the SE&I imagery team here at JSC from all of the ground, air, ET and SRB assets.