Sunday, December 13, 2009

PHP error Warning: Cannot modify header information - headers already sent by ...

Error ...

PHP Warning: Cannot modify header information - headers already sent by.............

Hello PHP developers over there.This is a very frequent error or I will say an obvious error if you are new to PHP coding.It can occur due to many reasons such as:-

1. Headers must be parsed before any HTML,
2. Look for any statements that could send output to the user before this header statement. If you find one or more, find some way to move the header statement before them.
3.Make sure there is no white space outside of the php start and end tags. While a blank line before the 4.header("location:../first.php"); //'Location' should replace 'location'
5.fix your script to send the cookies at the correct time.
Solutions:-

Note: This Error irritates a lot.So if you are in a hurry go for Solution 3 and resume.:)
1.Try to resolve the above if exist.If the problem still persists..
2. Modify the PHP.ini file of your server by turning => output_buffering=on or output_buffering = 4096
3. Best Solution:

try placing this at the top of your page:
//Its turning on the output buffer.

then at the bottom of the page place this line of code:

//So any output is kept in the buffer.This is to flush the buffer.

Friday, October 30, 2009

What Next!!

From 64MB RAM to 4-8GBs of DDR RAM,381MHz to 3GHz QuadCore and more,Serial Port to USB 2.0,CRT to WXVGA to HDTV.28.8Kbps to 100Gbps of Internet.Wireless mouse to WIMAX.What next??
Do you think it is saturated??
Still more to come!!
Picture a day,Tap on your gigabit-wireless-connected tablet, to pull up a 3D movie on the razor-thin HDTV hanging on the wall. A media server streams the film via a superspeedy USB connection to a wireless HD transmitter, which then beams it to the TV.

Highlights:

1.USB 3.0 : The new USB 3.0 standard preserves backward compatibility by allowing older cables to plug into newer jacks; but newer cables like this one have extra pins that boost the data rate to 4.8 gbps.
It will be like before you leave your Workplace, you need to back up your computer. You push a button, and 5 minutes later, while you're still packing up, your system has dumped 150GB of data onto an encrypted 512GB superfast solid-state drive($2200 Introductory Price).
Imagine USB speed increasing 10 folds.All your USB devices will start sizzling.Printing,scanning,data transfer all the job will be done ten times faster.USB 3.0 could eliminate all the external ports except ethernet.
2.Rise of Wi-Fi : By 2012, two new protocols--802.11ac and 802.11ad--should be handling over-the-air data transmission at 1 gbps or faster.Today's Wi-Fi will be left in the dust by 802.11ac and 802.11ad, both of which will be capable of carrying multiple video streams and of operating at far higher data rates.
3.3D TV:Panasonic and other high-definition TV makers are looking to faux 3D technology to provide stereoscopic depth--and a reason for consumers to buy a newer set.
4.HTML5:Web pages built with HTML5 will display the same on any browser--desktop or mobile.Website designers and Web app developers won't have to deal with multiple incompatible formats and workarounds in their efforts to create the same user experience in every browser.HTML5 is now completing its last march toward a final draft and official support by the World Wide Web Consortium.
5.HDD with 3TB/inch: Jimmy Jian-Gang Zhu is developing a prototype of his microwave-assisted magnetic recording (MAMR) technique he believes will pack 3TB/square inch of a spinning disk.Seagate Technology has been championing an approach called heat-assisted magnetic recording (HAMR) that uses a tiny laser light on each drive head to heat a portion of the disk just before a write operation. Rival Hitachi Global Storage Technologies is working on a way to pattern tracks and even bit locations on media.All sides say they are actively exploring both technologies. Ultimately both technologies will be needed to deliver disks that pack 10 terabits or more per square inch.

What next??Post your reviews and ideas?

Source: eetimes.com and pcworld.com

Wednesday, October 14, 2009

Rank#1 CODECRACKER 3.0

GNU/LUG NIT Durgapur launched its CODECRACKER 3.0(http://lug.nitdgp.ac.in/codecracker) on 14th October'09 for the programmers in the college.
CODECRACKER is A semi-automated online judge for organising programming contests, developed by GNU/Linux Users' Group, NIT Durgapur.
Source is available at http://code.google.com/p/ccnitdgp/ .

The Contest started at 10 PM with 3 level of questions.EASY(2) ,MEDIUM(2) and HARD(1).Time span was 2hr which was further extended by 15 minutes.Previous 1.0 and 2.0 versions supported C/C++ only but this version supported codes in JAVA and PYTHON too.I was able to solve 3 questions (2-Easy and 1-Hard).
I stood RANK#1 ,results are available at ( http://lug.nitdgp.ac.in/codecracker/score.php?t=1255583166 (if link exists :-) ) Coding was fun and Entertaining as it is always :).

Wednesday, September 16, 2009

Qualified for ACM-ICPC Regionals 2009,Amritapuri On-line contest!!

Hello folks..I am back with this post.It's an informal one.Last week when our college was going through 'Water crisis' on 13th September We (priyanka and me) participated with the team name 'parallel_coders' for the ACM-ICPC Amritapuri Regional On-line contest from 9 am to 1 pm.We solved programming questions inspite of load shedding between the coding round.On 15th I received an email ,declaring results are out @ http://icpc.amrita.ac.in/site/teamsforonsite.html .I found my team_name -> Parallel_coders(NIT durgapur) mentioned there.I was happy with a broad smile on my face ,hardwork pays ;).Next is On-site round on 1st of Nov. let's see If we are able to go there.All under the constraints of god,time and
finances.

Thursday, August 27, 2009

Voice/Video Chat and File sharing In Ubuntu

Hello folks.Voice/Video/File sharing are the most popular features of Windows.But don't limit Explore the world of LINUX DISTROS.You can avail these features in UBUNTU using:
1. Empathy
2. Skype 2




#1 Installation of Empathy:

1.$ sudo gedit /etc/apt/sources.list

Add the following lines:

deb http://ppa.launchpad.net/telepathy/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/telepathy/ppa/ubuntu hardy main

2.$ sudo apt-get update
3.$ sudo apt-get install empathy telepathy-gabble telepathy-mission-control telepathy-stream-engine telepathy-butterfly python-msn
or
4.$sudo aptitude install empathy
5.$Empathy
6.Import accounts from pidgin or create new account settings for GTALK/MSN/YAHOO/AOL etc.
7.Login and start using Video/Voice/Text chat.

#2 Installing skype

1. $sudo aptitude install skype or download the binary file from http://www.skype.com/download/skype/linux/choose/ according to the distro and proceed accordingly.
2. $ skype [Start using skype using your skype ID]




Skype Vs Empathy:
--->>>For Skype
1.Skype is very Handy and easy to use.Fedora users may face problems logging in.
2.Video and voice quality is very good once they are configured properly.
3.No proxy/port settings are required to be configured in Skype .
4.Skype is Oldest and most reliable VOIP provider.

--->>>For Empathy

1.If you are not a skype user ,you don't need to be.Just login through yahoo,msn,gtalk,aol etc ids.
2.Voice quality is not appreciable.
3.Port no. and settings need to be configured properly as in Pidgin.

Tuesday, August 25, 2009

9 Ways for an Engineer/IT employee to Wake up early!!

In this fast paced life It is very difficult to live a Healthy life and much more difficult if you are an IT employee or an Engineering student :P.Food at hostel,Eating habit,sports ,nutritions and sleep ....none of these terminologies are balanced.Some of us are either night owl or early birds.The early morning is often the time of day you have most control over. Unlike later in the day, very little happens between 5am and 8am that can throw a wrench in your plans.
Wakeup call from friends,parents (Hey nikhil wake up!!)are common and sometimes alarms clock (I can't forget them.:P)
To overcome the sleeping disorder ,I found 9 ways and it works!!you can try them out .It's Compiled AND TESTED!!
In a survey it was found that most of the CEO's wake up before 6 am.the most successful people are early risers.Chances are if you get up early you spend less time sleeping, which frees up more time for other, more productive activities.

1. Go to bed when you’re tired, and wake up at the same time every day.
And what if you’re not tired until 1am? That’s okay too. Just make sure you still set your alarm for the new, earlier time. The next day you’ll likely be tired earlier than usual, and a new, more steady sleep pattern will begin to take shape.
2. Know the 90-minute rule.
Sleep research that says human sleep cycles occur in 90-minute intervals.You will be very energetic and fresh after 6 hr sleep rather than 8 hrs one.
3.Cut your sleep time incrementally.
If you sleep 8 hr a day cut it down by 30 mins.for a week than again 30 mins in the next week until it reaches your ideal sleep schedule .
4. Give yourself a good reason to get up.
If you’re a coffee drinker, invest in a percolator with an automatic timer. Set it to brew at the time you’d like to get up. The smell of freshly brewed coffee, first thing in the morning? It really is the best part of waking up.
5.Let the sun shine in.
When it’s dark, your body responds by producing sleep hormone melatonin. On the other hand, light discontinues this process and provides a natural cue to your brain that it’s time to wake up.
6.Move your alarm clock.
Often, the hardest part of getting up early is actually getting out of your warm, comfortable bed.Keep your alarm clock at a distance.So that you cannot Snooze or stop just after the instance it buzzes.
7.Don’t let yourself snooze.
We scream “just 10 more minutes." but now we are late for work. Just say no to snoozing! It’s no longer an option.
8.Drink a glass of water.
Drink a glass of water before going to bed and you’ll naturally get up early. A glass of water first thing in the morning will kick start your metabolism and get you up and running.
9. Be your own alarm clock.
Tell yourself you’re going to get up by a certain time, often your body will wake you up naturally.When you do manage to wake up without an alarm clock, you’ll find the transition back to full consciousness much more pleasant.

Try this out .It should definitely work.!!

Restore GRUB /Install GRUB manually

Hello Folks I am back with a solution to the most frequently occuring problem in dual boot/multiple boot machines having LINUX.

After the Upgrade of Windows or restoring the system to original factory settings ,the GRUB screen at the time of booting the system is lost.

System automatically boots to Windows.Don't Panic!!It's just due to grub disappearance .Follow the given steps to restore back the GRUB choice menu containing the list of all the OS installed in the system:-

1) Insert a live CD in your computer of any DISTRO of linux.
2) Run the live envionment :).
3) Open the terminal window proceed with the following commands:-
$sudo grub
$find /boot/grub/stage1
(hd0,5) [comment:Displayed for example]
$root(hd0,5) //
$setup(hd0) [comment: If you have more than one HDD and you wish to boot from HDD no. 2 or 3
or so on .Replace hd0 by hd1,hd2 etc.]
Press CTRL+Z
$reboot
4) GRUB screen is loaded with the list of OS available!!