Author name: Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

Ask Google for Astronomical Unit, proton mass, planet or sun’s mass and radius

To get the exact Astronomical Unit in kilometers: astronomical unit 1 Astronomical Unit = 149 598 000 kilometers To get Google to return the mass of proton: mass of a proton proton mass = 1.67262158 × 10-27 kilograms To get the mass of any planet in solar system from Google, search by: m_Earth Will yield …

Ask Google for Astronomical Unit, proton mass, planet or sun’s mass and radius Read More »

PHP, MySQL: Calculate Number of Days between 2 Dates or Number of Hours, Minutes and Seconds

This is a rather common task in both PHP and MySQL, that is, to calculate and get the days distance (number of days) between 2 given dates. In PHP, to get the number of days between now and a future date / a past date: $days = abs(strtotime(“2011-11-20”) – strtotime(date(“Y-m-d”))) / (60 * 60 * …

PHP, MySQL: Calculate Number of Days between 2 Dates or Number of Hours, Minutes and Seconds Read More »

Google: Restrict matching results by searching only the anchor text, page title, page URL, page text or filetype

For a normal search, Google decides the best results and the web page order by a variety of matching criteria such as in anchor text, page title, page URL. Sometimes, however, you need Google just to search certain part of the entire spectrum of comparison candidate. For example, to search with the matching phrase just …

Google: Restrict matching results by searching only the anchor text, page title, page URL, page text or filetype Read More »

Google: Find out the population of a country, state or city – Google Public Data Search

Google identifies data in a lot of fields across the web and population is one of them. To get the local population of a city, a state or a nation, simply type in Google search: population new york population paris population shanghai population CA Or population california population japan What can be more handy. Google …

Google: Find out the population of a country, state or city – Google Public Data Search Read More »

Google: Search only a specific site

Sometimes you may only want to pull information and searching results from a specific sites such as nytimes.com, just use the site clause in the searching phrase. For example, to search ‘mortgage loans’ only from the website nytimes.com: mortgage loans site:nytimes.com Google will then only return those web results from the site nytimes.com that’s about …

Google: Search only a specific site Read More »

Google as an online advanced mathematic calculator for arithmetic calculations and big number scientific computations

Google’s a supercomputer! With Google toolbar, these can be as handy as they get. To get the value of pi: pi // Google spits pi = 3.14159265 Add them up (and don’t worry about overflow): 62385761827351234125236 + 29893847592638741692387568 Calculate the product (same as above): 854736820183475 * 29347568389187 You get the idea. And of course you …

Google as an online advanced mathematic calculator for arithmetic calculations and big number scientific computations Read More »

Download Web Safe Simplified Chinese Fonts: Song Ti, Hei Ti, Youyuan, Lishu, MS Ya Hei

As requested by a reader of Make A Website that wants to know where to download web safe chinese fonts. I have now packaged them in a ZIP for download in case any more of you wants to use them for Chinese web projects. Click to download the fonts. No more download of fonts because …

Download Web Safe Simplified Chinese Fonts: Song Ti, Hei Ti, Youyuan, Lishu, MS Ya Hei Read More »

Google: Get definitions of terms and phrases

Google recognizes HTML definition structures and some of the web’s most prominent definition sites such as wikipedia.org, wordnet.princeton.edu and so on, and it has collected adequate stock of definitions in its database. You can navigate to your favorite online definition resource or you can just search on Google for any words or phrases’ definition: define:RAM …

Google: Get definitions of terms and phrases Read More »

Google: Search by sentence fragments with forgotten word replace by asterisk or wildcards

We forget things. There’s a time when we want to search for a full sentence that we read before but can’t remember the full line with the correct wording here and there. To look up its original complete form or the author of it so that we can quote the literature, we have come to …

Google: Search by sentence fragments with forgotten word replace by asterisk or wildcards Read More »

Google: Search for similar / synonymous terms and phrases

Google’s getting smart, not only basing its algorithm on existing natural language theories and references but also the feed of billions of searches performed by people around world daily. It learns from you. For example, Google knows PC and laptop are common types of computer, while when you search ‘computer’ alone it would present results …

Google: Search for similar / synonymous terms and phrases Read More »

Web Hosting IP and SEO: Are You A Slum Dog or Are You A Millionaire?

I don’t know for sure how Google takes the web hosting IP into account of determining your website’s ranking position, but I’m sure they do take that in consideration, albeit not so significantly as a maker or a breaker. Most of my sites are currently on DreamHost and every time I register a new domain, …

Web Hosting IP and SEO: Are You A Slum Dog or Are You A Millionaire? Read More »

MySQL, PHP: Display MySQL table fields and data

While this may seem simple, but it’s more complicated than it may appear because you have to first decide which data (rows, fields, etc.) to be extracted or selected and in what way the data from the MySQL table are presented. But to simply read from a MySQL table for the fields and data: SELECT …

MySQL, PHP: Display MySQL table fields and data Read More »

MySQL, PHP: Store form textarea value or data to MySQL database table

To send the textarea text value in any HTML forms to the web server and store it into a MySQL table by PHP, you will need to POST the textarea data to a PHP script and then the PHP script would connect to a MySQL database to put the data into one of the tables …

MySQL, PHP: Store form textarea value or data to MySQL database table Read More »

What is this font? An online tool to detect or guess font typography in images

Browsing through websites after websites, you may wonder from time to time what a font is that’s used in the site design. While experience and necessary typographical knowledge is needed to make a sound guess, you can always upload a screenshot of image with some sample text of the font on to an online tool …

What is this font? An online tool to detect or guess font typography in images Read More »

Google: What time is it now? Get current local time from Google

Other than just glancing at the clock (at the bottom right if you are using Windows) of your desktop or laptop computer screen, you can try a slightly more geeky way of querying the Internet for the current time. By asking Google. With Google toolbar installed, this would even come more handy than you think. …

Google: What time is it now? Get current local time from Google Read More »

PHP: Convert Radians to Degrees and Degrees to Radians

Radians and degrees are 2 different quantitative approaches to denote an angle, in PHP, you can convert a radian value to a degree by the function rad2reg() and a degree value to radian by the function deg2rad(): $degrees = rad2deg(‘3.1416’); // $degrees = 180 $radians = deg2rad(180); // $radians = 3.14159265359

PHP: Sort and Order Array Items / Elements / Numbers Naturally so 2 Comes before 10

By nature, a strict computer sorting algorithm would place ’10’ before ‘2’. As a result of comparison on a byte by byte basis, the first byte of the 2 strings are determined in the order that 1 comes before 2, thus placing ’10’ before ‘2’. However, in a natural sorting algorithm, ‘2’ comes before ’10’. …

PHP: Sort and Order Array Items / Elements / Numbers Naturally so 2 Comes before 10 Read More »

Scroll to Top