Thursday, January 11, 2018

Ajax Quick Tutorial


AJAX stands for Asynchronous JavaScript and XML. AJAX is not a programming language but a technique for creating interactive web applications. It sends and receives data from client browser to server(independent of server technology).

Significance

  • Though XML is the common format, Ajax supports other types like plain text, Json
  • It allows web pages to be updated asynchronously by exchanging data with a web server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page.


Limitations

  • AJAX has browser incompatibility 
  • For security reasons, modern browsers do not allow access across domains data


Workflow

  • Trigger (on page load, onclick, onchange, etc,.)
  • create XMLHttpRequest object in JavaScript
  • send a request to a web server
  • receive the response
  • process the response in JavaScript


3 Way to use Ajax

Direct Method

function loadDoc() {
  var xhttp = new XMLHttpRequest(); //create XMLHttpRequest object in JavaScript
  xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) //checking the status and read the data
{document.getElementById("result").innerHTML = this.responseText;}
  };
  xhttp.open("GET", "feed.xml", true); // get or post
  xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");//to set header for content type or cookies
  xhttp.send("m=1&type=summary");//for get parameters can be passed
  xhttp.send();
}

-----------
Callback Method
onclick="loadDoc('ajax_info.txt', myFunction)"

function loadDoc(url, cFunction) {
  var xhttp;
  xhttp=new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {cFunction(this);}
  };
  xhttp.open("GET", url, true);
  xhttp.send();
}
function myFunction(xhttp) {
  document.getElementById("result").innerHTML = xhttp.responseText;
}

JQuery Method
add Jquery lib http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js
<button id="readFile">Read File</button>
$(document).ready(function() {
    $("#readFile").click(function() {
        $.ajax({
            url : "http://macrolayer.blogspot.com/2016/03/waterways.html?m=1",
            dataType: "text",
            success : function (data) {
                alert(data.length);
                alert(data);
            }
        });
    });
});



MethodDescription
new XMLHttpRequest()Creates a new XMLHttpRequest object
abort()Cancels the current request
getAllResponseHeaders()Returns header information
getResponseHeader()Returns specific header information
open(method,url,async,user,psw)"Specifies the request
method: the request type GET or POST
url: the file location
async: true (asynchronous) or false (synchronous)
user: optional user name
psw: optional password"
send(optional string)Sends the request to the server. parameter is used for POST requests.
setRequestHeader()set the header content to be sent


PropertyDescription
onreadystatechangeDefines a function to be called when the readyState property changes
readyState"Holds the status of the XMLHttpRequest.
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is ready"
responseTextReturns the response data as a string
responseXMLReturns the response data as XML data
status"Returns the status-number of a request 200: ""OK""
403: ""Forbidden""
404: ""Not Found"""
statusTextReturns the status-text (e.g. "OK" or "Not Found")




Thursday, October 19, 2017

Run Time Errors and solution in VBA

Run-time Error '3': Return without GoSub
when GoSub and Return are matched. Unlike For/Next, While/Wend, and Function...End Function, which are matched at compile time.

Run-time Error '5': Invalid procedure call or argument
when a procedure call with exceeded range of arguments or procedure that isn't valid on the current platform

Run-time Error '6': Overflow
If variable exceeds the limit then it considers as overflow. i.e integer value more than 32767. Occurs in assignment, calculation, data type conversion.

Run-time Error '7': Out of memory
Close any unnecessary applications, documents, or source files that are open.
Break large modules or procedures into smaller ones. This doesn't save memory, but it can prevent hitting 64K segment boundaries.
Increase virtual memory by freeing some disk space
Reduce the number of Public variables.

Run-time Error '9': Subscript out of range
nonexistent array element. larger or smaller subscript of arrays or collections

Run-time Error '10': This array is fixed or temporarily locked
when array is redim, sometime it happens. Note that not all arrays can be redimensioned.

Run-time Error '11': Division by zero
when a variable with division zero which is not possible

Run-time Error '13': Type mismatch
datatype should be matched. If not use conversion functions like Cbool, cint, cstr. use Variant type for flexible datatype

Run-time Error '14': Out of string space
Run-time Error '16': Expression too complex
Run-time Error '17': Can't perform requested operation
Run-time Error '18': User interrupt occurred
Run-time Error '20': Resume without error
Run-time Error '28': Out of stack space
Run-time Error '35': Sub, Function, or Property not defined
Run-time Error '47': Too many DLL application clients
Run-time Error '48': Error in loading DLL
Run-time Error '49': Bad DLL calling convention
Run-time Error '51': Internal error
Run-time Error '52': Bad file name or number
Run-time Error '53': Can't find specified file
Run-time Error '54': Bad file mode
Run-time Error '55': File already open
Run-time Error '57': Device I\O error
Run-time Error '58': File already exists
Run-time Error '59': Bad record length
Run-time Error '61': Disk full
Run-time Error '62': Input past end of file
Run-time Error '63': Bad record number
Run-time Error '67': Too many files
Run-time Error '68': Device unavailable
Run-time Error '70': Permission denied
Run-time Error '71': Disk not ready
Run-time Error '74': Can't rename with different drive
Run-time Error '75': Path\File access error
Run-time Error '76': Path not found
Run-time Error '91': Object variable or With block variable not set
Run-time Error '92': For loop not initialized
Run-time Error '93': Invalid pattern string
Run-time Error '94': Invalid use of Null
Run-time Error '96': Can't sink this object's events because it's already firing events to the maximum number of supported event recipients
Run-time Error '97': Can't call Friend procedure on an object that isn't an instance of the defining class
Run-time Error '98': A property or method call cannot include a reference to a private object, either as an argument or as a return value
Run-time Error '321': Invalid file format
Run-time Error '322': Can't create necessary temporary file
Run-time Error '400': Form already displayed; can't show modally
Run-time Error '422': Property not found
Run-time error '424': Object Required Error
Run-time Error '429': ActiveX component can't create object or return reference to this...
Run-time Error '430': Class doesn't support Automation or does not support expected interface
Run-time Error '432': File name or class name not found during Automation operation
Run-time Error '438': Object doesn't support this property or method
Run-time Error '440': Automation error
Run-time Error '442': Connection to type library or object library for remote process h...
Run-time Error '443': Automation object doesn't have a default value
Run-time Error '445': Object doesn't support this action
Run-time Error '446': Object doesn't support named arguments
Run-time Error '447': Object doesn't support current locale setting
Run-time Error '448': Named argument not found
Run-time Error '449': Argument not optional
Run-time Error '450': Wrong number of arguments or invalid property assignment
Run-time Error '451': Property let procedure not defined and property get procedure did not return an object
Run-time Error '452': Invalid ordinal
Run-time Error '453': Specified DLL function not found
Run-time Error '454': Code resource not found
Run-time Error '455': Code resource lock error
Run-time Error '457': This key is already associated with an element of this collection
Run-time Error '458': Variable uses a type not supported in Visual Basic
Run-time Error '459': This component doesn't support events
Run-time Error '735': Can't save file to TEMP directory
Run-time Error '744': Search text not found
Run-time Error '746': Replacements too long
Run-time Error '31001': Out of memory

Thursday, September 7, 2017

Decoding bai file type

This post is all about decoding bai file type. so that any application can be developed convert bai file type to csv or any. csv file is nothing but comma separated values, a simple file format used to store tabular data like spreadsheets. Prior to that, what is bai file type? bai is a file type (.bai extension) used to balance report in banking industry. Technically .bai is just a text file with respective delimiters called codes. Though comma is the column separator, the .bai files are typically formatted in such a way to represent other information using the prefix numeric code with every newline.

The first two digits of each line is the standard code for each line type to tell the system what type of line it is.
------------------------------------------------
01,,,,,,,,
02,,,,1230530,,,
03,80457080,,,,,,
16,475,3000,,1230530,,,456,
88,,
16,475,30000,,1230530,,,789,
98,,,
99,20000,,2
------------------------------------------------
Interpretation
01 File Header Begins File
02 Group Header Begins Group
03 Account Identifier Begins Account
16 Transaction Detail (Optional) Within Account
88 continuation of details
49 Account Trailer Ends Account
98 Group Trailer Ends Group
99 File Trailer Ends File

01
File Header
The file header marks the beginning of a file. It identifies the sender and receiver of the transmission, and it describes the structure of the file.
02
Group Header
The group header identifies a group of accounts that are from the same originator and includes the same as-of-date and as-of-time.
03
Account Identifier and Summary/Status
This record identifies the account number and reports activity summary and account status information. Summary information may be accompanied by an item count and funds availability distribution.
16
Transaction Detail
This record is used for transmission of detail transaction information. Transaction detail may include two reference numbers and a free-form alphanumeric text.
88
Continuation
A Continuation record is used when data exceed the maximum physical record length, or whenever it is desirable to continue data into an additional record. It may follow any record type, including another “continuation” (88) record.
49
Account Trailer
The Account Trailer record provides account control
totals
98
Group Trailer
This record provides group control totals.
99
File Trailer
This record provides file control totals.


File Header
It contains sender, receiver alphanumeric identifiers, File created date in YYMMDD format, File created time, file identification id, number of characters, block size, version number.
Group Header
It contains receiver identifier, originator identifier, status, date, time, currency code.
Account Header
It contains customer account number, currency code, type code, amount, item count, fund type
Transaction Header
It contains Transaction type code, Amount, fund type, bank reference number, customer reference number, Text. Among transaction type code 010 to 099 are reporting purpose. 100 to 399 type codes indicate Credit transaction. 400 to 760 indicate debit transaction.

A bai file should starts with 01 & ends with 99 code. It can have multiple groups starts with 02 & ends with 98 codes. Account details should be inside the group header. 16 indicates all type of Transaction details when the information is large than the continuations will be present with 88 code in next line.


Friday, May 12, 2017

Automation Testing with CodedUI

Manual Testing is the process of testing a software manually. when there is requirement for GUI testing then one of the best solution is CodedUI. since it is Microsoft stack and integrated in visual studio. Visual Studio 2010 Ultimate/ Premium has codeUI option where user can test the performance of graphical user interface. CodedUI tests provide functional testing as well  regression testing.

Below are the minimum requirement for CodeUI
Microsoft Visual Studio 2010  or above
Microsoft Test Manager 2010 or above

Microsoft Test Agent 2010 or above

To Open Test

  • To start a new test project, go to File -> New -> Project.    In the New Project window, select the Test Project template from Visual C# ->Test and select the OK button to create it.
  • To create a new test, Right click on Project solution and then Add -> Coded Test
  • To record steps ,select  Record actions, edit UI MAP or add assertions and click OK to start the recording process
  • To record steps , select “Record actions, edit UI map or add assertions” and click OK to start the recording process
  • Now Coded UI Test Builder is displayed to start recording . click record button in Coded UI Test Builder
  • Do the manual process like opening a webpage/application, click different controls. finally click Stop button to stop the recording
  • Click the Generate Code button in the Coded UI Test Builder to generate a test method and give custom name and click "add and generate". Now code is recorded. Let's now create an assertion that will check the value of Name. 
  • To create an assertion, press the third button in the Coded UI Test Builder and To identify a new control, drag the crosshair onto the control or hover mouse over the control. After releasing the mouse button, an Add Assertions window is displayed allowing you to add assertions. Assertion added for the Name for inner text properties. 
  • Click the Generate Code button in the Coded UI Test Builder to generate an assertion method. 
  • Source file for CodedUI
  •  If we need to run the test for multiple inputs then need to add parameter values form data source. 
  1.  Add an xml file in codedUI test
  2.  Open properties window to add data connection string.Test ->TestView  right click on codedUi test method and open propeties. select Xml file.
  • Once all tests and assertions are created, you can run tests. open the Test View window by selecting Test -> Windows > Test View  from the main menu of Visual Studio. Now right-click in the test method, and then click Run Tests or Debug Tests
File
Description
CodedUITest1.cs
Contains the coded UI test class, test methods and assertions. We can modify it.
UIMap.uitest
Contains the XML model for the UIMap class, including all windows, controls, properties, methods, parameters, actions, and assertions. This file is not directly editable. But the Coded UI Test Builder helps to modify the existing test which will automatically modify the UIMap.uitest and UIMap.Designer.cs file.
UIMap.Designer.cs
Contains the code representation of the XML contained in the UIMap.uitest file. Do not edit this file.
UIMap.cs
Contains more of the code for the UIMap class. You can put any customizations for the UI map in this file.


Reference(s)
https://msdn.microsoft.com/en-us/library/dd286681(v=vs.100).aspx

Thursday, April 14, 2016

How to Manage Outlook Effectively

Keep monitoring and prioritizing the mails are big challenge when you work with busy Mailers. In this post, I would like to bring you some suggestions/idea to manage the mails especially Outlook. Controlling time-wasters and focusing on important tasks will lead to achieve long-term goals.

First time First Serve
Whenever you read an email, flag it or decide what action or response it needs. Instead of reading it again, do at first time. Don’t read first few lines and keep it for later reading. It kills your time. Prioritize the task by reminders or Follow up flags.




Divide and Rule
Split the mails and tag it with related category. So that it gets easier to just glance at the e-mails and know, how much work you have from which category. Mails can be possible in below categories like Manager follow up, client follow up, team follow up, pending action etc., so tag it and work accordingly
Rule it
One of the best way to manage your work mailbox is to create rules. If you receive multiple emails from various senders and which you don’t want to miss ever, you can create a rule and move these e-mails directly to a designated folder. Rules can be created for all mails from particular sender or particular keywords or particular scenario to push it in particular folder or make alert or custom reply. This will help to focus attention for a particular sender.
Goto Manage Rules and Alerts-> Create new Rule, select new

Know how to search
Art of search is one of the key aspect in Digital world. Here in Outlook, when you click the search box, Outlook brings the SEARCH tag with multiple feature. If you click Has Attachments, it will brings you the mail with attachment. It gives options of search by From sender name or Subject. Unread emails can be grabbed quickly here. We can set chronological limit for the search. Your recent search strings can be reused or viewed in “Recent Searches” Option.

Responsible Responds

Though not every email seeks the reply, however important mails are looking for your response. So it is advisable to keep responding to the mail so that reminder mails will be avoided. Keep using Out of Office features so that senders can understand and act accordingly. For critical mails, set auto replies like “working on it” so that send keep wait till your response.

Monday, January 11, 2016

CDN for javascript libraries

It is best practice to have content delivery network to host common library files. This post wil bring you the few informations about available well known CDNs. For hosting Jquery below are the available locations

Google CDN
It provides a high availability, low latency resource for delivering scripts to websites. It hosted Libraries including jQuery, AngularJS, Prototype and Dojo.

ajax.googleapis.com/ajax/libs/jqueryui/[VERSION NO]/jquery-ui.min.js
ajax.googleapis.com/ajax/libs/jqueryui/[VERSION NO]/themes/[THEME NAME]/jquery-ui.min.css
for details list of libraries are provided at https://developers.google.com/speed/libraries/#jquery

Microsoft CDN

For websites built in ASP.NET, Microsoft’s CDN provides a support for JavaScript frameworks without having delay. The same files can be access for other websites as well. Below is the path

ajax.aspnetcdn.com/ajax/jquery.ui/[VERSION NO]/jquery-ui.min.js
ajax.aspnetcdn.com/ajax/jquery.ui/[VERSION NO]/themes/[THEME NAME]/jquery-ui.min.css
For more detailed Microsoft CDN content visit https://docs.microsoft.com/en-us/aspnet/ajax/cdn/overview

jQuery CDN

code.jquery.com/ui/[VERSION NO]/jquery-ui.min.js
code.jquery.com/ui/[VERSION NO]/themes/[THEME NAME]/jquery-ui.min.css
jquery dot com provides various version for UI, mobile, color etc., visit http://code.jquery.com

Yandex CDN

A russian provider who also provide Javascript libraries and CSS including Bootstarp, angular JS
https://yastatic.net/jquery/[VERSION NO]/jquery.min.js

It provides Backbone.js, Bootstrap, D3.js, jQuery, Lo-Dash, Raphaั‘l, React, SWFObject, Underscore.js, bem-components. visit
https://tech.yandex.ru/jslibs/


http://www.bootstrapcdn.com/

community-powered CDN https://cdnjs.com/api

Beside this, there are many commercial entities to provide CDN services for hosting custom contents. you can host your own scripts,

images, multimedia files without delay.
www.akamai.com
www.cloudflare.com
www.fastly.com
for more providers visit http://blog.cloudharmony.com/2015/02/cdn-marketshare-alexa-fortune-500.html

Thursday, December 31, 2015

Free Service doesn't affect Net Neutrality

If you are against FreeBasics of Facebook because of OTT Price or Facebook company or Modi government or as a competitor etc., then this post will not entertain you. But If you are against FreeBasics of Facebook only for Netneutrality please read further. Let us consider facebook as a company without any pre assumption.

Actually Net neutrality is nothing but transparent equal access for all internet data. Definitely it should not mean equal pricing, there can be price variation on various socio-economic reasons. watching an entertainment website and downloading a study material should not be priced equally on data. When we oppose rigidly on free basics and support for equal pricing, then students and knowledge seekers are affected when prices were hiked. There are many baseless rumours like free services will create monopoly, suppress start-ups, price hike and more. However If we are really worried about the operating company, then we should draft a regulation laws instead of banning free services.



Thursday, April 24, 2014

How to generate automatic emails

Automatic emails can be defined as the emails which are sent out without human action. Automated emails help not only to avoid repeated tasks and also ensure the punctuality in email transfer. I can classify it in two types, predefined and dynamic based on nature of email body content.

Tuesday, March 18, 2014

Basic examples for Outlook VBA

This post contains few basic examples for VBA in Microsoft Outlook. To get developer tab visible, File -> Option -> Customize Ribbon -> Developer.

Let see a simple example to send an email. Below is the basic code which will generate and shoot the email. In visual Basic Editor, use ThisOutlookSession or any other user modules.

Private Sub SendEmail()
Dim olObj, mlObj
Set olObj = CreateObject("Outlook.Application") 'declaring object
Set mlObj = olObj.CreateItem(0) 'declaring an email item
With mlObj
.To = "me@mydomain.com" 'Give your email
.Subject = "Testmail" ' Give the subject
.Body = "Testmail" ' Give the Body
.Send 'command to send the email
End With
Set olObj = Nothing 'Clear the memory
Set mlObj = Nothing
End Sub

Wednesday, February 5, 2014

Send automatic email using VBA

Here I have shared the simple code for sending an automatic email using Macros. It can be excuted in all primary products of the Microsoft. you can send emails to recipient from excel data too. Basically To address, subject and HTMLBody are the apex elements. assign those values and shoot the emails using below simple syntax

Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.to = "Macroraman@example.com" 'To address
.CC = ""
.BCC = ""
.Subject = "Assignment"
.HTMLBody = "Hi"
'.Attachments.Add ActiveWorkbook.FullName (for active book)
'.Attachments.Add ("D:\Book1.xls") (for external book)
'.Display (to see the message window)
'.Save (to save as Draft)
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing

You may face one dificulty when you run the code due to your Outlook security setting. It may ask your acceptance through popup. to avoid such popups follow below steps

For older window versions
Tools menu -> Options -> Security tab
uncheck and save "Warn me when other applications try to send mail as me" check box.

For latest Window versions
File - > Options -> Trust Center -> Trust Center settings -> Programmatic Access
Uncheck and save warning option

In office/secured environment, If you are unable to change the security settings, you can use less equivalent code instead of ".Send"
.Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"

which means your are executing as manual operation

Friday, November 22, 2013

Online service of Indian Gov

To apply passport
Step 1 Visit http://passportindia.gov.in/ and register yourself
Step 2 Login to the Passport Seva Portal with your registered Login Id
Step 3 Click "Apply for Fresh Passport/Reissue of Passport" link.
Step 4 update the required details in the form and submit.
Step 5 Click the "Pay and Schedule Appointment" link on the "View Saved/Submitted Applications" screen then schedule an appointment with your convenient time.
Step 6 Click the "Print Application Receipt" link to print the application receipt containing Application Reference Number (ARN)/Appointment Number.
Step 7 On scheduled time visit the booked Passport Seva Kendra (PSK), along with original documents.

For booking appointments, Online Payment has been made mandatory using any one of the following modes:
Credit/Debit Card (MasterCard & Visa)
Internet Banking (State Bank of India (SBI) and Associate Banks Only)


To apply PAN request to Income Tax Department
https://tin.tin.nsdl.com/pan/form49A.html

To apply voter id to Election commission
http://eci-citizenservices.nic.in/frmPublicInformation.aspx?Flag=OnlineApp

To apply visa request to Bureau of immigration
http://boi.gov.in/content/apply-visa-online

Online service for driving licence
https://sarathi.nic.in:8443/nrportal/sarathi/HomePage.jsp

To apply Letter of Intent to NAAC:
http://www.naac.gov.in/Apply_Online.html

Thursday, October 31, 2013

Wikipedia BOT using Google script

This page will guide you to create a basic edit model Wikipedia BOT. As we know wikipedia is an open source online encyclopedia, it also allows anyone or any bot to update the pages. Basically, Wikipedia and all its sister projects use Mediawiki software and the API of Mediawiki is available for developer. so using Google Apps Script and Mediawiki API one can develop wonderful BOT application for Wikipedia.

Saturday, September 14, 2013

Simple template for blogger Aggregator

Aggregator is a application which collects latest blog post from various feeds. There are many aggregator tools which will allow you to built a aggregator with or without voting options. But for which you have to setup a server to host. But If you are eager to have own aggregator without any complex tools and simple with blogger environment, this template is for you. Macrolayer introduces new Aggregator template "Aggregator Titan" exclusively made for aggregating service.

Saturday, July 27, 2013

Google UiApp Tutorial

The Google has a wonderful web server scripting application called Apps script. which is not only used for scripting for google products but also can be used to develop stand alone webpages with few limitations. This stand alone web interface is supported by UiApp class. This tutorial will explain about UiApp and its basic controls with a live example script


// Below script contains two functions. one is main function called doGet, which runs by default, other one is user defined function sendback().

//doGet function starts
function doGet() {
//initialize UiApp class
var app = UiApp.createApplication();


//limited HTML
//create HTML using HTML tages and set id or style. note that Anchor tag will not work in this class
var myHTML =  app.createHTML("<center><b>Test Script</b></center>").setStyleAttribute("color", "green").setId('Result');
//add it to UiApp class
app.add(myHTML);

//textArea in UiApp
//create textarea control using textarea class and set id or name, which will help to read and write data
var textAreaA = app.createTextArea().setId('TextArea1').setName('textAreaA');
//you  can design the textarea by calling its id
app.getElementById('TextArea1').setHeight('100').setWidth('450');
//finally add it to UiApp class
app.add(textAreaA);

//textbox in UiApp is more similar like text Area
var textBoxA = app.createTextBox().setId('TextBox1').setName('textBoxA');
app.getElementById('TextBox1').setWidth('300');
app.add(textBoxA);

//Button in UiApp
//Create button with any name
var addButton = app.createButton("Submit").setEnabled(true);
//assign the any user define function and arguments(textAreaA)
var handler = app.createServerClickHandler('sendback').addCallbackElement(textAreaA);
//assign above function to onclick event
addButton.addClickHandler(handler);
//finally add it to UAiApp Class
app.add(addButton);


//label in UiApp
//create label and resize the alignment as well
var labelA = app.createLabel("Developed by macrolayer.blogspot.com").setPixelSize(900,80).setHorizontalAlignment(UiApp.HorizontalAlignment.RIGHT);
//Finally add it to UiApp
app.add(labelA);

//anchor in UiApp
//As I said early, Html doesnot support Anchor tag, this anchor class will help to do so. create and add it to UiApp
var anchor1 = app.createAnchor("View my blog  |", "http://macrolayer.blogspot.com");
app.add(anchor1);



//you can add those classes with good allignment using VerticalPanel or HorizontalPanel
//finally close the function by returning the UiApp class
  return app;
}

//doGet function will execute as userinterface and sendback function will be called once the function is called.(in our example "onclick")

//since we passed argument for this function, the function should have argument e
function sendback(e) {
//get the existing UiApp
  var app = UiApp.getActiveApplication();
//get textAreaA value from parameter e
  var line=e.parameter.textAreaA;


//write your code for other execution using the input value 'line'



//response by new control
//create and add new textArea class and write the output using settext class
var textAreaB= app.createTextArea().setId('TextAreaB').setName('textAreaB').setHeight('100').setWidth('450');;  
app.getElementById('TextAreaB').setText(line);
app.add(textAreaB);
 
//response by existing control
//call the existing control and write the output
 app.getElementById('TextArea1').setText("Your input is " + line);


//finally return the app to display the results
return app;
}




Reference:https://developers.google.com/apps-script/reference/ui/ui-app

Sunday, June 30, 2013

Anchor tag tutorial

Anchor tag is a traditional tag used from the initial stage of HTML to give the navigation option to the user. It allows user to jump a page from and to. This page will describe its attributes and their significance.

Attribute Value Description
hrefabsolute URLdifferent domain, which start with http protocol
href="http://www.differentsite.com/test.asp"
relative URLurl link on same domain, which doesnot need to start with http protocol
href="homepage.html"
href=+"/homepage.html"
example: href="http://www.example.com/2013/test/homepage.html"

href="/homepage.html"
href=+"/homepage.html"
example: href="http://www.example.com/homepage.html"

href="//homepage.org"
href="http:"+"//homepage.org"
example: href="http://homepage.org"

href="./homepage.html"
href=+"/homepage.html"
example: href="http://www.example.com/2013/test/homepage.html"

href="../homepage.html"
href=+"/homepage.html"
example: href="http://www.example.com/2013/homepage.html"
anchor URLhref="#top"
href=+"#top"
example:href="http://www.example.com#top"
mailto protocolhref="mailto:user@example.com? subject=MessageTitle& body=Message Content"
target _blankOpens the linked document in a new window or tab
_self(default)Opens the linked document in the same frame as it was clicked
_parentOpens the linked document in the parent frame
_topOpens the linked document in the full body of the window
framenameOpens the linked document in a named frame
charset char_encoding Not supported in HTML5. Specifies the character-set of a linked document
coords (supported in Firefox and Opera only) x1,y1,x2,y2If the shape attribute is set to "rect", it specifies the coordinates of the top-left corner and the bottom-right corner of the rectangle
x,y,radiusIf the shape attribute is set to "circle", it specifies the coordinates of the circle center and the radius
x1,y1,x2,y2,..,xn,ynIf the shape attribute is set to "poly", it specifies the coordinates of the edges of the polygon. If the first and last coordinate pairs are not the same, the browser must add the last coordinate pair to close the polygon
hreflang language_code A two-letter language code that specifies the language of the linked document. To view all available language codes, go to w3schools Language code reference.
media media_query Specifies what media/device the linked document is optimized for. more
name section_name Not supported in HTML5. Specifies the name of an anchor
rel alternateLinks to an alternate version of the document (i.e. print page, translated or mirror)
authorLinks to the author of the document
bookmarkPermanent URL used for bookmarking
helpLinks to a help document
licenseLinks to copyright information for the document
nextThe next document in a selection
nofollowLinks to an unendorsed document, like a paid link.("nofollow" is used by Google, to specify that the Google search spider should not follow that link)
noreferrerSpecifies that the browser should not send a HTTP referer header if the user follows the hyperlink
prefetchSpecifies that the target document should be cached
prevThe previous document in a selection
searchLinks to a search tool for the document
tagA tag (keyword) for the current document
rev text Not supported in HTML5. Specifies the relationship between the linked document and the current document
shape default
rect
circle
poly
Not supported in HTML5. Specifies the shape of a link
type MIME_type The MIME type of the linked document. Look at IANA MIME types for a complete list of standard MIME types
Reference: w3schools.com w3.org

Friday, May 31, 2013

How to file online Indian Income Tax




  1. Log on to https://incometaxindiaefiling.gov.in/
  2. If you don't have credentials then create a profile using your PAN as user id.
  3. Select your applicable IT Return Form right side of the homepage
    1. ITR 1, for Individuals having Income from Salary / Pension / Income from One House Property / Bank interest
    2. ITR 2, other individuals, who are not having Income from Business or Profession.
    3. Click here for the applicability of form and for other forms: https://incometaxindiaefiling.gov.in/portal/individual_huf.do
  4. Fill the IT return excel sheet with
    1. Your personal information, ensure you mention your email id correctly.
    2. Salary & TDS information stated in the Salary Certificate and Form 16.
    3. Fill in the details of house property, bank interest and deductions if not claimed in form 16.
    4. Bank details are mandatory, ensure that you enter MICR code correctly.
    5. Follow the tips and in-built validations to ensure that the information filled is complete and accurate. You can save the form at any stage and complete the form as per your convenience.
  5. Determine your income & pay tax if necessary.
    1. The tax can be paid online, please click on link https://onlineservices.tin.nsdl.com/etaxnew/tdsnontds.jsp.
    2. FAQ - https://www.tin-nsdl.com/oltas/oltas-faq-payment.php
  6. Verify your details and then generate .XML File
    1. The Excel Utility creates .xml file based on the details filled. Save this in your system
  7. Logon to https://incometaxindiaefiling.gov.in/e-Filing/UserLogin/LoginHome.html using your user id and password or create a profile using your PAN as user id
  8. Select Assessment Year under submit returns section
  9. Browse and select .xml file saved in your system
  10. Please note latest version will be considered, so you can resubmit the xml if the information needs to be changed and ensure original form acknowledgement mentioned in revision xml
  11. After successful upload, an electronic receipt of the IT return will be generated.
    1. In case you have signed your return with digital signature, the receipt of e-return may be kept for your records and this receipt need not be submitted to the IT Department.
    2. In case you have filed without digital signature, the electronic receipt is generated i.e. ITR-V form. Please note that the ITR-V form can be generated only by the IT Department once you submit the ITR form.
  12. Print the ITR-V, Sign and Post to Income Tax Department – CPC, Post Bag No - 1, Electronic City Post Office, Bengaluru - 560100, Karnataka. (Do not drop your ITR-V in proof submission drop boxes) The due date for submission of ITR-V is 120 days from the date of upload of e-return.
  13. As an acceptance of your ITR-V, Income Tax Department sends an e-acknowledgement from mail id –donotreply@incometaxindia.gov.in


Other points
- For queries, please contact the Income Tax Departments Helpdesk No.
For Income Tax related queries 1800 180 1961
For Rectification and refund 1800 425 2229
For e-Filling of Returns 1800 4250 0025
Working Hours 09:00 to 20:00 Mon-Sat- 

Sunday, April 22, 2012

DHTML blogger comments

This post will describe about some techniques to comment a blogger site with DHTML content. especially dedicated to Ifinder

DHTML is nothing but Dynamic HTML and which is the combination of HTML, Javascript, CSS, HTML DOM. As we discussed in HTML comments for Blogger site post, using NCcode we can post HTML contents which gives you customized style of comments. Since external javascript are not secure, though NCcode recognize javascript, it will not accept external javascript. But javascript can be used without functions and variables.

below are the few examples for including javascripts in blogger comments(for non-techies please replace the highlighted parts with your images.)

Effect: on click, image toggle


NCcode:
〈img onclick="if (this.src=='http://www.w3schools.com/dhtml/bulboff.gif'){this.src='http://www.w3schools.com/dhtml/bulbon.gif';}else{this.src='http://www.w3schools.com/dhtml/bulboff.gif';}" border="0" src="http://www.w3schools.com/dhtml/bulboff.gif" width="100" height="180" /〉


Effect: Anchor tag on particular pixel(Map effect)
Venus

NCcode:
〈img src="http://www.w3schools.com/jsref/planets.gif" width="145" height="126" usemap="#planetmap" /〉〈map name="planetmap"〉 〈area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="http://www.w3schools.com/images/venglobe.gif" /〉 〈/map〉


Effect: Hide/unhide the comments




you can hide me.
NCcode:
〈input type="button" value="Hide text" onclick="document.getElementById('pic').style.visibility='hidden'" /〉〈input type="button" value="Show text" onclick="document.getElementById('pic').style.visibility='visible'" /〉
〈p id="p1"〉you can hide me.〈/p〉


Effect:mouse over enlarge the image


NCcode:
〈img id="image" src="http://www.w3schools.com/dhtml/bulbon.gif" onmouseover="this.width='200';this.height='360';" onmouseout="this.width='100';this.height='180';" width="100" height="180" /〉


If you notice you would have found one thing that is javscript can be included in events like onMouseout, onMouseover, Onclick... you can develop complex javascripts with in events and you can make the effect in blogger comments. If you use image toggling effect, then it would reduce your page loading time comparing to large images


Suggestion for Blog owner:
If you are good in javascript, then allow the javascripted comments while moderating your blog comments. If not Please don't allow any javascripted comments it may have span links.



Reference:W3shools

Friday, March 23, 2012

ASCII comments for social sites

Have you ever wondered about ASCII arts? It would be the pictorial representation by simple text characters.
  |\_/|      
 / @ @ \     
( > ยบ < )    
 `»»x««´     
 /  O  \       
There are many types of ASCII Art like text art, image art, 3D image art etc., Now here Macrolayer introduce one more new tool to generate text ASCII art with personalized symbols. From which you can create text messages in the ASCII symbols. It can be a greeting phrases, welcome notes, or any personal talk. You can choose the ASCII symbol which you need to spread across the art; you can resize the art with different size; you can paint ASII text color or its background color.

Thursday, March 1, 2012

Random gadgets for Bloggers


It is an interesting thing to show random messages or pictures or ads in the Website. you may love to show different messages on the same page when user visit same page again. That may be your picture, which have different pose on every refresh. Even that can be a blogger gadgets, on every refresh on the same page you can make to get random gadgets. This type of Randoming will make different look on your pages. Let see how to make random elements

Thursday, February 2, 2012

How to avoid country specific Blogspot URL

Recently Blogger has announced country code Top Level Domain (ccTLD) for few countries like India, Australia,.. As per Blogger note, it will be launched for more countries in near futures. Technically, which means a visitors from these countries will be redirected to their ccTLD eg) an Indian visitor view my blog as macrolayer.blogspot.in & australian visitor view my blog as macrolayer.blogspot.com.au.