您可以找到使用多种编程语言来解决同一问题的编程示例。
请为您的问题和解决方案找到最佳的编程语言。
涵盖所有情况:JavaScript Perl PHP Python Ruby | 涵盖一些情况:C C ++ C#Go Java Shell

主要分类
Array | Class | Database | File | Network | String | System | Time | Variable



Array

Loop an array and print items


Loop an associative array and print items


Get length of array


Get minimum value in the array


Get maximum value in the array


Join items in the array


Sort array in ascending order


Sort array in descending order


Sort associative array based on key in ascending order


Sort associative array based on key in descending order


Sort associative array based on value in ascending order


Sort associative array based on value in descending order


Class

Create class and object


Create derived class and object


Database

Connect to mysql and show SELECT data


Manipulate PostgreSQL (Connect/Create Table/Insert/Select/Drop/Transaction)


File

Write to file and read whole content of file at one time


Write to file and read content of file line by line


Create and delete directories recursively


Recursively find only files under certain directory


Network

Crawl and parse content of web site


String

Print string (Hello World)


Trim white spaces of string at head and tail


Split string by separator


Make characters lower and replace specified character


Change upper characters into lower characters


Get length of string


Check whether the string contains the specified string by regex


URL encode the string


URL decode the string


Convert character encoding


System

Execute system command in program and get the result


Time

Get current date time in the format of YYYY/MM/DD hh:mm:ss


Variable

Dump variable and check content


Check whether the variable is defined or not


Print passed parameters(ARGVs) through command line


Read Json file and parse it


Import environmental value from .env(dotenv) and print specified ENV value