HS Banner
HS Codebank Articles
Page 1 of 4

Find all the Numbers Using Regular Expression 02/16/2026

Description:

This code opens a text file and uses regular expression to find all the number and puts them in a list to get the sum.

Author: Admin
Language: Python
Tags: python open file sum regular expression
Read More

Use BeautifulSoup in Python to extract links from a web page. 02/16/2026

Description:

Use BeautifulSoup in Python to extract all the links by retrieving all the anchor tags from a web page.

Author: Admin
Language: Python
Tags: python beautifulsoup
Read More

How to open a text file in Python 12/28/2025

Description:

Here's how to open a text file in Python.

Author: Admin
Language: Python
Tags: python open file
Read More



MODBUS/TCP Example 12/08/2024

Description:

The following example shows how to configure a MODBUS/TCP protocol and read values.

Author: Admin
Language: C#
Tags: modbus tcp
Read More

Modbus Serial Example 12/08/2024

Description:

The following example shows how to configure a serial Modbus protocol and read values

Author: Admin
Language: C#
Tags: modbus serial com
Read More

Add a new item to an array, it can be inserted with the help of array_splice() a function of PHP. 09/09/2023

Description:

This function removes a portion of an array and replaces it with something else. If offset and length are such that nothing is removed, then the elements from the replacement array are inserted in the place specified by the offset.

Author: Admin
Language: PHP
Tags: array php insert array_splice
Read More

User-defined functions 07/08/2023

Description:

User-defined function are used to preform task in PHP code like saving a user's form input to a database.

Author: Admin
Language: PHP
Tags: functions php
Read More



Use Sockets to send and receive data over TCP 05/07/2023

Description:

When working with System.Net.Sockets, you represent a network endpoint as an IPEndPoint object. The IPEndPoint is constructed with an IPAddress and its corresponding port number. Before you can initiate a conversation through a Socket, you create a data pipe between your app and the remote destination.

Author: Admin
Language: C#
Tags: sockets send receive tcp cs
Read More

PHP Speller 03/26/2023

Description:

PHP spell check library.

Author: Admin
Language: PHP
Tags: php spell check
Read More

PHP Tags 03/07/2023

Description:

When PHP parses a file, it looks for opening and closing tags, which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser.

Author: Admin
Language: PHP
Tags: php tags
Read More

Submit Your Code

If you would like to share your code on HS Codebank you can submit it by registering and clicking the submit article button on this page.
LoginRegisterContact Us

List of Supported Languages
Apache Config
Bash
C
C#
C++
CoffeeScript
CSS
Diff
GO
HTML, XML
HTTP
Java
JavaScript
JSON
Kotlin
Less
Lua
Makefile
Markdown
Nginx Config
NSIS
Objective-C
Perl
PHP
Plain Text
PowerShell
Properties
Python
Python REPL
R
Ruby
Rust
SCSS
Shell Session
SQL
Swift
TOML, also INI
TypeScript
VB Script
Visual Basic .NET
YAML
Request New Language