Wednesday, 13 December 2017

Liferay 7 Search Container

Here we will learn how to display all records of Product table created in my  product service which i have created.
  1. productId
  2. productName
  3. productPrice
Step1 Open view.jsp page.Goto Windows→Show View→Snippets as shown here


Now navigate to Liferay UI Search Container → Model Search Container→Browse


From here select Product Entity as shown below.


This will insert liferay-ui:search-container code in your view.jsp as shown below.

<liferay-ui:search-container delta="5" deltaConfigurable="true" emptyResultsMessage="no-products">
<liferay-ui:search-container-results results="<%= ProductLocalServiceUtil.getProducts(searchContainer.getStart(), searchContainer.getEnd()) %>" />

<liferay-ui:search-container-row
className="com.liferay.product.service.model.Product"
modelVar="aProduct">
<liferay-ui:search-container-column-text property="productId"/>
<liferay-ui:search-container-column-text property="productName"/>
<liferay-ui:search-container-column-text property="productPrice"/>
  </liferay-ui:search-container-ow>

<liferay-ui:search-iterator />
</liferay-ui:search-container>

Here we use various tags which are explained as follow.
  1. <liferay-ui:search-container delta="" deltaConfigurable="" emptyResultsMessage=""/>  

This tag conatins following attributes

delta-This attribute is used to specify how many records per page we want to display.

deltaConfigurable--This attribute is used to specify whether user can change no of records displayed on page.It takes boolean value.

emptyResultsMessage--This is message that will be displayed when there are no records available to display

     2<liferay-ui:search-container-results results="" />

It take following attribute.

results--This attribute contains all records between start and end index which can be specified using searchContainer object as follows.

<liferay-ui:search-container-results results=
         "<%= ProductLocalServiceUtil.getProducts(searchContainer.getStart(), searchContainer.getEnd()) %>" />

   3<liferay-ui:search-container-row className="" modelVar="">

This tag contains following tags.

className--This attribute takes full path of your model attribute.

modelVar--This variable holds current object for each row.We can use this variable to get attribute values of object.

    4 <liferay-ui:search-container-column-text property="" name=""/>

property--this should be same as various fields of your Model Class (i.e Product) who's getter setter is already available.If match is found then it will display attribute value each time for current object.

name--This will be used to specify header name for each column.

href:- We can pass URL if we want some action to trigger on click of this field

    5 <liferay-ui:search-iterator />


  • This tag is used to iterate over list and generates row based on no of records in list.This must come after row tag.

View.jsp

<%@page
import="com.liferay.product.service.service.ProductLocalServiceUtil"%>
<%@ include file="init.jsp"%>
<portlet:renderURL var="addProductURL">
<portlet:param name="mvcPath" value="/addProduct.jsp" />
</portlet:renderURL>

<aui:button onClick= "${addProductURL}" value="add-product"></aui:button>

<liferay-ui:search-container delta="5" deltaConfigurable="true" emptyResultsMessage="no-products">
<liferay-ui:search-container-results results="<%= ProductLocalServiceUtil.getProducts(searchContainer.getStart(), searchContainer.getEnd()) %>" />

<liferay-ui:search-container-row
className="com.liferay.product.service.model.Product"
modelVar="aProduct">
<liferay-ui:search-container-column-text property="productId" name=""/>
<liferay-ui:search-container-column-text property="productName"/>
<liferay-ui:search-container-column-text property="productPrice"/>
</liferay-ui:search-container-row>

<liferay-ui:search-iterator />
</liferay-ui:search-container>

Ouput Will be:

Friday, 26 August 2016

Big Data applications

1. Fraud detection
For businesses whose operations involve any type of claims or transaction processing, fraud detection is one of the most compelling Big Data application examples. Historically, fraud detection on the fly has proven an elusive goal. In most cases, fraud is discovered long after the fact, at which point the damage has been done and all that's left is to minimize the harm and adjust policies to prevent it from happening again. Big Data platforms that can analyze claims and transactions in real time, identifying large-scale patterns across many transactions or detecting anomalous behavior from an individual user, can change the fraud detection game.
2. IT log analytics
IT solutions and IT departments generate an enormous quantity of logs and trace data. In the absence of a Big Data solution, much of this data must go unexamined: organizations simply don't have the manpower or resource to churn through all that information by hand, let alone in real time. With a Big Data solution in place, however, those logs and trace data can be put to good use. Within this list of Big Data application examples, IT log analytics is the most broadly applicable. Any organization with a large IT department will benefit from the ability to quickly identify large-scale patterns to help in diagnosing and preventing problems. Similarly, any organization with a large IT department will appreciate the ability to identify incremental performance optimization opportunities.
3. Call center analytics
Now we turn to the customer-facing Big Data application examples, of which call center analytics are particularly powerful. What's going on in a customer's call center is often a great barometer and influencer of market sentiment, but without a Big Data solution, much of the insight that a call center can provide will be overlooked or discovered too late. Big Data solutions can help identify recurring problems or customer and staff behavior patterns on the fly not only by making sense of time/quality resolution metrics, but also by capturing and processing call content itself.
4. Social media analysis
Of the customer-facing Big Data application examples we could discuss, analysis of social media activity is one of the most important. Everyone and their mothers are on social media these days, whether they're "liking" company pages on Facebook or tweeting complaints about products on Twitter. A Big Data solution built to harvest and analyze social media activity, like IBM's Cognos Consumer Insights, a point solution running on IBM's BigInsights Big Data platform, can make sense of the chatter. Social media can provide real-time insights into how the market is responding to products and campaigns. With those insights, companies can adjust their pricing, promotion, and campaign placement on the fly for optimal results.

Friday, 22 July 2016

Multimedia Advantages and Disadvantages

MULTIMEDIA SYSTEM
System means the combination of different components which work in coordination with each other in a certain manner so as to serve some specific purpose. Multimedia is the technology which can disseminate two or more different media like text, audio, video, etc in a single time frame. Thus multimedia system means the proper combination of different multimedia components which work together to create, edit, store and disseminate the multimedia components. Almost all of today’s multimedia systems take advantage of power and ease of computer systems. Without computers, today’s sophisticated multimedia cannot be thought of. So, multimedia system could be more accurately defined as the combination of computer hardware and software designed so as to create, store and disseminate the multimedia content.
The multimedia computer generally contains the following components.
1) Computer
2) Multimedia Software
3) Sound card
4) CD-Drive
5) Micro-Phone
6) CD-ROM Disk
7) Multimedia speakers/Head-Phones
8) Digital Camera and many other components.
All of some of the above mentioned components work together to make up the multimedia system which can capture, digitize, compress, decompress, retrieve the multimedia component (multimedia data) and show it into the output devices like Computer Monitor, Multimedia Projectors, etc. Literally speaking, all the components that could be used in the multimedia system are impossible to list out. The above mentioned are only some of the important components of multimedia computer system.

ADVANTAGES OF MULTIMEDIA
We have already mentioned various advantages of using multimedia. We can still specifically list out following points that explains the advantages of the multimedia.
1. It can be used to help students and teacher to teach as well as learn the given topics easily.
2. It can be used to spread the knowledge easily all over the world wide in the cheap cost.
3. It is easy to take the multimedia files from one to other places as it can be stored in the cheap and light storage devices like CD-ROM.
4. It can be used for any subject and for anyone.
5. It can be used in Television, Films Industries and for personal entertainments.
6. It is highly used to realize the concept of Open University, Distance Education System, and Video Conferencing.
7. It is also used in Internet to make up the interactive web-page contents.
8. We can give the everlasting impression to the intended audiences on a specific topic by the use of multimedia.
9. Colored pictures, Motion pictures and other graphics could be shown in monitors and other big screens so that many people could view it and make out the impression about it.
10. Multimedia systems are generally very interactive so it is interesting to use.

DISADVANTAGES OF MULTIMEDIA
In comparison to the enormous advantages we have very little disadvantages of multimedia. These disadvantages could be listed out as:
1. It is expensive to produce multimedia contents.
2. It is expensive to set up the multimedia systems.
3. It needs well trained manpower to create and use it.

4. Multimedia files are too large so, it is time consuming to transfer across the Internet and Intranet.

Wednesday, 13 July 2016

Hadoop Streaming

Hadoop streaming is a utility that comes with the Hadoop distribution. This utility allows you to create and run Map/Reduce jobs with any executable or script as the mapper and/or the reducer.

HOW STREAMING WORKS:In the above example, both the mapper and the reducer are python scripts that read the input from standard input and emit the output to standard output. The utility will create a Map/Reduce job, submit the job to an appropriate cluster, and monitor the progress of the job until it completes.
When a script is specified for mappers, each mapper task will launch the script as a separate process when the mapper is initialized. As the mapper task runs, it converts its inputs into lines and feed the lines to the standard input (STDIN) of the process. In the meantime, the mapper collects the line-oriented outputs from the standard output (STDOUT) of the process and converts each line into a key/value pair, which is collected as the output of the mapper. By default, the prefix of a line up to the first tab character is the key and the rest of the line (excluding the tab character) will be the value. If there is no tab character in the line, then the entire line is considered as the key and the value is null. However, this can be customized, as per one need.
When a script is specified for reducers, each reducer task will launch the script as a separate process, then the reducer is initialized. As the reducer task runs, it converts its input key/values pairs into lines and feeds the lines to the standard input (STDIN) of the process. In the meantime, the reducer collects the line-oriented outputs from the standard output (STDOUT) of the process, converts each line into a key/value pair, which is collected as the output of the reducer. By default, the prefix of a line up to the first tab character is the key and the rest of the line (excluding the tab character) is the value. However, this can be customized as per specific requirements.

Saturday, 2 July 2016

The future of BIG Data

Prescriptive analytics can be seen as the future of Big Data. If we see descriptive analytics as the foundation of Business Intelligence and we see predictive analytics as the basis of Big Data, than we can state that prescriptive analytics will be the future of Big Data. Earlier, I already explained the difference between these three types of analytics, but let’s have a small recap: descriptive analytics means looking at historic data, ranging from 1 minute ago to years ago. It can be compared as looking in the rear mirror while driving. Predictive analytics means using all that data to make a prediction about where to go; it is the navigation that tells you how to drive and when you will arrive. Prescriptive analytics is the self-driving car, that knows exactly what the best route is based on infinite data points and calculations. Not surprisingly, Google’s self-driving car makes extensive use of prescriptive analytics.
Prescriptive analytics uses the latest technologies such as machine learning and artificial intelligence to understand what the impact is of future decisions and uses those scenarios to determine the best outcome. With prescriptive analytics it becomes possible to understand and grasp future opportunities or mitigate future risks as predictions are continuously updated with new data that comes in. Prescriptive analytics basically offers organizations a crystal ball. Prescriptive analytics will become really powerful when it has developed into a stage where decision makers can predict the future and make prescriptions to improve that predicted future, without the needs for Big Data scientists.
Although prescriptive analytics is really still in its infancy, we see more and more use cases being developed. Also several Big Data startups focus especially on prescriptive analytics. The most well know is Ayata. They use patented software to predict what is going to happen, when it is going to happen and why it is going to happen. They focus primarily on the oil and gas industry, but there are more use cases of prescriptive analytics. Prescriptive analytics is used in scenarios where there are too many variables, options, constraints and data sets. Without technology it is too complex for humans to efficiently evaluate those scenarios. Also when experimenting in real-life is too risky or expensive, prescriptive analytics can come to rescue. Let’s have a look at three of the possible use cases:

Saturday, 4 June 2016

Big Data for the Enterprise

With Big Data databases, enterprises can save money, grow revenue, and achieve many other business objectives, in any vertical.

  • Build new applications: Big data might allow a company to collect billions of real-time data points on its products, resources, or customers – and then repackage that data instantaneously to optimize customer experience or resource utilization. For example, a major US city is using MongoDB to cut crime and improve municipal services by collecting and analyzing geospatial data in real-time from over 30 different departments.
  • Improve the effectiveness and lower the cost of existing applications: Big data technologies can replace highly-customized, expensive legacy systems with a standard solution that runs on commodity hardware. And because many big data technologies are open source, they can be implemented far more cheaply than proprietary technologies. For example, by migrating its reference data management application to MongoDB, a Tier 1 bank dramatically reduced the license and hardware costs associated with the proprietary relational database it previously ran, while also bringing its application into better compliance with regulatory requirements.
  • Realize new sources of competitive advantage: Big data can help businesses act more nimbly, allowing them to adapt to changes faster than their competitors. For example, MongoDB allowed one of the largest Human Capital Management (HCM) solution providers to rapidly build mobile applications that integrated data from a wide variety of disparate sources.
  • Increase customer loyalty: Increasing the amount of data shared within the organization – and the speed with which it is updated – allows businesses and other organizations to more rapidly and accurately respond to customer demand. For example, a top 5 global insurance provider, MetLife,used MongoDB to quickly consolidate customer information from over 70 different sources and provide it in a single, rapidly-updated view.

Tuesday, 31 May 2016

Few Things about Data science

Data science was developed to handle the flood of big data engulfing the world. A blend of statisticians, computer scientists and creative thinkers, data scientists have the:
  • Skills to collect, process and extract value from giant and diverse data sets
  • Imagination to understand, visualize and communicate their findings to non-data scientists
  • Ability to create data-driven solutions that boost profits, reduce costs and even help save the world
Data scientists work in every industry – from the Defense Department to Internet start-ups to financial institutions – and tackle big data projects on every level.
One of the most popular jobs of the 21st century is only getting better. A McKinsey report estimates that by 2018, the U.S. could face a shortage of 140,000 to 190,000 data scientists and 1.5 million managers and analysts who understand how to use big data to make decisions. Do you have to invest in a master’s degree? Not necessarily. Plenty of successful data scientists launched their careers with a B.S. and a hefty handful of skills. However, as data problems become more complex, many big companies are demanding advanced degrees. Some of the industries employing data scientists include:
  • Pharmaceuticals
  • Computer Software
  • Internet
  • Research
  • IT and Services
  • Biotechnology
They may pay you good money for your efforts. Silicon Valley salaries for entry-level data scientists can reach six figures (see this article).

Schools Offering Master’s Programs in Data Science

Ready to make the leap? In our annotated list of great schools, you’ll find information on each program’s:
  • Location and length
  • Full-time, part-time and online options
  • Concentrations and majors
  • Courses, internships and real-world opportunities
Look for quality. Universities are scrambling to offer new degrees, but there’s no guarantee they’ll be worth the investment. Research the background of the program and professors. Search for solid partnerships with businesses and research institutions. Ask about job placement figures. You deserve a practical qualification.

Data Science Industries

Focusing on a particular industry? We’ve created a reference for past, present and future to help you prepare for what’s ahead. On each industry page, you’ll discover:
  • A condensed history of data science within the field
  • Current opportunities and developments
  • Examples of vendors and big data projects
  • Data-related risks and regulations
We don’t discuss many typical day-to-day tasks or job titles primarily because these vary widely among employers. Indeed, the first requirement on many job listings isflexibility.

Data Science Blog

Need more guidance? Grab a cup of coffee and browse our data science blog. We’ve included articles such as:
  • Data Scientist Foundations
  • Open Source Tools for Big Data Analysis
  • New Technologies in Data Science
They’re all designed to provide you with a practical knowledge base to help launch your career.