• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

admin

About admin

India based Unix Admin, Cloud Evangelist, and a Virtualization lover. I work as a Unix Administrator and love playing around with Linux, Solaris and various other virtualization and HA solutions.

htaccess Cheatsheet

by admin

Here is a simple cheatsheet for the .htaccess file: Enable Directory Browsing Options +Indexes ## block a few types of files from showing IndexIgnore *.wmv *.mp4 *.avi Disable Directory Browsing Options All -Indexes Customize Error Messages ErrorDocument 403 /forbidden.html ErrorDocument 404 /notfound.html ErrorDocument 500 /servererror.html Get SSI working with HTML/SHTML AddType text/html .html AddType text/html […]

Filed Under: PHP

PHP cos function – Cosine

by admin

Description The cos() function calculates the cosine value of the number provided as its only parameter. The parameter should be passed as radians—you should use deg2rad() to convert degrees to radians. $cos1 = cos(10); $cos2 = cos(deg2rad(80)); Syntax: cos(float $num): float Parameters Parameter Description num An angle in radians Return Values Returns the cosine of […]

Filed Under: PHP

PHP connection_status function – Returns connection status bitfield

by admin

Description The connection_status() function takes no parameters and returns 0 if the connection is live and execution is still taking place; 1 if the connection is aborted; 2 if the connection has been aborted; and 3 if the connection has been aborted and subsequently timed out. Syntax: connection_status(): int The values 0, 1, 2, and […]

Filed Under: PHP

PHP ceil function – Round fractions up

by admin

Description Returns an integer that is the next larger than the float used as the argument. In essence, it rounds up a floating-point number to an integer, no matter what the value of the floating-point integer is. It doesn’t round down. Syntax: ceil(int|float $num): float The ceil() function takes a floating-point number as its only […]

Filed Under: PHP

PHP bindec function – Convert a number between arbitrary bases

by admin

Description The bindec() function converts a binary number into a decimal number. It takes just one parameter, which is the number to convert. For example: print decbin(“10000”); // 16 Syntax: bindec(string $binary_string): int|float Up to a 32-bit number, or 2,147,483,647 decimal, can be converted. Parameters Parameter Description binary_string The binary string to convert. Any invalid […]

Filed Under: PHP

PHP base_convert function – Convert a number between arbitrary bases

by admin

Description Converts a number from one base to another. The base the number is currently in is from, and the base to convert to is to. The bases to convert from and to must be between 2 and 36. Digits in a base higher than 10 are represented with the letters a (10) through z […]

Filed Under: PHP

PHP atanh function – Inverse hyperbolic tangent

by admin

Description Returns the inverse hyperbolic tangent of value. Syntax: atanh(float $num): float Parameters Parameter Description y Dividend parameter x Divisor parameter Return Values Inverse hyperbolic tangent of num.

Filed Under: PHP

PHP atan2 function – Arc tangent of two variables

by admin

Description This function returns the value of the arctangent of the point denoted by the x and y parameters. The return value is in radians, in the range -pi to pi (approximately -3.14 to 3.14). It is similar to calculating the arc tangent of y / x, except that the signs of both arguments are […]

Filed Under: PHP

PHP atan function – Arc tangent

by admin

Description The atan() function calculates the arc tangent value of the number provided as its only parameter, essentially reversing the operation of tan(). The return value is in radians—you should use the rad2deg() to convert radians to degrees. Syntax: asin(float $num): float Parameters Parameter Description num The argument to process. Return Values Returns the calculated […]

Filed Under: PHP

PHP asin function – Arc sine

by admin

Description The asin() function calculates the arc sine value of the number provided as its only parameter, essentially reversing the operation of sine(). The return value is in radians—you should use the rad2deg() to convert radians to degrees. $asin1 = asin(0.4346); $asin2 = asin(sin(80)); Syntax: asin(float $num): float Parameters Parameter Description num The argument to […]

Filed Under: PHP

Next Page »

Primary Sidebar

Recent Posts

  • htaccess Cheatsheet
  • PHP cos function – Cosine
  • PHP connection_status function – Returns connection status bitfield
  • PHP ceil function – Round fractions up

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright