Monday, 26 October 2015

C Program to Print Patterns

C program to print following pattern

A
AB
ABC
AB
A

#include<stdio.h>
int main()
{
int i,j,x=3;
char ch;
for(i=1;i<=5;i++)
{
ch='A';
for(j=1;j<=i;j++)
{
if(j>x)
printf("");
}
else
printf("%c",ch);
ch++;
}
printf("\n");
if(i>=3)x--;
}
return 0;
}

C Program to print following pattern

ABCDEFG
 ABCDE
  ABC
   A


#include<stdio.h>
int main()
{
int i,j,l,r;
char ch;
l=1;
r=7;
for(i=1;i<=4;i++){
ch='A';
for(j=1;j<=7;j++)
{
if(j>=l&&j<=r){
printf("%c",ch);
ch++;
}
else
printf(" ");
}
l++;r--;
printf("\n");
}
}



Sunday, 25 October 2015

Printers

A printer is an external output device that takes data from a computer and generates output in the form of graphics / text on a paper".
There are two types of printers.

Impact printers

An impact printer makes contact with the paper. It usually forms the print image by pressing an inked ribbon against the paper using a hammer or pins. Following are some examples of impact printers.

Dot-Matrix Printers

The dot-matrix printer uses print heads containing from 9 to 24 pins. These pins produce patterns of dots on the paper to form the individual characters. The 24 pin dot-matrix printer produces more dots that a 9 pin dot-matrix printer, which results in much better quality and clearer characters. The general rule is: the more pins, the clearer the letters on the paper. The pins strike the ribbon individually as the print mechanism moves across the entire print line in both directions, i-e, from left to right, then right to left, and so on. The user can produce a color output with a dot-matrix printer (the user will change the black ribbon with a ribbon that has color stripes). Dot-matrix printers are inexpensive and typically print at speeds of 100-600 characters per second.

Daisy-wheel printers


In order to get the quality of type found on typewriters, a daisy-wheel impact printer can be used. It is called daisy-wheel printer because the print mechanism looks like a daisy; at the end of each “Petal” is a fully formed character which produces solid-line print. A hammer strikes a “petal” containing a character against the ribbon, and the character prints on the paper. Its speed is slow typically 25-55 characters per second.

Line printers

In business where enormous amount of material are printed, the character-at-a-time printers are too slow; therefore, these users need line-at-a-time printers. Line printers, or line-at-a-time printers, use special mechanism that can print a whole line at once; they can typically print the range of 1,200 to 6,000 lines per minute. Drum, chain, and band printers are line-at-a-time printers.

Drum printer

A drum printer consists of a solid, cylindrical drum that has raised characters in bands on its surface. The number of print positions across the drum equals the number available on the page. This number typically ranges from 80-132 print positions. The drum rotates at a rapid speed. For each possible print position there is a print hammer located behind the paper. These hammers strike the paper, along the ink ribbon, against the proper character on the drum as it passes. One revolution of the drum is required to print each line. This means that all characters on the line are not printed at exactly the same time, but the time required to print the entire line is fast enough to call them line printers. Typical speeds of drum printers are in the range of 300 to 2000 lines per minute.

Chain printers

A chain printer uses a chain of print characters wrapped around two pulleys. Like the drum printer, there is one hammer for each print position. Circuitry inside the printer detects when the correct character appears at the desired print location on the page. The hammer then strikes the page, pressing the paper against a ribbon and the character located at the desired print position. An impression of the character is left on the page. The chain keeps rotating until all the required print positions on the line have filled. Then the page moves up to print the next line. Speeds of chain printers range from 400 to 2500 characters per minute.

Band printers

A band printer operates similar to chain printer except it uses a band instead of a chain and has fewer hammers. Band printer has a steel band divided into five sections of 48 characters each. The hammers on a band printer are mounted on a cartridge that moves across the paper to the appropriate positions. Characters are rotated into place and struck by the hammers. Font styles can easily be changed by replacing a band or chain.

Non-impact printers

Non-impact printers do not use a striking device to produce characters on the paper; and because these printers do not hammer against the paper they are much quieter. Following are some non-impacted printers.

Ink-jet printers


Ink-jet printers work in the same fashion as dot-matrix printers in the form images or characters with little dots. However, the dots are formed by tiny droplets of ink. Ink-jet printers form characters on paper by spraying ink from tiny nozzles through an electrical field that arranges the charged ink particles into characters at the rate of approximately 250 characters per second. The ink is absorbed into the paper and dries instantly. Various colors of ink can also be used.
One or more nozzles in the print head emit a steady stream of ink drops. Droplets of ink are electrically charged after leaving the nozzle. The droplets are then guided to the paper by electrically charged deflecting plates [one plate has positive charge (upper plate) and the other has negative charge (lover plate)]. A nozzle for black ink may be all that’s needed to print text, but full-color printing is also possible with the addition of needed to print text, but full-color printing is also possible with the addition three extra nozzles for the cyan, magenta, and yellow primary colors. If a droplet isn’t needed for the character or image being formed, it is recycled back to its input nozzle.
Several manufacturers produce color ink-jet printer. Some of these printers come with all their color inks in a cartridge; if you want to replace on color, you must replace all the colors. Other color ink-jet printers allow you to replace ink individually. These printers are a better choice if user uses one color more than other colors. These printers produce less noise and print in better quality with greater speed.

Laser printers


A laser printer works like a photocopy machine. Laser printers produce images on paper by directing a laser beam at a mirror which bounces the beam onto a drum. The drum has a special coating on it to which toner (an ink powder) sticks. Using patterns of small dots, a laser beam conveys information from the computer to a positively charged drum to become neutralized. From all those areas of drum which become neutralized, the toner detaches. As the paper rolls by the drum, the toner is transferred to the paper printing the letters or other graphics on the paper. A hot roller bonds the toner to the paper.
Laser printers use buffers that store an entire page at a time. When a whole page is loaded, it will be printed. The speed of laser printers is high and they print quietly without producing much noise. Many home-use laser printers can print eight pages per minute, but faster and print approximately 21,000 lines per minute, or 437 pages per minute if each page contains 48 lines. When high speed laser printers were introduced they were expensive. Developments in the last few years have provided relatively low-cost laser printers for use in small businesses.

Advantages of Laser Printer

  • The main advantage of Laser printer is its speed & efficiency at which it prints high-quality quality graphics & text.
  • Laser printers produce high-quality output as compared to other printers.
  • Laser printers are quite and does not produce disturbing sounds.
  • They are also capable to produce color prints.

 Disadvantages of Laser Printer

  • The main disadvantage of Laser printer is its cost, they are relatively costly as compared to other printers.
  • The maintenance, repair & servicing charges are also high of these printers.
  • Laser printers emit small amount of ozone and are hazardous to health and the atmosphere.


Thursday, 15 October 2015

China has 596 Billionaires and forget about India, but that's even way higher than the US!


For the first time ever, the number of billionaires in China has been found to be above the USA. Confirmed in an annual survey, the world's second largest economy has 596 billionaires, up a "staggering" 242 over the last year. Shanghai-based luxury magazine publisher Hurun Report said,the number of billionaires in the US is 537.

"Despite the slowdown in the economy, China's richest have defied gravity, recording their best year ever," Hurun Report Chairman Rupert Hoogewerf said in a statement.

Real estate and entertainment magnate Wang Jianlin dethroned founder of e-commerce giant Alibaba Jack Ma as the country's richest person, Hurun's annual wealth ranking showed.

Wang, who founded conglomerate Wanda, saw his fortune jump more than 50 percent to $34.4 billion, helped by a surge in the stock price of a listed unit.

Wang is known outside China for a string of overseas acquisitions including the organizer of Ironman extreme endurance contests, Swiss sports marketing group Infront, and a stake in Spanish football club Atletico Madrid.

He burst into the spotlight in 2012 by buying US cinema chain AMC Entertainment for $2.6 billion.

Wang took the top spot back from Ma, executive chairman of Alibaba, because of a collapse in the Internet company's New York-quoted shares, which were the world's biggest initial public offering when it listed last year. Ma's wealth still stands at $22.7 billion.

Beverage tycoon Zong Qinghou of Wahaha remained in third place with just over $21 billion while Pony Ma, founder of Internet giant Tencent which operates popular messaging app WeChat, took fourth place with a little under $19 billion.

Lei Jun of smartphone maker Xiaomi, which is seeking to challenge Apple, jumped five places to fifth by doubling his wealth to more $14 billion.

Yan Hao of road builder China Pacific Construction was sixth while the founder of search engine giant Baidu, Robin Li, dropped to seventh amid worries over his company's huge spending to expand its business.

Number System - Introduction to information technology

NUMBER SYSTEM CONVERSION

There are many methods or techniques which can be used to convert numbers from one base to
another. We'll demonstrate here the following −
1-Decimal to Other Base System
2-Other Base System to Decimal
3-Other Base System to Non-Decimal
4-Shortcut method − Binary to Octal
5-Shortcut method − Octal to Binary
6-Shortcut method − Binary to Hexadecimal
7-Shortcut method − Hexadecimal to Binary

Decimal to Other Base System

Step 1Divide the decimal number to be converted by the value of the new base.
Step 2Get the remainder from Step 1 as the rightmost digit leastsignificantdigit of new base number.
Step 3Divide the quotient of the previous divide by the new base.
Step 4Record the remainder from Step 3 as the next digit totheleft of the new base
number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero in Step
3.
The last remainder thus obtained will be the Most Significant Digit MSD of the new base number.
Example:−

Decimal Number: 2910

Calculating Binary Equivalent

Step                    Operation                        Result                 Remainder

Step 1                  29 / 2                          14                       1
Step 2                  14 / 2                           7                        0
Step 3                     7 / 2                          3                        1
Step 4                     3 / 2                          1                        1  
Step 5                     1 / 2                           0                       1



As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that

the first remainder becomes the Least Significant Digit LSD and the last remainder becomes the
Most Significant Digit MSD.
Decimal Number − 2910 = Binary Number − 111012

Other Base System to Decimal System

Steps
Step 1 − Determine the column positional value of each digit 
this depends on the position of the digit and the base of the number system.
Step 2 − Multiply the obtained column values inStep1 by the digits in the corresponding 
columns.
Step 3 − Sum the products calculated in Step 2. The total is the equivalent value in decimal

Other Base System to Non-Decimal System
Steps

Step 1 − Convert the original number to a decimal number base10.
Step 2 − Convert the decimal number so obtained to the new base number.

Shortcut method - Binary to Octal

Steps
Step 1 − Divide the binary digits into groups of three startingfromtheright.
Step 2 − Convert each group of three binary digits to one octal digit


Example:-
Binary Number − 101012

Calculating Octal Equivalent −
Step           Binary Number              Octal Number
Step 1           101012                            010 101
Step 2           101012                              28 58
Step 3           101012                                258

Binary Number − 101012 = Octal Number − 258















Microsoft's gutsy challenge to Apple's Hardware: 'Our Best Verses Their Best'

Microsoft Surface Book

Microsoft Surface Book.

When Microsoft first introduced its Surface Book laptop last week, Surface exec Panos Panay made the bold claim that it was twice as fast as the MacBook Pro.
Microsoft VP of Windows and Devices Terry Myerson doubled down on that claim in an interview with Business Insider, saying that the Surface Book laptop is squarely aimed at winning over Apple fans.

As you might expect, Apple fans are skeptical of this claim, especially since Microsoft has yet to release many details on the dedicated graphics unit that sits in the Surface Book's keyboard.

And at first blush, Microsoft's numbers are looking a little suspicious, especially in light of the Surface Book specs we have, which show that it's a powerful laptop, but not extraordinarily so.

But the company is backing Panay's statement all the way.

The "mantra" on the Surface Book team when it comes to comparisons with Apple is "our best vs. their best," meaning that Microsoft is pitting "best available Surface Book against the best available 13-inch MacBook Pro."

Here's why Apple fans are still unconvinced.

A matter of design

The thing that's so special about the Surface Book, beyond its neat industrial design and detachable tablet, is that in the higher-end models, the keyboard itself adds some horsepower to the equation, beyond just the regular processor (CPU) housed in the tablet portion.

When the tablet is docked with the keyboard, the laptop gets access to a superfast Nvidia GeForce graphics processing unit (GPU) that turns Surface Book into a gaming and media powerhouse. That GPU has 1GB GDDR5 of high-speed memory, customized by Nvidia to fit into the Surface Book's svelte shell.

That approach is a part of why the Surface Book commands a price tag that starts it at $1,699 for one with the dedicated graphics chip in the keyboard. It's a cost well above the vast majority of Windows machines. But those prices is similar to many MacBook models.

This has sparked conversations, like this Reddit thread, about whether or not the Surface Book is actually twice as fast as the MacBook Pro, especially compared to Apple's selection of 13-inch screen models.

Comparing processors

Hold tight, because this is going to get a little nerdy.

The base Surface Pro has a Intel Core i5 2.4 GHz dual-core chip, and the high-end ones ship with an Intel Core i7 2.6 GHz. Meanwhile, the lowest-end MacBook Pro, with one of Apple's super-sharp Retina displays, sports a cheaper $1,300 price tag - and an Intel Core i5 2.5 GHz processor, just slightly better than the base Surface Pro.

The only way the Surface Book conclusively beats the MacBook Pro in speed, just based on the specs we have available and not accounting for performance, is if you redline that sucker and order a maxed-out model for $2,699.
The Surface Book's graphics processing unit (GPU)

Even then, it offers worse CPU performance than a tricked-out $2,199 13-inch MacBook Pro, which has a 3.1 GHz processor. The only win is on graphical performance, since the MacBook Pro has an integrated graphics unit, compared with the Surface Book's dedicated unit in the keyboard.

Moreover, the maxed-out Surface Book's $2,699 price tag is still a little higher than the $2,499 you'd pay for a high-end 15-inch MacBook Pro, which offers a bigger screen and a graphics unit with twice as much memory as Microsoft's laptop.

The bottom line: Without knowing more about the Surface Book's graphics unit, it's hard to tell for sure. But Microsoft's claims that the Surface Book is twice as fast as a MacBook Air are going to be tough to back up.

Microsoft stands by its claims

Still, Microsoft is sticking to its guns. A company spokesperson sent the following statement:

Our validated performance claims are for the Microsoft Surface Book with an Intel Core i7 with 16GB RAM and custom discrete NVIDIA GeForce GPU against the MacBook Pro 13-inch with Retina display with an Intel Core i7 with 16GB RAM. We used third-party benchmarks to test the best available Surface Book against the best available 13-inch MacBook Pro.

In other words, Microsoft isn't worrying about the 15-inch MacBook Pro at all, neither is it concerned about the price tag or bang for the buck compared with Apple. All Microsoft is aiming at here is building a blazing-fast 13-inch laptop.

Friday, 2 October 2015

How Does WordPress Make Money?

How can a software company like Automattic make money when they are giving away WordPress blogging software for free? WordPress founder Matt Mullenweg shared how WordPress makes money:
1. Web Hosting – WordPress offers web hosting services to big brands like WSJ’s All Things D, CNN, TechCrunch, Time.com and more. The pricing forWordPress VIP Hosting starts at $15,000 per month.
2. Google AdSense– Free blogs hosted on WordPress.com may sometimes carry Google AdSense ads and the ad revenue goes to WordPress. The Google ads will only appear if all the following three conditions are met:
  1. The visitor is not using Firefox browser.
  2. He has logged out of his WordPress account, if he has one.
  3. The referring source is not a WordPress powered blog. So if you land on abc.wordpress.com from xyz.wordpress.com, you won’t see any Google Ads.
Even with all these conditions, the revenue generated from serving Google AdSense ads on WordPress.com hosted blog may still be significant as they do around a billion page views per month.
3. WordPress themes – The WordPress themes directory offers premium themes that cost anywhere between $50 and $100. These GPL compatible themes are developed by third-party WordPress developers and Automattic gets a commission per sale.
4. Premium Accounts – While anyone can host a blog on WordPress.com for free, they charge you a fixed fee if you want to buy additional storage space for your multimedia files or if you wish to use custom web domain instead of the default wordpress.com sub-domain. These are premium features.
There are unconfirmed reports that WordPress may soon allow users to add AdSense in their free blogs for a subscription fee.
5. Web Host Referrals – WordPress.org suggests of list of third-party web hosting companies where you may self-host your WordPress blog(s) for a fee. Now all these are referral links so Automattic gets a commission per sale.
In fact, this hosting referral system may be extremely profitable for Automattic because if you search for “WordPress Hosting” on Google (a very competitive keyword phrase), the first sponsored link on the Google results page is paid by WordPress itself and it says – “Top 5 WordPress Web Hosts – Chosen by the developers of the WordPress blogging software”.
6. WordPress Support – If you need help with WordPress (or WordPress MU) but the free support forums aren’t solving the purpose, consider subscribing to the Support Network of Automattic. The WordPress development team will help you solve problems related to your WordPress system and the response time can be as low as 6 hours. This service is primarily for Enterprise users who are willing to shell out a $2.5-5k per year for support.
7. Poll Daddy – I am not sure if Matt discussed this but Automattic also provides a paid version of Poll Daddy where you can have unlimited number of questions per survey and there’s no Poll Daddy branding in your polls or surveys.
8. Guided Transfers – If you wish to move your blog from WordPress.com to WordPress.org, Automattic offers a service called Guided Transfers to help you with the transfer. They charge a one-time $119 fee for the transfer.
9. VaultPress – Should you wish to automatically backup your WordPress blog to the cloud, the VaultPress service from Automattic can help. With packages starting at $15 per month, they will backup your WordPress blog in real-time and will also notify you of potential security issues.
10. VideoPress – The VideoPress plugin for WordPress lets you host videos and audio files on your own website. There are no limits on bandwidth or duration of videos, the videos are served without ads and it supports HD playback as well. Starts at $60 per year.
11. Automattic Kismet – You don’t often see spam in your blog posts because it all gets filtered by Automattic Kismet (Akismet for short), the excellent spam protection plug-in available for WordPress.