All about very small logical and programming problems. Complex theories made simple to understand
Wednesday, February 29, 2012
Friday, February 24, 2012
Crop Image Using GD library in Php
I have tried image cropping using image
copying GD Image function i have done it by using simple logic this
program might be useful to all so i am posting it here because i have
not used any jquery or any other language this is purely done in php
5 steps to use the code:
- Create a project in www folder
- paste the code present in link - Download
- create a folder named images
- Now run the folder
Thursday, November 24, 2011
How Do I Add Or Delete Entries From The Block Or Reject List
This post explains you how to remove/add a number from reject list when you mistakenly add the number to reject list in Samsung mobiles
- Go to Settings in menu bar ( or applications options for some models)
- Then go to application settings (it will be option 6)
- Then go to Call ( call option 1 )
- Then go to All calls option ( will be option 1)
- Then go to Auto Reject ( will be option 2)
- Then now you can Auto Reject option on or off (Option 2)
- Then now you can add or remove the a number from reject list
The above steps is for almost all models of Samsung mobiles
Thursday, November 17, 2011
How to optimize code in PHP
Php a language used to develop webpages. The language itself is very fast unless you make it slow using poor coding :P
So the following are the things i found that made my php code run faster may be these tips might help your code tooo
So finally following are the tips to make your php run faster or optimize your php code
FunctionNameA()
$a=microtime();
FunctionNameB()
$b=microtime();
Echo $a,$b;
So the following are the things i found that made my php code run faster may be these tips might help your code tooo
So finally following are the tips to make your php run faster or optimize your php code
- Profiling:Testing with microtime() function to calculate time taken to compile a function
FunctionNameA()
$a=microtime();
FunctionNameB()
$b=microtime();
Echo $a,$b;
- Optimizing Execution Time:
- Use of echo instead of printf()
- ¡++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3
- “While” loop is 90% faster than “For” loop
- $row[’id’] is 7 times faster than $row[id]
- Incrementing an undefined local variable is 9-10 times slower than a pre-initialized one.
- Turn on apache's mod_deflate
- Unset your variables to free memory, especially large arrays.(we are starting with arrays)
- Replace str_replace by strtr. strtr is faster than str_replace by a factor of 4
- Remove doing SQL queries within a loop
What is a blog , How to Start It and Its Uses
Blog is a place where a a person can actually express his ideas share his thoughts to the public
I call it as Notebook written by us on topic of our wish which can be useful to others
I call it as Notebook written by us on topic of our wish which can be useful to others
There are many hosting sites that support blogging some of the popular blogging sites are
Just go to the any one of the websites where you are thinking to start a blog
steps to create a blog
- Sign Up with the respective site
- Now the website ask you to select the website name of your wish (if available else you need to adjust with other names :P)
- Make sure that your name of the blog should atleast relate the blog posts
- Now find the option where you can actually post you idea
What you can do with the blog ???
There are many advantages with the blogs some of them i found are :
- You can share your ideas which can be helpful to others
- You can get ideas from others which might be helpful for you carrer
- You get earn money if you wish to by using (google adsense,amazon ads etc.,)
- By the way you can also get a good name if your blog becomes so popular
"Knowledge will increase if you share so keep sharing the knowledge"
Have a happy blogging ------ Educate and Advocate
Tuesday, September 13, 2011
CSS style Sheet tips - CSS Cheat Sheet
If your in WebDevelopment then First thing you need is this PDF which really helps you in styling your web pages
Link
Subscribe to:
Posts (Atom)