Quantcast
Browsing all 21 articles
Browse latest View live

How do you call an actionscript function from a html page and viceversa. How...

The following code helps you to do this. Save the following  code as am .mxml file <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"...

View Article


Image may be NSFW.
Clik here to view.

Hide and Show a Text Using jQuery – Example

With jQuery manipulation of HTML & CSS can be done very easily. Here we are going to show how to Hide a line of text using jQuery & Show it back also. Let’s code speak first…. <html>...

View Article


Image may be NSFW.
Clik here to view.

Using Arrays in JavaScript – Basics

Hi… We all know, Arrays are nothing but variables which can hold all your variable values with a single name. Let’s see some basic operations of Arrays in JavaScript. To Create a New Array. Use the...

View Article

Image may be NSFW.
Clik here to view.

Client Side Form Validation – using JavaScript

Hi, JavaScript is mainly used for client side scripting. In client side scripting one of the thing which we are usually in need is Validation of Forms. We want to know the user , who is interacting...

View Article

jQuery dollar sign alternative

Hi, Dollar ($) sign is a shortcut for jQuery. But sometimes it may have conflict with some other JavaScript library functions which also uses $ sign. What to do then? Its simple. Use jQuery...

View Article


Image may be NSFW.
Clik here to view.

Showing Twitter updates on Blogger/Blogspot

Hi, If you want to show the latest twitter update of yours in your blogger/blogspot, then use the following steps. 1. Go to your blogger ‘Design’ 2. Click ‘Add A Gadget’ 3. Add ‘HTML/JavaScript’ 4....

View Article

Image may be NSFW.
Clik here to view.

Converting String to Upper Case in JavaScript

Hi, For converting a string to upper case in javascript, use the following code. <html> <head> <title>Convert String</title> <script type="text/javascript"...

View Article

Passing a Value to a Function in JavaScript – An Example

Hi, Given below, is an example for passing a value to a function in JavaScript. <html> <head> <title>Passing A Value To A Function</title> <script language="JavaScript">...

View Article


Trim a string in Javascript.

Below is a simple function to implement this. function trim(str) { if(!str || typeof str != 'string') { return null; } return str.replace(/^[s]+/,'').replace(/[s]+$/,'').replace(/[s]{2,}/,' '); } Link...

View Article


Image may be NSFW.
Clik here to view.

How to Refresh a HTML Page Using JavaScript ?

Hi, Most probably you may have encountered a situation where you have to refresh the web page in your code. Here is, how it could be done using JavaScript. Here on button click it will call the...

View Article

How to call Android function from JavaScript?

Check the Video below to see what we are going to do… If the web page you plan to load in your WebView use JavaScript, you must enable JavaScript for your WebView. Once JavaScript is enabled, you can...

View Article

Image may be NSFW.
Clik here to view.

What are Angular JS modules? – A Simple Demo

Angular JS modules means : An AngularJS module defines an application. The module is a container for the different parts of an application like controller, services, filters, directives etc. The module...

View Article

Is Javascript Multithreaded? How it handles asynchronous actions?

Javascript is a single threaded application. That means you cannot run more than one script at one time to modify DOM or something. But there are something called “Worker Threads” that spans separate...

View Article


Image may be NSFW.
Clik here to view.

Using Webview in Flutter – Part 1

We can use Webviews in Flutter with the help of webview plugins. I will be showing one of the plugins that is developed by the Flutter team. So Let’s start and we will add the dependency first Webview...

View Article

Flutter vs. React Native: Unraveling the Performance Battle

Introduction: When it comes to developing cross-platform mobile applications, Flutter and React Native have emerged as the two dominant frameworks. As developers seek to create high-performing apps,...

View Article


Given a sorted array, find the smallest positive integer that is not the sum...

Java public class SmallestPositiveInteger {    public static int findSmallestPositiveInteger(int[] nums) {        int smallest = 1;        for (int num : nums) {            if (num <= smallest) {...

View Article

Problem: There are N prisoners standing in a circle, waiting to be executed…

There are N prisoners standing in a circle, waiting to be executed. The executions are carried out starting with the kth person, and removing every successive kth person going clockwise until there is...

View Article


Converting date into string format in Python, Javascript, Java and Ruby

Pythonfrom datetime import datetimedate_object = datetime.now()date_string = date_object.strftime(“%Y-%m-%d %H:%M:%S”)print(date_string) JavaScriptconst currentDate = new Date();const dateString =...

View Article

Convert a date from Central Standard Time (CST) to Indian Standard Time (IST)

To convert a date from Central Standard Time (CST) to Indian Standard Time (IST), you need to consider the time zone difference between these two zones. Below are examples in Swift :Swift: import...

View Article

Three common errors in Python programming along with examples

1. Syntax ErrorExample: print("Hello, world!" 2. IndentationErrorExample: if True: print("Indentation error") Explanation: Python relies on indentation to define block structures. The print statement...

View Article
Browsing all 21 articles
Browse latest View live