What is Composer

Composer is a new standard for the management of PHP packages and libraries. Basically is used to manage the libraries on which the project depends.
Composer like so:

  • Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project and it will manage install/update.
  • Enables you to declare the libraries.
  • Finds out which versions of which packages can and need to be installed, and installs them.

Composer is actually inspired from npm from Node.js and Bundler from Ruby.

You might also be aware of PEAR. PEAR is an established PHP package manager that has been around for years. PEAR however, has been abandoned by many PHP developers for a number of reasons. Firstly, much of the code in PEAR is out-of-date. Secondly, PEAR forces you to install packages system wide, rather than on a project-by-project basis. This means that if you already have a project that relies on a slightly older package, you are screwed. For an excellent history of PHP packages, read Packages: The Way Forward for PHP by Phil Sturgeon.

What is LDAP?

LDAP is a Lightweight Directory Access Protocol. A directory contains objects; generally those related to users, groups, computers, printers.LDAP gives you query methods to add, update and remove objects within a directory.LDAP is also used to store your credentials in a network security system and retrieve it with your password and decrypted key giving you access to the services.
For example:

use the same login/passwd to login on an Intranet and on your local computer.
give specific permissions to a group of user. For example some could access some specific page of your Intranet, or some specific directories on a shared drive.
get all the contact details of the people in a company on Outlook for example

LDAP was designed at the University of Michigan to adapt a complex enterprise directory system (called X.500) to the modern Internet. X.500 is too complex to support on desktops and over the Internet, so LDAP was created to provide this service “for the rest of us.”

LDAP servers exist at three levels: There are big public servers, large organizational servers at universities and corporations, and smaller LDAP servers for workgroups. Most public servers from around year 2000 have disappeared, although directory.verisign.com exists for looking up X.509 certificates. The idea of publicly listing your email address for the world to see, of course, has been crushed by spam.

Disable compilation from command line

Magento Compilation – Compile, Clear, Enable and Disable from Command Line

If you have shell access running just got to shell folder

$ php shell/compiler.php

Usage:  php -f compiler.php — [options]

state         Show Compilation State
compile      Run Compilation Process
clear          Disable Compiler include path and Remove compiled files
enable       Enable Compiler include path
disable      Disable Compiler include path
help          This help

 

How To Export product with Category Names in Magento

<?php
ini_set(‘memory_limit’, ‘2048M’);
ini_set(‘max_execution_time’, 180000);

require_once ‘../app/Mage.php’;
umask(0);

// output headers so that the file is downloaded rather than displayed
header(‘Content-Type: text/csv; charset=utf-8’);
header(‘Content-Disposition: attachment; filename=products.csv’);
// create a file pointer connected to the output stream
$output = fopen(‘php://output’, ‘w’);

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$userModel = Mage::getModel(‘admin/user’);
$userModel->setUserId(0);

$collection = Mage::getModel(‘catalog/product’)
->getCollection()
->addAttributeToSelect(‘*’);

$attributeSetModel = Mage::getModel(“eav/entity_attribute_set”);

// $product->getModel(),$product->getProductcode(), //ColorCombination Material

foreach($collection as $product) {
$_cat = array();
$categoryName = array();

foreach ($product->getCategoryIds() as $Id) {
$_cat = Mage::getModel(‘catalog/category’)->setStoreId(Mage::app()->getStore()->getId())->load($Id);
$categoryName[] = $_cat->getName();
}
$categoryNameList = implode(“,”, $categoryName);

fputcsv($output, array(
$product->getId(),
$product->getSku(),
$product->getName(),
$product->getPrice(),
$product->getCommissionForProduct(),
$product->getDisplaySize(),
$product->getAttributeText(‘manufacturer’),
$product->getModelName(),
$product->getSuppliar(),
$product->getStatus(),
$categoryNameList
)
);
}
?>

Bootstrap: How to make dropdown navigation Parent links an active link?

please add below js, hope it will work

jQuery(function($) {
$(‘.navbar .dropdown’).hover(function() {
$(this).find(‘.dropdown-menu’).first().stop(true, true).delay(250).slideDown();

}, function() {
$(this).find(‘.dropdown-menu’).first().stop(true, true).delay(100).slideUp();

});

$(‘.navbar .dropdown > a’).click(function(){
location.href = this.href;
});

});

Why Python for Data Analysis?

Python has become one of the most popular dynamic,programming languages, along with Perl, Ruby, and others. Python and Ruby havebecome especially popular in recent years for building websites using their numerous web frameworks, like Rails (Ruby) and Django (Python). Such languages are often called scripting languages as they can be used to write quick-and-dirty small programs,or scripts. I don’t like the term “scripting language” as it carries a connotation that they cannot be used for building mission-critical software. Among interpreted languages Python is distinguished by its large and active scientific computing community. Adoption of Python for scientific computing in both industry applications and academic research has increased significantly since the early 2000s.
For data analysis and interactive, exploratory computing and data visualization,Python will inevitably draw comparisons with the many other domain-specific open source and commercial programming languages and tools in wide use, such as R, MATLAB,SAS, Stata, and others. In recent years, Python’s improved library support (primarily pandas) has made it a strong alternative for data manipulation tasks. Combined with Python’s strength in general purpose programming, it is an excellent choice as a single language for building data-centric applications.