In this post I’m going to share a JavaScript function, if you call it (and assign some number as length of randomized text you want), it will return random text.
JavaScript codes to only accept alphabet letters and numbers from your users
Sometimes we ask our users to type in something and we only accept alphabet numbers and/or letters, so they should not type something like #$%!@$&%(…
Picking an Image and Taking Photo in Android – Java source code
This is Java source code for Android, providing you with two functions: to take a photo using camera and to pick an image from gallery.
Getting user’s latitude and longitude in Android – Java source code
In this example, user’s device is showing it’s current latitude and longitude every 5 seconds. Coordinates are displayed inside Android Toast.
Pick an Image from Android device and upload it to server using PHP
To upload an image from Android device to online server using PHP, first we need to create a PHP script to handle “post” request and store the image to a folder. So write this simple script on your server:
How to make Android’s WebView opens a link inside or outside current app?
Initially if we use a WebView in our Android app, if there is a link and we click it, an intent manager is being called and asking how do we want to open that link. But we can manage it to open that link inside current that WebView or regular web browser.
How to create an HTML input box with search icon inside it?
We can make an interesting search input by styling it with css, by adding search icon like what we see in this image:
JavaScript Table of Contents Generator
I had a project to create table of contents of huge text files with .html format, it was thousands. Then I’ve developed a JavaScript Table of Contents generator that detect some text to be included as TOC.
Trim a text and show an ellipsis instead full text with CSS
In case we have a div element with fixed width, for example 100 pixels, and we only want to show an excerpt of text instead showing full text, let’s use this simple css trick.
How to use zklevedit (tile and level editor for Phaser)
I’ve created a kind of level and tile editor for making games with Phaser. Please watch my video tutorial about how to use it here:
Phaser basics and useful snippets
Phaser is a really good JavaScript library for creating games that you can play it in web browsers. In this post I’ll share basic stuffs how to use Phaser.
Another Simple JavaScript Encryption
Somebody asked me how to do an encryption just like if we type “a” it should return “d” (3 letters after “a” position).
Another example for find and replace using regex in Notepad++
In case we have a long text contains a group of numbers followed by dot like 435. blabla, 4546. blablabla, 343432. a text… and we have it so much in a file in a single line text. Then we want to separate them like this:
Selecting any non latin characters in Notepad++
We can select any non latin characters in Notepad++ by using regular expression.
Python useful snippets
In this post you can find useful and frequently used Python snippets. Just copy and paste it!
How to use jQuery to perform a Quick Search
In this post I’m going to share a source code for performing quick search functionality using jQuery.
How to save an image from html5 canvas
With HTML5’s Canvas we can draw nice graphics. But how we can save it as an image? Of course we can right click on the canvas and download that image. But here I’m going to share a script to download it programmatically by a clicking a link.
.htaccess tutorial : Removing .php extension
If you have a page with .php extension and you don’t want to show that extension in page’s url in address bar, you will need an .htaccess file.
A useful PHP function to use Google reCAPTCHA
This one php function snippet can return true or false value after user submitted a form with Google reCAPTCHA in it.
PHP useful snippets
This page is dedicated for a bunch of PHP useful snippets and codes that we often use it in web development.