Sunday, 23 February 2020


Difference Between Vector and Raster image


There are two kinds of computer graphics - raster (composed of pixels) and vector (composed of paths). Raster images are more commonly called bitmap images.

A bitmap image uses a grid of individual pixels where each pixel can be a different color or shade. Bitmaps are composed of pixels.

Vector graphics use mathematical relationships between points and the paths connecting them to describe an image. Vector graphics are composed of paths.

The image to the left below is representative of a bitmap and the image to the right is representative of a vector graphic. They are shown at four times actual size to exaggerate the fact that the edges of a bitmap become jagged as it is scaled up:
Bitmap Image:
bitmap.gif
Vector Graphic:
vector.gif
With Adobe® Systems' introduction of the PostScript® page-description language computers could display fonts and images using point-to-point math rather than by pixels alone. The advantage to using a page-description language such as PostScript becomes clear when you scale an image up. The larger you display a bitmap, the more jagged it appears, while a vector image remains smooth at any size. That is why PostScript and TrueType® fonts always appear smooth - they are vector-based.

The jagged appearance of bitmap images can be partially overcome with the use of "anti-aliasing". Anti-aliasing is the application of subtle transitions in the pixels along the edges of images to minimize the jagged effect (below left). A scalable vector image will always appear smooth (below right):
Anti-Aliased Bitmap Image:
antialias.gif
Smooth Vector Image:
smooth.gif
Bitmap images require higher resolutions and anti-aliasing for a smooth appearance. Vector-based graphics on the other hand are mathematically described and appear smooth at any size or resolution.
Bitmaps are best used for photographs and images with subtle shading. Graphics best suited for the vector format are page layout, type, line art or illustrations.

Wherever possible use the vector format for all your type, line art and illustrations and only use bitmaps for photos or images with complex or non-uniform shading. If the graphics application recognizes native vector files such as those created by Deneba Canvas™ (a filename with an extension of .CNV-  for versions 6 and 7), Adobe Illustrator® (a filename with an extension of .AI), CorelDRAW® (a filename with an extension of .CDR), or Macromedia® FreeHand® (a filename with an extension of .FH8 -  for version 8), then use them first.
The EPS File Format
If the graphics application you are using cannot read native vector files the next best thing would be to save them as EPS (Encapsulated PostScript) files. These are self-contained PostScript files which contain the same mathematical descriptions as the vector files they are made from. Even bitmaps can be saved in the EPS file format. EPS files are supported by most all graphics applications. It is the most portable format for this reason. It is best to use EPS files for all line art and illustrations because they can be reproduced at any size or resolution and still display exactly as they were drawn. Use them wherever native vector files cannot be used.
A Little of Both In Today's Applications
Today's graphic artist has to master both skills - image editing and illustration. In fact, Adobe Photoshop® - an image editor - incorporates vector based paths which can be exported as native vector files. Four of the major illustration programs - Deneba Canvas, Adobe Illustrator, CorelDRAW and Macromedia Freehand - allow bitmaps to be embedded in the vector files they create.
I believe that the ideal page layout program of the future would be primarily a vector-based application which would create, import, display and print native vector objects side by side with bitmaps. As computing power becomes more affordable I believe this will happen.

Friday, 14 February 2020

8 Tips to Protect Your Computer From Viruses and Malware

It may be a new year, but an old scam is making the rounds of online computer users.
The FBI recently issued a warning about a computer scam that starts on the telephone: You get a call from someone claiming to work for a “major software company.” (Hmm…wonder which one?) They tell you your computer is sending error messages to them over the Web, and they’ve detected a virus. No problem, however: All you have to do is pay them a fee and they’ll remotely fix your computer by installing anti-virus software on it.
Once the caller has your credit card number and access to your computer, they don’t remove viruses, however – they install them.
In October, the Federal Trade Commission cracked down on a similar scam that charged computer users from $49 to $450 to “remove” malware from their computers. The agency estimated “tens of thousands” of computer users fell prey to that scam.
The way to defeat these scams is simple enough – don’t give strangers your credit card numbers or access to your computer. But let’s take a look at eight additional ways you can protect yourself from viruses and malware:

1. Keep your software up to date

Software makers like Microsoft and Oracle routinely update their software to fix bugs that could potentially be exploited by hackers. Oracle just released on Sunday an update to its Java software to fix a security hole hackers could have used to infect computers with malware.
The software patch came after the Department of Homeland Security sent out an advisory late last week about the security flaw recommending computer users disable the Java plug-in in their Web browsers.

2. Don’t click on links within emails

A good rule of thumb is if you don’t recognize a sender of an email, don’t click on any links within it. Microsoft says 44.8 percent of Windows virus infections happen because the computer user clicked on something.

3. Use free antivirus software

You don’t have to pay for software to protect your computer or for an annual subscription to maintain the latest virus protection. For Windows users, Microsoft Security Essentials is free. Avast is another free anti-virus program.
See our story Antivirus Software is a Waste of Money for more ideas.

4. Back up your computer

Do you regularly back up the information on your computer? If you don’t – and 29 percent of computer users fall into that category – you have no protection from calamites ranging from hard drive failure to your house burning down. If you value your data, back it up.
You have three basic backup options: an external hard drive, online backup service, or cloud storage. Use a service like Google Drive, and your files will be continually backed up to the cloud. And the price is right: free for up to 5 GB of data. For more, see Online Storage Wars: Which Virtual Storage Is Best?

5. Use a strong password

strong password is one that is complex, with a mix of letters, numbers, and symbols. While some people use the same password for everything, try to avoid that practice.
Password security company SplashData.com says the three most common passwords are password, 123456, and 12345678. The company recommends avoiding using the same user name/password combination for multiple online site logins.
When creating a password, use eight characters or more and, to make them easier to remember, try using short phrases separated by spaces or underscore marks – such as “car_park_city?”
Best idea? Use a free service like LastPass to create and manage your passwords. You only have to remember one password: the one that opens your LastPass vault. Once you’ve opened it, LastPass will automatically log you in to every site you visit requiring a password. It’s really handy – check it out.

6. Use a firewall

Just because you have antivirus software running doesn’t mean you have a firewall. Both PCs and Macs come with built-in firewall software. Be sure to check that it’s enabled.

7. Minimize downloads

Make sure your Web browser’s security settings are high enough to detect unauthorized downloads. For Internet Explorer, the medium security setting is the minimum level to use.

8. Use a pop-up blocker

Web browsers have the ability to stop pop-up windows and allow you to set the security for accepting pop-ups. The federal OnGuardOnline site recommends never clicking on links within pop-up screens.
Even the most vigilant of computer users still run the risk of picking up malware. You should suspect a computer virus if your machine slows down, crashes, or repeats error messages.
Other clues include the computer failing to promptly shut down or restart, new toolbars you didn’t install, a changing home page, or a laptop battery draining faster than it should.
If you suspect your computer is infected, make sure your security software is updated, then scan the computer. If that doesn’t solve the problem, try typing a question into your favorite search engine to uncover forums where others might describe fighting and winning similar battles.
Bottom line? These days protecting yourself from viruses and lost data is much easier than it used to be and doesn’t have to cost a dime. Take a few minutes today to make sure you’re protected. You’ll be glad you did.
Following are the implementations of simple Breadth First Traversal from a given source.
The implementation uses adjacency list representation of graphs. STL‘s list container is used to store lists of adjacent nodes and queue of nodes needed for BFS traversal.
filter_none
edit
play_arrow
brightness_4
// Java program to print BFS traversal from a given source vertex.
// BFS(int s) traverses vertices reachable from s.
import java.io.*;
import java.util.*;
  
// This class represents a directed graph using adjacency list
// representation
class Graph
{
    private int V;   // No. of vertices
    private LinkedList<Integer> adj[]; //Adjacency Lists
  
    // Constructor
    Graph(int v)
    {
        V = v;
        adj = new LinkedList[v];
        for (int i=0; i<v; ++i)
            adj[i] = new LinkedList();
    }
  
    // Function to add an edge into the graph
    void addEdge(int v,int w)
    {
        adj[v].add(w);
    }
  
    // prints BFS traversal from a given source s
    void BFS(int s)
    {
        // Mark all the vertices as not visited(By default
        // set as false)
        boolean visited[] = new boolean[V];
  
        // Create a queue for BFS
        LinkedList<Integer> queue = new LinkedList<Integer>();
  
        // Mark the current node as visited and enqueue it
        visited[s]=true;
        queue.add(s);
  
        while (queue.size() != 0)
        {
            // Dequeue a vertex from queue and print it
            s = queue.poll();
            System.out.print(s+" ");
  
            // Get all adjacent vertices of the dequeued vertex s
            // If a adjacent has not been visited, then mark it
            // visited and enqueue it
            Iterator<Integer> i = adj[s].listIterator();
            while (i.hasNext())
            {
                int n = i.next();
                if (!visited[n])
                {
                    visited[n] = true;
                    queue.add(n);
                }
            }
        }
    }
  
    // Driver method to
    public static void main(String args[])
    {
        Graph g = new Graph(4);
  
        g.addEdge(0, 1);
        g.addEdge(0, 2);
        g.addEdge(1, 2);
        g.addEdge(2, 0);
        g.addEdge(2, 3);
        g.addEdge(3, 3);
  
        System.out.println("Following is Breadth First Traversal "+
                           "(starting from vertex 2)");
  
        g.BFS(2);
    }
}
// This code is contributed by Aakash Hasija

Output:
Following is Breadth First Traversal (starting from vertex 2)
2 0 3 1
Illustration :
bfs1bfs2
bfs3bfs4
bfs6bfs7
bfs8bfs9
bfs10bfs11
Note that the above code traverses only the vertices reachable from a given source vertex. All the vertices may not be reachable from a given vertex (example Disconnected graph). To print all the vertices, we can modify the BFS function to do traversal starting from all nodes one by one (Like the DFS modified version) .
Time Complexity: O(V+E) where V is number of vertices in the graph and E is number of edges in the graph.

resume format

क्या है डिजिटल अरेस्ट, साइबर फ्रॉड का नया तरीका, जानिए ये कैसा होता है

  क्या है डिजिटल अरेस्ट? डिजिटल अरेस्ट में किसी शख्स को ऑनलाइन माध्यम से डराया जाता है कि वह सरकारी एजेंसी के माध्यम से अरेस्ट हो गया है, उस...