Thursday, 26 February 2015

Solving Simple Problems


1. Ever saw a Youtube screen like this? Wondering how to fix it? Its simple
 just navigate to This URL and click on "Request the HTML5 Player" button and now again try to     see the video....problem solved...



2. Can't Access NTSystem class in Eclipse?

just remove the JRE System library from build path and add it again. Problem solved.
Refer How To Do It

3. You have set session key value pair using php but while retriving value from session its not working, the answer to this problem is simple

Just add session_start(); (at start of php page)
ob_start();

where u are setting the key vaue pair in session and on the php page where u are retreiving the content from session just simply use
session_start(); (at start of php page)

4. java.net.SocketException: Connection reset ??? 

It simply says that the process or server you are trying to connect is not listening on that port on which you suppose it is running, why so? offcourse you must have made some minor / major mistake in your code.








Saturday, 21 February 2015

Debugging PHP Code with Netbeans IDE & WAMP Server

Step 1)
Open php.ini file and remove the content which are present below [xdebug]
and now paste this content in place of that.
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9001
xdebug.idekey = netbeans-xdebug
xdebug.remote_enable = 1
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=9

Step 2)
Open Netbeans -> Tools -> Options -> php -> change debugger port to 9001 -> click ok/save

Step 3)
Now create new php project and set break point and start debugging!

Please comment for any query

Cheers & Happy coding!

Thursday, 19 June 2014

Play Video With HTML5



 Play Video With HTML5 & Notepad

  • open notepad and write the following code
  •     <html>
            <head>
              <title>Playing With HTML5</title>
                         </head>
                <body>
                    <div>Hello, This is my first web app</div>
                    <video id="v1" width="320" height="240" controls="controls" autoplay>
                            <source src="movie.mp4" type="video/mp4">
                    Your browser does not support the video tag.
                    </video>
                </body>
            </html> 

  • Make sure video movie.mp4 is in the same folder where you have saved .html file (for eg. Desktop in my case)
  • Now run the .html file 

Playing Video With HTML5 & Netbeans 8.0 
  • Start Netbeans and create a new web application as demonstrated here
  • Open index.html and replace that content with the one provided above.
  • Make sure you copy your file (movie.mp4) in “Web pages" directory and not in "WEB-INF" directory
  • For running in Chrome simply add “chrome connector” from chrome web store (see image 1.0 for more clarity)
  • For running in Firefox no need to add anything
  • Now that u are all set to run project, just select the project --> right click --> run
  • You will get a working video


  
 Image 1.0

If you are facing any problem drop comments, i will reply as  soon as possible.