Why people dont get along with Programming

Many people who come to a tech college like NSIT want to start something new with no idea where to begin with. And just at the right moment they see some workshop about someone hacking into something and voila ,  the dude just hacked into the facebook account!

Thats when it strikes your mind , “Wow thats so cool and also earns me money! Why not learn that!?

And then you start your journey only to realize a few days later, “I cant do this! Its a headache! and way out of my league. I can never be as good as that hacker if I go on like this.” without realizing the fact that its not an overnight magic trick or a 1 week magic crash course that is going to give you super coding skills.

Initially everyone sucks at programming. So I decided to compile a list that identifies reasons and advice to improve your programming skills.

And you just might save yourself from doing This


Continue reading

Advertisements

Image capturing in matlab

If you are using a laptop with a camera. Then this is how one can open the camera in MATLAB.

Web cameras are viewed by Matlab as adapters. So to use the webcam we need to know the adapter name of our webcam. In most cases it’s “winvideo”
So to know that: we type the following command.
>>imaqhwinfo

So easily one can see that the installed adapters in my system are ‘coreco’ and ‘winvideo’
Now to use that adapter we need to make an object for it. This is how it’s done:


>>obj1

=

videoinput(‘winvideo’);

This creates an object to handle the web cam and can be henceforth used to operate the webcam.
The following simple command lets you preview the camera output.
>>preview(obj1);
voila, Now don’t blush. 🙂

Difference between ROM and PROM

>

ROM : Read Only Memory
PROM : Programmable Read Only Memory

It had me confused for some time. But now I know for sure.

The similarity between ROM and PROM is that the program can be burned only once in both of them and it stays there forever. For the difference part, there are two major differences:
1. When the power is turned off to the system, PROM retains the data in it while it is erased in case of ROM
2. While to program is burned in ROM at the time of manufacture, in the case of PROM, nothing inside the memory at the time of manufacture. For burning program into it, a special hardware is required known as PROM programmer or PROM burner.

I couldn’t find a proper video programming the PROM, but here is something similar for EPROM.
PS: Hey, an interesting thing about EPROM is that it is erased using ultraviolet light. Fancy watching that live.

Sharing files with a google group using google docs!

Hey fellas,
Here’s what I have after an evening head-scratching finding some way to allow users having gmail accounts to share files with google groups, since now the file sharing feature is being discontinued.
Yeah I know, you might shout at me to use yahoo groups instead. But hey reconsider the conditions highlighted in the above statement.
I wouldn’t mind a little appreciation. 🙂

Line space in HTML

Cool, so after some frustrated googling, I found out a way to give spaces in html. Usually if you give lots of space between text in html it shows up as only one space.
To give more than one space, one can use this character:  

So if in HTML editor, I write something like:
Hi            there

then in the html page it will show up as:
Hi there

That’s where   comes in handy. So instead of space you’ll have to write something like:

Hi       there

to produce the desired effect.

php redirecting

I was searching for a way to redirect in php scripts to other pages.
Having used Javascript before, the obvious answer in front of me was using js inside php as follows:

<?php echo ‘<script>window.location = “page.html”;</script>’; ?>

It works completely fine. But it isn’t php exactly. So I looked on.
Another option I came upon was the php function header(), which also works fine and has the following format:

<?php header(“location: page.html”); ?>

I had a little doubt though. If I am using the header function in the middle if a php script, then it works fine. But in the php manual of this function http://php.net/manual/en/function.header.php, they clearly state that this function should only be used before any html tag or any php print command. Will look for answers. If the reader knows, he is requested to comment.