↓ Skip to Main Content

TheoryApp

Main Navigation

  • Home
  • Java
Home › Archive for PHP

Category: PHP

Store compressed data in database using PHP

By theoryapp Posted on December 19, 2021 Posted in PHP, SQL Tagged with big data, blob, compression

When storing big text contents in a database, it is better to store after compressing the data. The following is an example storing HTML contents in a database cache. We first create a table mapping URLs to HTML contents. The …

Store compressed data in database using PHP Read more »

Format numbers with leading and trailing zeros in PHP

By theoryapp Posted on December 11, 2021 Posted in PHP

PHP provides str_pad() to add a string to a certain length with another string. Another way is to use sprintf() with formatting patterns. Pad leading zeros to get exactly 3 digits:

Get or Remove the Last Char in Strings in PHP

By theoryapp Posted on May 11, 2021 Posted in PHP Tagged with substr

PHP function substr() allows manipulating a string for the rear. The function is defined as below. It returns the portion of string specified by the start and length parameters. If start is negative, the starting position is counted from the …

Get or Remove the Last Char in Strings in PHP Read more »

Find and Replace Hashtags and Mentions in PHP

By theoryapp Posted on February 28, 2021 Posted in PHP Tagged with hashtag, mention, social network

Social network messages often use hashtags and username mentions to build connections. For example, following message mentions username such as @dummyuser and has hashtags such as #dummytag. The following examples show how to retrieve and replace hashtags and mentions using …

Find and Replace Hashtags and Mentions in PHP Read more »

Posts navigation

1 2 Next

Recent Posts

  • How to Create a Table using jsPDF
  • How to Choose a Random Element from an Array
  • How to Print a List of Items in Rows and Columns in jsPDF
  • How to Search in Aarrys by Object Property in JavaScript
  • How to Generate PDF File in JavaScript
  • Impagliazzo’s Hardcore Lemma and Computational Hardness
  • Searching and Replacing with grep and sed
  • Turn Off Voice Assistant on Apple Mac
  • A Double Sum of Binomials
  • Chernoff Bound

Categories

  • Algorithm
  • BigData
  • Combinatorics
  • DevTool
  • HowTo
  • Java
  • JavaScript
  • MySQL
  • PHP
  • Probability
  • SQL
  • Theory
  • Uncategorized
  • Web

Tags

abstract class abstract method ArrayList boolean function chernoff bound class context free language CSS derandomization divide and conquer dom endswith FIFO fourier analysis generic type geocoding google maps html inheritance interface java java collection JavaScript lifo loop mysql object-oriented PHP polymorphism probability programming pseudorandom generator random random walk recursion regular expression regular language seo sql startswith store locator string twitter url redirect xml

Archives

  • July 2023
  • May 2023
  • March 2023
  • May 2022
  • February 2022
  • December 2021
  • August 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • February 2020
  • January 2020
  • December 2019

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2023 TheoryApp | Powered by Responsive Theme