Monday 3 February 2014

Zycus Interview Questions Feb 2014

Aptitude Test:

First Round:

1). What will the day and date after 43 days of 24th June,saturday?

2). There are election between two students , one got 55% of the total valid votes, 20% of votes were invalid. if total votes was 7500 , than find number of valid votes that got?

3). Complete 2,1,1/2,1/4.....??

4). A train passes a station platform in 36 seconds and a man standing on the
platform in   20 seconds. If the speed of the train is 54 km/hr, what is the length of the platform?

5) which number should be add in 11158 to make it divisible by 77?
    a.9 b.8 c.7 d.5
6)count square from image


Second Round

Write a Program:

1.Check given string is rotated version or not.

ex: 
$string1 = '12345'; 
$string2 = '45123';  

output: true

$string1 = '12345'; 
$string2 = '45213';

output: false

2.Make spiral matrix and get the sum of diagonal of matrix.

Sunday 29 July 2012

Get Remote Domain Links

Here's a small function I wrote to get all page links using the DOMDocument which will hopefully be of use to others..

<?php

$links = get_links("http://www.facebook.com");
echo "<pre>";print_r($links);exit;
 

function get_links($url) {
        $xml = new DOMDocument();
        @$xml->loadHTMLFile($url);
        $links = array();
        foreach($xml->getElementsByTagName('a') as $link) {
            if ($link->getAttribute('href') != '#' && $link->getAttribute('href') != '') {
                $links[] = array('url' => trim($link->getAttribute('href')), 'text' => trim($link->nodeValue));
            }
        }

        return $links;
    }
    ?>

 

Tuesday 26 June 2012



<?php
$con = NewConnection('host','db','user','pass');

function NewConnection($server, $database, $username, $password){
// Assign variables
$db_server = $server;
$db_database = $database;
$db_username = $username;
$db_password = $password;
try
{
$db_connection = mysql_connect ($server, $username, $password, true);
mysql_select_db ($database);
if (!$db_connection)
{
throw new Exception('MySQL Connection Database Error: ' . mysql_error());
}
else
{
$CONNECTED = true;
echo "Connected";
}
}
catch (Exception $e)
{
echo $e->getMessage();
}
}
exit;
?>

Sunday 22 April 2012

Check URL...How to add http:// and https:// and www in ur existing url if not present in url in php?
<?php
echo "<pre>";

$url = "ervijaysinhparmar.blogspot.com";//$_SERVER['HTTP_HOST'];

echo "User URL::<b>".$url."<b><br>";

//$pattern= "#^http://www\.|https://www\.[a-z0-9-_.]+\.[a-z]{2,4}$#i";

// [VERY] Quick email check:
if(stristr($url, "http://") ) {
    //echo "Ok";
}
elseif(stristr($url, "https://") ) {
    //echo "Ok";
}
else{
//echo "No";
$url = "http://".$url;
}
if (stristr($url, "www.") ) {
    //echo "Ok";
}
else{
    //echo "www. is not available";
    $parse = parse_url($url);
    $url = $parse['scheme']."://www.".$parse['host'];
}

echo "Final URL::<br><b>".$url."<b><br>";
exit;
?>
By Vijaysinh Parmar.

Sunday 27 November 2011

NIC 2011 Paper Questions....

Tomorrow I was appear in d NIC Test....Here I M sharing some of the questions.
3 Marks per question....
1.Signal that are used for selection of memory banks in 8086 are??
2.EP-ROM with 16bit address bus and 4-bit databus, contains_______bits.
3.Spaning tree algorithem used fir-routing for?
4.B-tree  of order m should have atleast?
5.which is left recursion?(Here option a.f->x1,f->x2 B.s->Aa,A->Sd/a 3.E->T+Ta 4.None)
6.What is the maximum hight of AVL tree with 10-nodes? Assumes that hight of the tree having single node is Zero.

There are some tips and Triks to Power up your Desktop or Laptop Speed

Some Time you face the problem with your Desktop Or Laptop that their speed goes slow and you cant work at dat time Here I M sharing with u some important information to speed up Your computer speed..
  • Let your PC boot up completely before opening any applications.
  • Refresh the desktop after closing any application. This will remove any unused files from the RAM.
  • Dont set very large space images as your wallpaper. Do not keep a wallpaper at all if your PC is low on RAM (less than 64 MB).
  • Do not make your Desktop with a lot of shortcuts. Each shortcut on the desktop uses up to 500 bytes of RAM
  • Empty the recycle bin regularly. The files are not really deleted from your hard drive until you empty the recycle bin.
  • Destroy temporary internet files regularly.
  • Defragment your hard drive regularly. This will free up a lot of space on your hard drive and rearrange the files so that your applications run faster.
  • Always make two partitions in your hard drive. Install all large Softwares (like Visual Studio, Photoshop, Picasa,3DS Max,Heavy Games ) in the second partition. Windows uses all the available empty space in C drive as virtual memory when your Computer RAM is full. Keep the C Drive as empty as possible.
  • When installing new Softwares disable the option of having a tray icon. The tray icons use up available RAM, and also slow down the booting of your PC. Also disable the option of starting the application automatically when the PC boots. U can do this by type MSCONFIG in run command.
Happy Hacking...!!!!
Vijaysinh Parmar

Thursday 3 November 2011

Google Hack....!!!!! Download your favourite music for free by "Google hacking"

Today I am going to write about “Google hack”, some people believe that it is not hacking it’s just a trick but doesn’t matter as long as you can download your favourite music for free....!!!



"parent directory" nameHere -xxx -html -htm -shtml -php -opendivx -md5 -md5sums 

Now write a singer name or song name instead of nameHere in the box above and copy all code & paste in the google search.

Here is example I used "parent directory" gaga -xxx -html -htm -shtml -php -opendivx -md5 -md5sums and I found this link

Some tips: You can download other things like .pdf format or .doc format and more... Try to write just one word, e.g. not “lady gaga”, it’s better to write “gaga”. Take extra care while you are using this code. 

Happy Hacking,
Vijaysinh Parmar

Monday 31 October 2011

Some Important Rules For Safe Browsing On The Internet..!!!!!!

Rule 1::

Stop using Internet Explorer, Instead use Firefox or Opera.
It's no secret that Internet Explorer is filled with security holes. While Internet Explorer 7 is a huge improvement over it's predecessor but it still is no where near as secure as Firefox.
When it comes to patching vulnerabilities found, Microsoft has been notorious for not releasing patches in a timely fashion. According to the Washington Post, Internet Explorer was known to have exploit code for unpatched critical flaws for 284 days of 2006.
That is why, Go For safer internet browsing is, For safer browsing, do not use Internet Explorer. 
=========================================================================

Rule 2::

No ToolBar Allowed in Browser.
When I say No Toolbars, I am talking about ALL Toolbars. I don't care if it is from Microsoft, Google, Symantec or whoever. So far I have never seen a toolbar that was absolutely necessary. And under the surface, all they do is provide another gateway into your pc to allow bad things into your pc.
Think of it this way, imagine you are in a house and outside of the house are tons of honeybees. Now lets say you were trying to not allow any honeybees into the house. It wouldn't make sense to go around and open all of the windows of the house, would it?
No matter how useful the toolbar is, it does not compare to the massive security risk you are taking by installing and using that toolbar.
=========================================================================

Rule 3::


Don’t Use File Sharing Programs such as Limewire, Kazaa, Shareaza, Edonkey, Bearshare etc





These types of programs are filled with all kinds of bad things. In my experience, I would say 1 out of every 10 files contains a virus/worm/spyware. Yes, I know, it is nice to be able to download that new song you heard on the radio or download the latest software, all for free. But realize that by doing this, you are playing with a loaded gun, when it comes to the security of your computer.
For me, being in the PC repair field, I see this all the time. But what really gets to me, is the fact that people realize that using File Sharing Programs are a risk and are breeding grounds for virus/worms, but then when their PC gets a horrible virus or worm on it, they are confused by how it could have gotten on their system.
It doesn’t matter how great your firewall is or how many spyware scans you do a day, using these types of file sharing programs puts your pc “in the line of fire” for virus and worms.
For safer browsing, do not use or install file sharing programs. Period.


Happy Hacking,
Vijaysinh Parmar

Accidentally deleted a file? Ways to get back

It only takes a moment of carelessness to permanently delete important data from your PC. But don't worry, you may still be able to recover most of it, if you stop using your-PC immediately and use data recovery software. When a file is deleted, even from inside the Recycle Bin, it doesn't actually vanish from the hard drive.
Instead, the computer merely changes the file's properties to make it invisible to the user. The file truly gets deleted only when the operating system overwrites fresh data to that space. You can try to recover thedeleted files using free software.
MiniTool Power Data Recovery
This is a versatile software. It can not only recover the deleted files, but also help you save data from damaged partitions, pen drives, SD cards and CDs. MiniTool puts the retrieved files in folders, but you will have to go through several folders, Lost Files and Desktop, for example, before you find the actual files you were looking for. Once you have found the files, just click "save files" to get your data back. www.powerdatarecovery.com
Recuva
This lacks the advanced features of Mini-Tool , but one advantage of using Recuva is that you can see a preview before saving the retrieved files. This is handy because the computer often changes the names of deleted files to something like $ABC.MP3. www.piriform.com/recuva
Glary Undelete
In our tests, this was the slowest of the three. But one good feature is its ability to home in on the full name of the deleted files. This makes finding the right files a lot easier. 
www.glarysoft.com/products/ utilities/glary-undelete/ 
Happy Hacking,
Vijaysinh Parmar

Saturday 29 October 2011

!!!!!.....Who !s Hacker ?????...!!!!!!!!

What is Hacking?
Hacking is a process to bypass the security mechanisms of an information system or network.
Or
In common usage, hacker is a generic term for a computer criminal, often with a specific specialty
in computer intrusion. While other definitions peculiar to the computer enthusiast community
exist, they are rarely used in mainstream context. ..
Or
Hacking is an unauthorized use of computer and network resources. (The term "hacker" originally
meant a very gifted programmer. In recent years though, with easier access to multiple systems,
it now has negative implications.)
Defining Hacker
Hacker is a word that has two meanings:
Traditionally, a hacker is someone who likes to tinker with software or electronic systems.
Hackers enjoy exploring and learning how computer systems operate.
Recently, hacker has taken on a new meaning — someone who maliciously breaks into systems
for personal gains. Technically, these criminals are crackers (criminal hackers). Crackers break
into (crack) systems with malicious intent. They are out for personal gain: fame, profit, and even
revenge. They modify, delete, and steal critical information, often making other people
miserable.
The good-guy (white-hat) hackers don’t like being in the same category as the bad-guy (blackhat)
hackers. (These terms come from Western movies where the good guys wore white cowboy
hats and the bad guys wore black cowboy hats.) Whatever the case, most people give hacker a
negative connotation. Many malicious hackers claim that they don’t cause damage but instead
are altruistically helping others. Yeah, right. Many malicious hackers are electronic thieves.
Hackers (or bad guys) try to compromise computers.
Ethical hackers (or good guys) protect computers against illicit entry.
Happy Hacking,
Vijaysinh Parmar