Thursday, May 26, 2011

WSTATS.NET - solutia pentru a-ti monitoriza usor si rapid statisticile GA pentru TOATE site-urile

Poti publica statisticile Google Analytics folosind WSTATS.NET (toate statisticile sunt default private).

Comparatii site-uri, grupuri site-uri, urmarire statistici cumulate pe grupuri, comparatii grupuri, cumulate valorile vizitatori/vizite/afisari per user, clasament
utilizatori in functie de aceste valori cumulate.

Interogarea Google API (Google Analytics) se face securizat(criptat), wstats.net este un domeniu-aplicatie inregistrat la Google.

Tuesday, May 24, 2011

PHP obtain date one month ago

One month ago date:

date('Y-m-d',strtotime('1 month ago'));

Thursday, May 19, 2011

PHP, MySQL: Obtain all days for year-month pair

Get all dates / days for a given year and month (from a table containing articles for example).

SELECT DISTINCT DAY(datec) `day`
FROM table_name
WHERE DATE_FORMAT(datec, '%Y-%m') = '$year-$month'

MySQL DATE_FORMAT() - Description from Manual

Important MySQL Full Text Search observation

The number of results returned using MySQL full text search is always less than 50% of the total table size.

This is very useful to know when performing tests during development phase.

Wednesday, May 11, 2011

Javascript Regexp Replace

Replace characters using regular expressions in JavaScript.

string = string.replace(new RegExp('[^a-z0-9 ._-]', 'gim'), '');

Thursday, May 5, 2011

Valhalla Rising

MySQL get day of week

How to get day of week in MySQL:

WEEKDAY(date)

mysql> SELECT WEEKDAY('2008-02-03 22:23:00');
mysql> SELECT WEEKDAY('2008-02-03');

(0 = Monday, 1 = Tuesday, ... 6 = Sunday)

Tuesday, May 3, 2011

Scroll page to top after AJAX request or other actions

After loading page 2 or any other page in a list using AJAX, the browser must be scrolled to top.

<a href="http://www.blogger.com/list.html#page=2" onclick="window.scroll(0,0)">2</a>

window.scroll(0,0) - scroll to top command

PS: For example Google Analytics lists leave the page unscrolled after loading a new page from the list.

Who, what, where, when, why and how

Complete description about an event: who, what, where, when, why and how!
This clarifies it 99.99% of the time.

MySQL - Create new database, new user, set privileges

Create database, create user, grant privileges, reload MySQL:

CREATE DATABASE `dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE USER 'dbuser'@'hostname' IDENTIFIED BY '***password***';

GRANT USAGE ON * . * TO 'dbuser'@'hostname' IDENTIFIED BY '***password***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

GRANT SELECT , INSERT , UPDATE ON `dbname` . * TO 'dbuser'@'hostname';

FLUSH PRIVILEGES;

Bursa de site-uri, licitatii site-uri

Oferte/licitatii site-uri, bursa de site-uri, cumparare/vanzare domenii, cumparare/vanzare reclama, schimb de link-uri.

Tranzactii, parteneriate, calificative, multe altele.

Totul pe infodomenii.ro : bursa de site-uri, licitatii site-uri