This webpage has a redirect loop wp admin

Wahyu Raja Reply 6:14 PM


This webpage has a redirect loop wp admin or ErrorDocument to handle the request wordpress(404 Not Found)

Solution is:

 I created a fresh .htaccess file, with permissions set to 644 and the following code or you can edit your .htaccess:
RewriteEngine on

<IfModule mod_rewrite.c>
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Maximum execution time of 30 seconds exceeded in wp-includes\class-http.php (fatal error)

Wahyu Raja Reply 6:49 AM
Fatal error: Maximum execution time of 30 seconds exceeded in htdocs\wp-includes\class-http.php on line 1402


This is due to the default php script running time 30 seconds. If more than an error occurs. But not downloaded for 30 seconds, so the error pull. In fact, all aspects of security and performance considerations, is not recommended to modify php.ini and other global parameters. The easiest way is to add only the page in the implementation of the execution time of the page.
The beginning of the class-http.php add the most
set_time_limit (0);

Python equivalents to PHP’s foreach

Wahyu Raja Reply 10:50 AM

One of the first problems I had when learning Python was looping over data. PHP’s arrays are very versatile, but in Python, you need to think in terms of lists and dictionaries.

Here’s a cheatsheet for various foreach variants, translated into Python:

Looping over a numeric array (PHP)

$items = array( 'orange', 'pear', 'banana' );

# without indexes
foreach ( $items as $item )
 echo $item;

# with indexes
foreach ( $items as $i => $item )
 echo $i, $item;

Looping over a list (Python)

items = ['orange', 'pear', 'banana']

# without indexes
for item in items:
    print item

# with indexes
for (i, item) in enumerate(items):
    print i, item

Looping over an associative array (PHP)

$continents = array(
 'africa' => 'Africa',
 'europe' => 'Europe',
 'north-america' => 'North America'

# without keys
foreach ( $continents as $continent )
 echo $continent;

# with keys
foreach ( $continents as $slug => $title )
 echo $slug, $title;

Looping over a dictionary (Python)

continents = {
    'africa': 'Africa',
    'europe': 'Europe',
    'north-america': 'North America'

# without keys
for continent in continents.values():
    print continent

# with keys
for (slug, title) in continents.items():
    print slug, title
Important note: Unlike associative arrays in PHP, Python dictionaries are not ordered.


To see all the methods that a list object has, open a python console and typehelp([]). It’s a lot faster than googling for documentation.
For more awesome Python tips, see Code Like a Pythonista: Idiomatic Python.

what is doctrine hydration?

Wahyu Raja Reply 4:17 PM

Data Hydrators

Doctrine has a concept of data hydrators for transforming your :php:class:`Doctrine_Query` instances to a set of PHP data for the user to take advantage of. The most obvious way to hydrate the data is to put it into your object graph and return models/class instances. Sometimes though you want to hydrate the data to an array, use no hydration or return a single scalar value. This chapter aims to document and demonstrate the different hydration types and even how to write your own new hydration types.
Hydration is a method used to return query results. For example:
  1. HYDRATE_ARRAY - This will return you an array of records that are represented by another array:
    $q = Doctrine_Query::create()
       ->from('Post p')
    $resultSet = $q->execute(); // $resultSet is an array
    foreach ($resultSet as $post) {
        // $post is an array
        echo $post['title'];
  2. HYDRATE_RECORD - This will return you an collection (Doctrine_Collection) of objects:
    $q = Doctrine_Query::create()
       ->from('Post p')
       ->setHydrationMode(Doctrine::HYDRATE_RECORD); // Unnecessary, HYDATE_RECORD is default method
    $resultSet = $q->execute(); // $resultSet is an Doctrine_Collection object
    foreach ($resultSet as $post) {
        // $post is an Post object
        echo $post->getTitle();
        echo $post['title']; // Each Doctrine's Model object implements ArrayAccess interface so this is possible
        echo $post->myCustomMethod();
  3. HYDRATE_SINGULAR_SCALAR - Will return the value of first column of query's result:
     $q = Doctrine_Query::create()
       ->from('Post p')
       ->where(' = ?', 321)
    $createdAt = $q->execute(); // $createdAt has value of first column from first record from result set (eg.: 2008-04-06 21:22:35)
There is a few more methods , you can read about each in documentation.

Recommendation and Ratings Public Data Sets For Machine Learning

Wahyu Raja Reply 9:58 AM
Movies Recommendation:
Music Recommendation:
Books Recommendation:
Food Recommendation:
Merchandise Recommendation:
Healthcare Recommendation:
Dating Recommendation:
Scholarly Paper Recommendation:

Some more here:
netflix(Movies Recommendation):

Another movie ratings dataset: MovieTweetings -
Movie ratings are extracted from Twitter and added to the dataset on a daily basis.



Ikuti Channel Youtube Aku Yaa.. Jangan Lupa di subscribe. Terima kasih.

Google+ Followers

Popular Posts