Thursday, May 31, 2012

auto detect PDA/mobile and forward url

<  php
$useragent=$_SERVER['HTTP_USER_AGENT'];
if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i',substr($useragent,0,4)))
header('Location: http://softlandindia.co.in/etm/sil_mobi/');
?>

Monday, May 28, 2012

reasons for power shortage/powercut

  1. so many new industries and apartments are comes
  2. more rechargeable products came like mobile phone, emergency light, ups it consumes 6hrs charge and deliver for 1hr energy only
  3. separate house for each family (just like thanikudithanam) so 2 tv and 2 motors works for one family
  4. Number electric trains increased

Saturday, May 12, 2012

SQL tips

  1. Use EXPLAIN to profile the query execution plan
  2. Use Slow Query Log (always have it on!)
  3. Don't use DISTINCT when you have or could use GROUP BY
  4. Insert performance
    1. Batch INSERT and REPLACE
    2. Use LOAD DATA instead of INSERT
  5. LIMIT m,n may not be as fast as it sounds. Learn how to improve it and read more about Efficient Pagination Using MySQL
  6. Don't use ORDER BY RAND() if you have > ~2K records
  7. Use SQL_NO_CACHE when you are SELECTing frequently updated data or large sets of data
  8. Avoid wildcards at the start of LIKE queries
  9. Avoid correlated subqueries and in select and where clause (try to avoid in)
  10. No calculated comparisons -- isolate indexed columns
  11. ORDER BY and LIMIT work best with equalities and covered indexes
  12. Separate text/blobs from metadata, don't put text/blobs in results if you don't need them
  13. Derived tables (subqueries in the FROM clause) can be useful for retrieving BLOBs without sorting them. (Self-join can speed up a query if 1st part finds the IDs and uses then to fetch the rest)
  14. ALTER TABLE...ORDER BY can take data sorted chronologically and re-order it by a different field -- this can make queries on that field run faster (maybe this goes in indexing?)
  15. Know when to split a complex query and join smaller ones
  16. Delete small amounts at a time if you can
  17. Make similar queries consistent so cache is used
  18. Have good SQL query standards
  19. Don't use deprecated features
  20. Turning OR on multiple index fields (<5.0) into UNION may speed things up (with LIMIT), after 5.0 the index_merge should pick stuff up.
  21. Don't use COUNT * on Innodb tables for every search, do it a few times and/or summary tables, or if you need it for the total # of rows, use SQL_CALC_FOUND_ROWS and SELECT FOUND_ROWS()
  22. Use INSERT ... ON DUPLICATE KEY update (INSERT IGNORE) to avoid having to SELECT
  23. use groupwise maximum instead of subqueries
  24. Avoid using IN(...) when selecting on indexed fields, It will kill the performance of SELECT query.
  25. Prefer using UNION ALL if you don't need to merge the result
Scaling Performance Tips:
  1. Use benchmarking
  2. isolate workloads don't let administrative work interfere with customer performance. (ie backups)
  3. Debugging sucks, testing rocks!
  4. As your data grows, indexing may change (cardinality and selectivity change). Structuring may want to change. Make your schema as modular as your code. Make your code able to scale. Plan and embrace change, and get developers to do the same.
Network Performance Tips:
  1. Minimize traffic by fetching only what you need.
    1. Paging/chunked data retrieval to limit
    2. Don't use SELECT *
    3. Be wary of lots of small quick queries if a longer query can be more efficient
  2. Use multi_query if appropriate to reduce round-trips
  3. Use stored procedures to avoid bandwidth wastage
OS Performance Tips:
  1. Use proper data partitions
    1. For Cluster. Start thinking about Cluster *before* you need them
  2. Keep the database host as clean as possible. Do you really need a windowing system on that server?
  3. Utilize the strengths of the OS
  4. pare down cron scripts
  5. create a test environment
  6. source control schema and config files
  7. for LVM innodb backups, restore to a different instance of MySQL so Innodb can roll forward
  8. partition appropriately
  9. partition your database when you have real data -- do not assume you know your dataset until you have real data
  10. Reduce swappiness of your OS
MySQL Server Overall Tips:
  1. innodb_flush_commit=0 can help slave lag
  2. Optimize for data types, use consistent data types. Use PROCEDURE ANALYSE() to help determine the smallest data type for your needs.
  3. use optimistic locking, not pessimistic locking. try to use shared lock, not exclusive lock. share mode vs. FOR UPDATE
  4. if you can, compress text/blobs
  5. compress static data
  6. don't back up static data as often
  7. enable and increase the query and buffer caches if appropriate
  8. config params -- http://docs.cellblue.nl/2007/03/17/easy-mysql-performance-tweaks/ is a good reference
  9. Config variables & tips:
    1. use one of the supplied config files
    2. key_buffer, unix cache (leave some RAM free), per-connection variables, innodb memory variables
    3. be aware of global vs. per-connection variables
    4. check SHOW STATUS and SHOW VARIABLES (GLOBAL|SESSION in 5.0 and up)
    5. be aware of swapping esp. with Linux, "swappiness" (bypass OS filecache for innodb data files, innodb_flush_method=O_DIRECT if possible (this is also OS specific))
    6. defragment tables, rebuild indexes, do table maintenance
    7. If you use innodb_flush_txn_commit=1, use a battery-backed hardware cache write controller
    8. more RAM is good so faster disk speed
    9. use 64-bit architectures
  10. --skip-name-resolve
  11. increase myisam_sort_buffer_size to optimize large inserts (this is a per-connection variable)
  12. look up memory tuning parameter for on-insert caching
  13. increase temp table size in a data warehousing environment (default is 32Mb) so it doesn't write to disk (also constrained by max_heap_table_size, default 16Mb)
  14. Run in SQL_MODE=STRICT to help identify warnings
  15. /tmp dir on battery-backed write cache
  16. consider battery-backed RAM for innodb logfiles
  17. use --safe-updates for client
  18. Redundant data is redundant
  19. Keep an eye on buffer pool and keybuffer hit rate
Storage Engine Performance Tips:
  1. InnoDB ALWAYS keeps the primary key as part of each index, so do not make the primary key very large
  2. Utilize different storage engines on master/slave ie, if you need fulltext indexing on a table.
  3. BLACKHOLE engine and replication is much faster than FEDERATED tables for things like logs.
  4. Know your storage engines and what performs best for your needs, know that different ones exist.
    1. ie, use MERGE tables ARCHIVE tables for logs
    2. Archive old data -- don't be a pack-rat! 2 common engines for this are ARCHIVE tables and MERGE tables
  5. use row-level instead of table-level locking for OLTP workloads
  6. try out a few schemas and storage engines in your test environment before picking one.
Database Design Performance Tips:
  1. Design sane query schemas. don't be afraid of table joins, often they are faster than denormalization
  2. Don't use boolean flags
  3. Use Indexes
  4. Don't Index Everything
  5. Do not duplicate indexes
  6. Do not use large columns in indexes if the ratio of SELECTs:INSERTs is low.
  7. Split out large blob elements in InnoDB
  8. be careful of redundant columns in an index or across indexes
  9. Use a clever key and ORDER BY instead of MAX
  10. Normalize first, and denormalize where appropriate.
  11. Databases are not spreadsheets, even though Access really really looks like one. Then again, Access isn't a real database
  12. use INET_ATON and INET_NTOA for IP addresses, not char or varchar
  13. make it a habit to REVERSE() email addresses, so you can easily search domains (this will help avoid wildcards at the start of LIKE queries if you want to find everyone whose e-mail is in a certain domain)
  14. A NULL data type can take more room to store than NOT NULL
  15. Avoid NULL in index attributes. Use 0 instead
  16. Storing flags in a database can slow down execution due to a bad cardinality. Try using bit flags
  17. Don't store flags in a NULL and NOT NULL manner. Update from NULL -> 1 is slower than 0 -> 1
  18. Choose appropriate character sets & collations -- UTF16 will store each character in 2 bytes, whether it needs it or not, latin1 is faster than UTF8.
  19. Use Triggers wisely
  20. Use delayed key wrote
  21. use min_rows and max_rows to specify approximate data size so space can be pre-allocated and reference points can be calculated.
  22. Use HASH indexing for indexing across columns with similar data prefixes
  23. Use myisam_pack_keys for int data
  24. be able to change your schema without ruining functionality of your code
  25. segregate tables/databases that benefit from different configuration variables
  26. Don't access the last key part in a where clause with =
  27. Abuse the system for optimiization you're using with system dependant features like RTREE's for optimized range queries

Thursday, May 10, 2012

UI problems and solutions

  1. full image background for html/body tag used is not supported in all resolutions
    solution: .bg {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
       z-index: -5000;
    }
  2. Side fixed skyscraper ads affect in multi browser and multi resoultion
  3. In side drop down menu cannot able to give scrollbar, but we can give paging
  4. In sqlyog table import is csv format
  5. windows server hosting not support Fast CGI and wifi router static IP
  6. keyword use in filename for seo is affect the breadcrumbs
  7. in big website we classify folders as company, products etc. is affect include path in css/js files


Sunday, May 06, 2012

consumer awareness

Saturday, May 05, 2012


Complete The Following Three Steps and Get Your Mobile Recharge Now:-



STEP 1: Click on "Like" Buttons below.



STEP 2: Click on "Share" Button and Share this onto your wall.




STEP 3: Then copy and paste the message below TEN different "Groups" or on "Friends Wall":


http://tv-actors.blogspot.in/



STEP 4:

Enter Your Name:
Enter Your Email:
Enter Your Mobile Numer:
Select Your Operator:

Circle:

 

top 10 adsense earners in tamilnadu

Name: Srinivas Tamada Location: Chennai, India but now is in USA Blog: http://www.9lessons.info Blog Niche: Ajax, PHP, Web Design. ...

Labels

Abbreviations Acting choices actress-actors addons ads adsense drawbacks advantages advantages of chennai Advantages of Links directory advantages of plastic cheppal stand advices affiliates all ads amazon android articles asp ASP dot Net design issues astrolgy autobiography automobile avoid hacking avoid snake bite backgrounds banners BCS Best category for best collections best PPT Presentations best things biodata blog Blog Advertising blog stats blogger blogger drawbacks blogs Browser errors Browser Issues bus ticketing machines business business loss Business Plan Business rental business wise drawbacks Buying Expired Domains capgemini Car buying tips certified professional cheat frauds Cinema industry cities clients Closed IT/Software companies closed websites codings Commented topics of my blog comments companies Construction contacts Copyright creativity Credit Card Prefix Numbers css CSS drawbacks CSS elements combination CSS errors css ID rules css limitations css links css selectors Cute babies cv demonetization design category disclaim DNS error Documentation domain drawbacks Drawbacks in Madurai bus stand drawbacks of legins drawbacks of strike drawbacks_others duty education electronics emails embedded empty post emptyland Error Code and Message eshop Extra expenses Face detection apps use family FAQ FENG OFFICE finance loans firecrackers firewall nonblockable sites food For sales Free fresh content friends fun general - new - temp GHS girls google google Ads Google Adsense Revenue Sharing Sites government GPS merits graphicsbg Green earth Hacking Methods hand held machines handicapped reservation header wordings health Helpful Slogams HM home shifting how to avoid social media spam HTML html encoder HTML5 website layout IBM IDEA IE IE problems india infosys internet Internet/Social Media Marketing interview questions ISBN IT hardware products for rental IT Hardware-software ja jallikattu javascripts job job analysis joomla KSRTC kvic links links_background verification websites links_blogs Links_certifications links_different websites links_letterwise Links_mobile websites Links_My Designs links_my SMM links_other states Links_Product_brand websites links_Reciprocal Links links_SEO/SEM links_Tamilnadu links_tenders links_tools links_UI design links_use for all* list list of industrial estate list of IT parks list of toll free numbers M2M Madurai Madurai 2020 Mail box folder maintenance Malayalam Malayalam movie my reviews manjula miss Manufacturing Industries marketing marketing ideas me at divisional sports MNC site bugs mobile monthly extra Multiple options in codings my my achievements my achivements My advt - ads My all ads My best collections my best ideas my comments My cousin's post in FB My donations my friends with actor actress My Google dashboard My horoscope my linkedin profile My online interview My Portfolio my posts links My questions my SEO experience my social media profiles my stack overflow profiles My Stackoverflow site answers My works Names nested html Netscape Navigator new blogs New build house for sale New Concepts news online earnings online generators online scams open office drawbacks Open source Opera orkut drawbacks Others view our grandparents Our ID and Numbers outsource statistics own ideas own ideas_aboutme own views page pixel collapse when scrolling in firefox Page Speed Performance parallax scrolling websites Partners Personals photos Photos - art Photos_actress photos_screenshots PHP plans Plots for sale poems policy Pollution Facts powercut Powerpoint press release Problems and solutions - ATM Problems and solutions - Education Problems and solutions - Hardware Problems and solutions - Mobilephones Problems and solutions - NGO Problems and solutions - Software Problems and solutions - Website problems in browsing center/internet cafe Products programmers problems programs proxy software Quality guidelines Rajamani realesate reasons for power shortage Recent comments relatives relatives business resume RS 232 dotmatrix printers rti sales SBI search engine search type websites security Security Alert regarding Serious CMS Attack SEM portfolio SEO Difficulty SEO for blogs SEO portfolio SEO tools SEO-SMM-ORM Plan SEO/SEM sil ads Site Tags siteworth slogans SMS benefits Social Interest - public use social media marketing Social Media Optimization social media widgets softland-palmtec software errors Software Testing Softwares solairaja sports SQL SQL queries stars statistics stop software patents tablet Grip and interaction Tamil - Tamilar - Tamilnadu TATA TCS technicals Technology tenders Testing Tips text magics Thanks Things to do before you die in India Things to Watch in 2014 thirumalai Tips Tips - Buseness tips Tips - Health tips Tips - life tips tips for demo video preparation Tips for doing SEO/SMM Tips for Good-Employee Tips for HR Tips for old money top 10 adsense earners in tamilnadu tours Travels TV UI Certifications Q & A UI design useful best software latest versions Useful websites for HTML Developer videos visa vista icons w3c standards wallpapers ways to find a job Web design Web design and developments Web developments Web Services web UI design shapes webhosting Website Features website templates Widgets collections Yahoo சுயசரிதம்

:: Useful web links List