How to: Convert string/text to ASCII in python & How to: Convert ASCII to string/text in python

Method 1

#String we want to convert to ASCII
my_string = "AAAasdasfd, a[sdfi       94q,p asf "
#Convert to ASCII
results_in_ASCII = list(my_string.encode())
#Convert back to string
results_in_string = bytes(results_in_ASCII).decode()
#Print ASCII
#Print String
Method 1
Method 1

Method 2

#String we want to convert to ASCII
my_string = "Hello, world!"
#Convert to ASCII
results_in_ASCII = [ord(x) for x in my_string]
#Convert back to string
results_in_string = ''.join(chr(i) for i in results_in_ASCII)
#Print ASCII
#Print String
Method 2
Method 2


How do I convert a list of ascii values to a string in python?

PHP MySQL Prepared Statements, data binding Example/Sample (With “CURRENT_TIMESTAMP” etc.)

(If you are not sure what is “->” in php or what is ‘ssi’ in bind_param Scroll to “Some basics” section first, then start from top of the page)

Database connection configuration

(Before starting, we need to create database connection string)

$servername = "localhost";
$username = "database_username";
$password = "database_password";
$dbname = "database_name";
// Create connection
$db_connect = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($db_connect->connect_error) {
    die("Connection failed: " . $conn->connect_error);
//echo "Connected successfully";

Example 1 – Insert with prepared statement, data binding

//Prepare statement
$stmt = $db_connect->prepare("INSERT INTO Table_Name VALUES (?, ?, CURRENT_TIMESTAMP, ?)");
//Bind data
$stmt->bind_param('ssi', $First_Name, $Last_Name, $Age);
//Populate Data
$First_Name = 'Fred';
$Last_Name = 'Smith';
$Age = 50;
if(!$stmt->execute()) {
	die('Error: ' . mysqli_error($db_connect));

Example 2 – Select with prepared statement, data binding

$stmt = $db_connect->prepare("SELECT Product FROM Table_Name WHERE ID = ?");
$ID = 'ABC123';
$result = $stmt->get_result();
if($result->num_rows > 0) {
	while($row = $result->fetch_assoc()) {
		echo $row['Product'];


if($result->num_rows > 0) {
	while($row = $result->fetch_assoc()) {
		echo $row['Product'];

Can be replaced by:

if($result->num_rows > 0) {
	while($row = mysqli_fetch_array($result)) {
		echo $row['Product'];

What is fetch_assoc()? [5]

What is mysqli_fetch_array()? [6]

Example 3 – Update with prepared statement, data binding

$stmt = $db_connect->prepare("UPDATE Table_Name SET First_Name=?, Last_Name=?, Time=CURRENT_TIMESTAMP, Num_Books=? WHERE ID=?");
$stmt->bind_param('ssis', $First_Name, $Last_Name, $Num_Books, $ID);
$First_Name = 'Fred';
$Last_Name = 'Smith';
$Num_Books = 10;
$ID = 'ABC123';
if(!$stmt->execute()) {
	die('Error: ' . mysqli_error($db_connect));

Some basics

Object operator “->” [2,3,4]

e.g. “$db_connect->close();”

// Create a new instance of MyObject into $obj
$obj = new MyObject();
// Set a property in the $obj object called thisProperty
$obj->thisProperty = 'Fred';
// Call a method of the $obj object named getProperty
-> is like
. in Javascript
. in JAVA
. in RUBY
. in CloudFusion
. in Python

Type specification chars “i,d,s,b”

($stmt->bind_param(‘ssi’, $First_Name, $Last_Name, $Age);)

(To learn what is ‘ssi’ in Bind data part, see this “Type specification chars” table)

Type specification chars [1]

icorresponding variable has type integer
dcorresponding variable has type double
scorresponding variable has type string
bcorresponding variable is a blob and will be sent in packets


[1] php official document: mysqli_stmt::bind_param
[2] w3schools: PHP OOP – Classes and Objects
[4] php official document: Objects
[5] php official document: mysqli_result::fetch_assoc
[6] w3schools: PHP mysqli fetch_array() Function

Simple/Quick List of Free Code Editors (Include free, open source)

(There are many commercial editors with trial period, they are not included in this list, only free or open source editors are listed)

  1. Aptana Studio (Windows, Linux, macOS)
  2. (Windows, Linux, macOS)
  3. Crimson Editor (Windows)
  4. jEdit (Windows, Linux, macOS)
  5. Notepad++ (Windows)
  6. Programmer’s Notepad (Windows)
  7. PSPad (Windows)
  8. SCREEM (Linux) (HTML/Web)
  9. Visual Studio Code (Windows, Linux, macOS)

Open source and Free Alternative to Postman -> Postwoman

Postwoma -
Postwoma –

Postwoman is an open source alternative to Postman. (Usually used for API request building)

Using Postwoman is basically same as using Postman, there should be no learning curve at all if you switch from Postman to Postwoman.

Description from official GitHub page

Features ✨

❤️ Lightweight: Crafted with minimalistic UI design – simple design is the best design.

⚡️ Fast: Send requests and get/copy responses in real-time – fast software is the best software.


  • GET – Retrieve information about the REST API resource
  • HEAD – Retrieve response headers identical to those of a GET request, but without the response body.
  • POST – Create a REST API resource
  • PUT – Update a REST API resource
  • DELETE – Delete a REST API resource or related component
  • CONNECT – Establishes a tunnel to the server identified by the target resource
  • OPTIONS – Describe the communication options for the target resource
  • TRACE – Performs a message loop-back test along the path to the target resource
  • PATCH – Apply partial modifications to a REST API resource
  • <custom> – Some APIs use custom request methods such as LIST. Type in your custom methods.

🌈 Make it yours: Customizable combinations for background, foreground and accent colors: because customization is freedom. Customize now ✨.


  • Choose theme: Kinda Dark (default), Clearly White, Just Black and System theme
  • Choose accent color: Green (default), Yellow, Pink, Red, Purple, Orange, Cyan and Blue
  • Toggle multi-colored headings

Customized themes are synced with local session storage

🔥 PWA: Install as a PWA on your device.


🚀 Request: Retrieve response from endpoint instantly.

  • Choose method
  • Enter URL and Path
  • Send


  • Copy/share public “Share URL”
  • Generate request code for JavaScript XHRFetch and cURL
  • Copy generated request code to clipboard
  • Import cURL
  • Label requests

🔌 WebSocket: Establish full-duplex communication channels over a single TCP connection.

  • Send and receive data
  • Basic and Bearer Token authentication

📡 Server Sent Events: Receive a stream of updates from a server over a HTTP connection without resorting to polling.

🔮 GraphQL: GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data.

  • Set endpoint and get schemas
  • Multi-column docs
  • Set custom request headers
  • Query schema
  • Get query response

🔐 Authentication: Allows to identify the end user.


  • None
  • Basic
  • Bearer Token
  • OAuth 2.0
  • OIDC Access Token/PKCE (Proof Key for Code Exchange)

📢 Headers: Describes the format the body of your request is being sent as.

  • Add or remove Header list

📫 Parameters: Use request parameters to set varying parts in simulated requests.

📃 Request Body: Used to send and receive data via the REST API.


  • Set Content Type
  • Add or remove Parameter list
  • Toggle between key-value and RAW input Parameter list

👋 Responses: Contains the status line, headers and the message/response body.

  • Copy response to clipboard
  • Download response to as a file
  • View preview of HTML responses

⏰ History: Request entries are synced with local session storage to reuse with a single click.


  • Star
  • Label
  • Method
  • Status code
  • URL
  • Path
  • Timestamp
  • Duration
  • Pre-request script

History entries can be sorted by any fields

Histories can be deleted one-by-one or all together

📁 Collections: Keep your API requests organized with collections and folders. Reuse them with a single click.


  • Create infinite collections, folders and requests
  • Edit, delete, move, export, import and replace

Collections are synced with local session storage

🌐 Proxy: Enable Proxy Mode from Settings to access blocked APIs.


  • Hide your IP address
  • Fixes CORS (Cross Origin Resource Sharing) issues
  • Access APIs served in non-HTTPS (http://)
  • Use custom Proxy URL

Official Postwoman Proxy is hosted by ApolloTV – Privacy policy

📜 Pre-Request Scripts β: Snippets of code associated with a request that are executed before the request is sent.


  • Include timestamp in the request headers
  • Send a random alphanumeric string in the URL parameters

Requests with Pre-Request Scripts are indicated in History entries

📄 API Documentation: Create and share dynamic API documentation easily, quickly.


  1. Add your requests to Collections and Folders
  2. Export Collections and easily share your APIs with the rest of your team
  3. Import Collections and Generate Documentation on-the-go

⌨️ Keyboard Shortcuts: Optimized for efficiency.


  • Send Request Ctrl + G
  • Save to Collections Ctrl + S
  • Copy Request Link Ctrl + K
  • Reset Request Ctrl + L

🌎 i18n β: Experience the app in your own language.

  1. Scroll down to the footer
  2. Click “Choose Language” icon button
  3. Select your language from the menu

Keep in mind: Translations aren’t available for all source and target language combinations

To provide a localized experience for users around the world, you can add you own translations.

All i18n contributions are welcome to i18n branch only!

📦 Add-ons: Official add-ons for Postwoman.

  • Proxy β – A simple proxy server created for Postwoman
  • CLI β – A CLI solution for Postwoman
  • Browser Extensions – Browser extensions that simplifies access to Postwoman Firefox (GitHub)  |   Chrome (GitHub)Extensions fixes CORS issues.

Add-ons are developed and maintained under Official Postwoman Organization.

☁️ Auth + Sync: Sign in and sync in real-time.

Sign in with:

  • Google
  • GitHub


  • History
  • Collections

✅ Post-Request Tests β: Write tests associated with a request that are executed after the request response.


  • Check the status code as an integer
  • Filter response headers
  • Parse the response data

To find out more, please check out Postwoman Wiki.


Postwoman Demo
Official GitHub page

List of 9 Great Visual Studio Code Plugins for Front-End Developers

These plugins are free and can be installed directly from VS Code “Extensions” tab.

Visual Studio Intellicode

The Visual Studio IntelliCode extension provides AI-assisted development features for Python, TypeScript/JavaScript and Java developers in Visual Studio Code, with insights based on understanding your code context combined with machine learning.

Visual Studio Intellicode
Visual Studio Intellicode

Path Intellisense

Visual Studio Code plugin that autocompletes filenames

Path Intellisense
Path Intellisense


Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

JavaScript · TypeScript · Flow · JSX · JSON CSS · SCSS · Less HTML · Vue · Angular GraphQL · Markdown · YAML

Git Blame

See git blame information in the status bar.

Git Blame
Git Blame

JavaScript (ES6) Code Snippets

Contains code snippets for JavaScript in ES6 syntax for Vs Code editor (supports both JavaScript and TypeScript).


Statically analyzes the code and quickly find problems. Can fix many problems automatically. Customizable


Indented Sass syntax highlighting, autocomplete & Formatter for VSCode

Debugger for Chrome

Chrome Debugger allows front-end developers to debug their client-side JavaScript code running inside Google Chrome directly from Visual Studio Code.

Debugger for Chrome
Debugger for Chrome

SVG Viewer

SVG Viewer for Visual Studio Code

SVG Viewer
SVG Viewer