How to Generate SEO Friendly URL in Rails 3.x

Rails3SEO friendly URLs are more important to make a page popular & search engines to crawl.

FriendlyId is the slugging and permalink plug-in for Ruby on Rails. It allows you to create pretty URLs and work with human-friendly strings.

The URLs created by slug are very useful for SEO. It is designed for generation of URL slug and history maintenance.

Steps to create Pretty URLs:

Step#1

Include gem in your Gem file:

gem 'friendly_id'

Then run bundle install.

Step#2

Modify your model on which you want the pretty URL:

extend FriendlyId
 
friendly_id :title, use: :slugged

Step#3

Add the slug column in your migration file to add it on the table

add_column :articles, :slug, :string

Then run

rake db:migrate

Now if you create an article with Title like “This is a demo title for testing”,
it will create a SEO friendly URL like “this-is-a-demo-title-for-testing” and will
save into the articles table under slug column.

Merge And Split PDF In PHP Using PDFtk

Merge a group of PDF files to a single PDF file without disturbing the contents using PDFtk.

  • PDFtk runs on a variety of platforms, including Windows, Linux, Mac OSX, FreeBSD, and Solaris.
  • It does not require Acrobat and allows you to manipulate PDF easily and freely.

What All You Can Do in PHP Using PDFtk

  • Merge PDF documents to one.
  • Rotate PDF Pages or documents.
  • Split the pages of the PDF into a new document.
  • Encrypt the output as desired.
  • Decrypt the Input as necessary but requires a password
  • Background watermark or a foreground stamp can be applied
  • Report on PDF metrics can be generated such as metadata, bookmarks, and page labels.
  • Update PDF metadata.
  • Attach numerous files to the PDF document.
  • Compress a PDF document into a single page.

Under the GPL, PDFtk is licensed for the public.

Download Link: https://github.com/bensquire/php-pdtfk-toolkit

Examples:

You can provide two or more PDF files as arguments to create a single PDF file as output.
Merge two or more PDFs into a new PDF file with all the original contents

  • pdftk example1.pdf example2.pdf example3.pdf cat output result.pdf

Rotate the first page of a PDF to 90 degrees clockwise

  • pdftk in.pdf cat 1E 2-end output out.pdf

Rotate all the pages of the PDF document by 180 degrees

  • pdftk in.pdf cat 1-endS output out.pdf

Report on PDF document metadata, bookmarks and page labels

  • pdftk mydoc.pdf dump_data output report.txt

Security Flaws Persist in Java 7u10 Update

Java DevelopmentOracle has released new updates for Java with security enhancements for better performance.

This new release of Java SE 7 update 10 is now certified for both Windows 8 and Mac OS X operating systems.

These updates include the ability to use the control panel to prevent Java applications from running in browsers, as well as to set a level of security for unsigned applets, Java FX applications, and Java Web Start applications.

It also adds a dialogue box to warn people when Java plug-in updates are available for download.

But the update of JDK 7u10 has failed to fix some major security troubles and have brought only minor improvements, experts say.

Andrew Storms, the director of security operations at ncircle quoted “New features notwithstanding, Oracle still has a long way to go to improve security” referring to the fact that the hackers are aware that most people do not keep the Java plug-in up to date, hence leaving old flaws open to misuse by the trespassers and attackers.

HP’s security research division reported that in the year 2011 an attack integrated with the black hole toolkit had more than 75 percent success rate for the attackers.

According to the reports it is also said that for large businesses and Industries, only a full-time IT security staff will be able to figure out the new settings help and if managed centrally from Microsoft Active Directory or other directory servers.

Storms also stated “Without this access, the new settings will essentially be useless to enterprise IT teams” and pointed out that consumers are not worrying to update Java; they are unwilling to learn the uses control panel.

Besides the security flaws, other fixes include Windows command line issues, the ability to allow sandbox warning banner to grant access.

Share your memories instantly with Andolapic

Andolapic iOS APPIf you like to take photos, you would like to share them as well. There are numerous apps available, which let you share your photos with your friends and this photo-sharing trend is at its pinnacle nowadays.

Andolapic a photo-sharing iPhone app developed by Andolasoft which offers interesting features to help you share your memories with your friends.

Andolapic is quite amazing like Instagram and features intriguing functionality to improve your photo sharing experience.

To make photo sharing even easier it is built on top of social photo-sharing app which lets you share photos instantly with your friends.

Some of the features of Andolapic are:

Snap & Share: You don’t have to wait, to click and share your photos. Photos are shared instantly, the moment you take a snap from Andolapic.

Follow and Un-follow: Follow your friends whose photos you want to see and comment. Un-follow if they are clogging photos which are most undesirable.

Post, Like and Comment: User can Post photos, like friend’s photos, and leave comments easily.

Upload and Remove Pics: Upload photos through Andolapic and remove them if you don’t like it to be visible. We’ve also developed it for the iPad for more convenience. Andolapic is also available to Facebook users to share photos directly from Facebook.

Andolapic is one of the best photo sharing apps in the market which gives you amazing photo sharing experience and is a marvel of iPhone application development. You can get it from iTunes.

Collecting Contacts Using Cardmagic-Contacts Pplug-in in Rails 2.3.8

Rails3

Cardmagic-Contacts is a rails plug-in which provides an interface to fetch contact list information from various email providers including Hotmail, AOL, Gmail, Plaxo, Yahoo and many more.

This example narrates how to extract contact list using Rails 2.3.8 and cardmagic-contacts plug-in

Step#1

  • Download the plug-in by running the command below to store the plug-in in the folder “vendor/plug-ins”

Windows

ruby script/plugin install git://github.com/cardmagic/contacts

Linux

ruby script/plugin http://github.com/cardmagic/contacts

Step#2

  • Write down the following code on the top of the controller class
require 'contacts'

Step#3

  • Pass the required gmail/yahoo/hotmail/AOL login & password from view
<div>
 
<div style="margin-left:25px;" >Invite <img src="../images/yahoo.JPG">Yahoo
 
Friends </div>
 
<div style="margin-left:25px;">Yahoo Email: <input type="text" name="email"
 
id="yahoo_email_id"></div>
<div style="margin-left:25px;">Password:   <input type="password"
 
name="email"  id="yahoo_pwd_id"></div>
 
<div style="margin-left:122px;margin-top:20px;"><input type="button"
 
value="Login" name="btn_submit" id="btn_submit" ></div>
 
</div>

Step#4

  • Create an action to fetch the list of contacts for a specific email id

def grab_contacts #Grab gmail contacts @gmail_contacts=Contacts::Gmail.new(login, password).contacts #or @gmail_contacts=Contacts.new(:gmail, login, password).contacts #Grab yahoo contacts @yahoo_contacts = Contacts::Yahoo.new(login, password).contacts #or @yahoo_contacts = Contacts.new(:yahoo, login, password).contacts #Grab hotmail contacts @hotmail_contacts =Contacts::Hotmail.new(login, password).contacts #or @hotmail_contacts = Contacts.new(:hotmail, login, password).contacts end

Step#5

  • Here is also alternate method to get the contacts by providing  email_id and password
any_mail = Contacts.guess(login, password).contacts

The “Contacts.guess” method will automatically concatenate the entire
address book from each of the successful logins. If the login and password is
working with multiple email accounts then it will grab the contacts from all accounts.

Step#6

  • Display the friends list in your view page
<table>
<th>
<td >Friends Name</td>
<td >Friends Email</td>
</th>
<tr>
<% @gmail_contacts.each do |contact| %>
<td><%=contact[0]%></td>
<td><%=contact[1]%></td>
<% end %>
</tr>
</table>

iPhone 4S Has Taken The Market Sales High Compared To iPhone 5

Soon after the release of the iPhone 5, it went on to become the highest-selling iPhone in history, but based on the recent survey, it has shown some reports for which Apple’s investors are alarmed of possible unfavorable events.

According to new research, this suggested that consumer’s interest in Apple’s popular iPhone 5 lineup may have peaked.

But shares of Apple have decreased since the last month from September. The share has decreased over 25% from as high as $705.07, for which investors are now beginning to panic about Apple’s future.

Never miss an update from us. Join 10,000+ marketers and leaders.

UBS analyst Steve Milunovich has estimated for Apple’s fiscal year 2013 and 2014 and has also dropped his price target on Apple shares to $700 from an earlier target of $780.

Milunovich quoted “Some of our Chinese sources do not expect the iPhone5 to do as well as the iPhone 4S”.

Recently consumers in China have also revealed that they would prefer iPhone 4S over the new iPhone5.

The Wall Street Journal wrote over the iPhone5 launch as “arguably the least eventful launch of an Apple device in the company’s four-year history in the Chinese capital”.

Apple’s iPhone 5 demand didn’t show up as expected because of the fact that Apple delivered iPhone 5 with a familiar design and without any exciting features which was much expected by most of the consumers, along with that the malfunctioning iOS6 map apps also played a major part in decreasing iPhone 5 sales this year, even less than the iPhone 4S.

As per the latest survey, it is found that developers still prefer iOS5 over iOS6 for iPhone application development.