Friday, September 4, 2020

Hellow

 Test:helloq



Launch MaheshLink: 


https://www.staples.com/grs/rewards/subprogram/toast

 Test:helloq



Launch MaheshLink: 


https://www.qanp.staples.com/grs/rewards/subprogram/toast

Tuesday, March 17, 2015

CSS for Chrome TAB

Hi All,

Chrome TAB CSS

.chromeTAB {
    width: 100px;
    height: px;
    border-left: 14px solid transparent;
    border-right:    14px solid transparent;
    border-top: 19px solid green;
    border-radius: 10px 10px 80px 80px;
    color: red;
    text-align: center;
  }

<div class='chromeTab'>pDescription</div>

Conditional Ternary Operator:


Conditional Ternary Operator:



I saw couple of people suggested in the Stack overflow forum for hiding the HTML elements using below code.

if countryName == "INDIA" {
document.getElementById("test").style.display = ""
}
else{
document.getElementById("test").style.display = ''none.
}

I would like to suggest for hiding HTML Elements using Conditional Ternary operator.  Just try the below line for showing or hiding the HTML Elements

test ? expression1 : expression2


Example:
document.getElementById("test").style.display = (CountryName=="INDIA" ? "" : 'none')


Friday, August 8, 2014

Lesson 4 : Angular JS - Browser Compatibility

Hi All,

* As per my view(not sure if it have problem with other browsers), Angular is working fine with all browers except Internet Explorer.

* I made it that Angular is working fine from IE 8+, but i faced that Angualr JS is not working  from IE6, and IE7.

To make Angular JS works at IE6, and IE7, I refered some websites, and i came to know that couple of changes required in the HTML5 tags lke,

    Other browsers:  The syntax is
<body ng-app="MaheshApp">
<div ng-view></div>
<div ng-click></div>

While writing the code for IE 6 and 7 + otherbrowsers:  The syntax should be
        <body id="ng-app" ng-app="MaheshApp">
<div class="ng-view"></div>
<div href="#" ng-click=""></div>


Still i am doing R&D for other directives, but not yet i succeded, if i found any will update the details here

I came to know that Angular.JS 1.3 has some problem with IE8..Will let you know what is it

Friday, August 1, 2014

Lesson 2 : Features of Angular JS

* Before going to the develop the code, please try to understand like Model, View ,    
  Controller, Directives, scope, Services. People who are aware about Knockout,    
  Backbone, and node.js, it is very easy to learn and develop the code.

Key points: 
Model : It is a Javascript Object

View : It is the HTML, and suited for UI design. It is based on DOM Objects

Controller : Its responsible to construct MODEL (Javascript object), and Connect it to view (HTML, UI Design)

Directives : It indicates a postion for DOM elements (like, attributes , CSS, name of the element) that tell AngularJS's HTML compiler ($compile) to attach a specified behavior to that DOM element. 

Let me explain in detail, Directives can be attributes, tags or even class names. here <div mahesh></div>. I have added new attribute called Mahesh, This is called directive,we can change the behaviour of particular div adding/changing the custom attribute .

Scope : The job of the Scope is to detect changes to model objects.

Lesson 3 : Basic Example - Angular JS

Refer the below HTML, there is a keyword ng-app.

What is ng-app?
  * ng-app is a directive that informs to Angular that <HTML> or<div> tag is the root(or owner) of this    
     entire document.
  * if you want to enable Angular only at specific location in your webpage then you can define ng-app
     attribute to any DIV or other tag.
      **example <div ng-app"=""></div>, here Angular will applicable for only particula div tag not for entire
     document.

Why is ng?
 * ng stands Angular.
 * Whenever if you seen any attribites starts with ng, that means they have used Angular.

Syntax
<body ng-app = "bodyApp"></body>
<html ng-app = "htmlApp"></html>
<div ng-app = "divApp"></div>

you can include ng-app with any tags,if you are not include angular will not work.
Angular will start automatically once page loads, but sometimes we have to load the particilar div using angular by manually, there we have to use JS like
angular.bootstrap();

Note : Whenever page loads, angular Js loads automatically.

HTML Strucure

<html ng-app="">
<body>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>

</body>
</html>

Friday, July 25, 2014

Lesson 1: Basic: What and Why Angular Js?

Hi All, I would like to share my learnings about Angular JS. Today i am explaining about What is Angular JS?and why Angular JS?

What is Angular JS?
*A client-side JavaScript Framework for adding interactivity to HTML
* It is a open-source web application, maintained by Google and community.
* It is a SuperHeroic MVW framework (MVW Stands for MODEL VIEW Whatever).
* It assists to create a Single page web applications using HTML, CSS, and Javascript (client or Browser side).

* It goal is to augment web applications with model–view–controller (MVC) capability.

Wednesday, June 26, 2013

Option for prevent forwarding , and copying the email content from Lotus notes emails.

Hi All,

This is to inform you that, we have an option to prevent forwarding , and copying the email content from Lotus notes emails.

I used this scenario while developing customized mail-in applications. We have memo form, and we have to disable these forward and copy options. In form properties, there is an tab called "Security", that contains option called "Disable printing/forwarding/copying in to clipboard" that option we have to enable.

This option will prevent forwarding,and copying the content from emails.


Thursday, June 13, 2013

XML Error In Lotus notes : XML Page cannot be displayed

Hi All,

Issue :

Recently, we have faced an XML error called "Whitespace is not allowed at this location. Error processing resource "Notes link"

<Title> India & US </Title>

Analysis:

I have found that, Title name contains "&" character in the above xml format, that is the reason the XML is not working and throwing this error.

Solution:

1. We have to handle the "&",character, the title name is coming from Notes field. So we have handle the character using below code 2 lines of code
x
1. titlename= Evaluate("@ReplaceSubstring(Titlename; ""&""; ""&amp;"")", doc)
2.  Print |<Title>| & titlename(0) & |</Title>|

8.5.3 Notes client crashes while replying to a particular email

Hi All,

Issue:
Recently, we have faced an issue , whenever user trying to reply to a particular email, Notes client crashed.

Analysis:

User is using Notes client 8.5.3 FP2. He tried to reply to an email sent by Mail-in database. But Notes client crashed.

Solution:

We have tried to sent a couple of email from Mail-in database to Inbox who having Notes client version 8.5.2 FP2 and 8.5.3 FP3 and confirmed that we are able to reply it without any Notes crash.

We have noticed , IBM has provide the link about this issue and they mentioned the below solution

  1. Upgrade/Downgrade the Notes client version from 8.5.3 FP2
  2. Delete the message from the body part from original email and type the details and reply it

Friday, May 17, 2013

How to use AJAX using Angular JS in Lotus notes

Hi All,

I have implemented the AJAX using Angular Js in Lotus notes. Here to go,

Scenario and Solution: 
   
    * I want to connect the backend view, and get the data in to JSON structure, Here i have used Angular JS, it is very simple.

 * Refer the below function, this was the strucuture of the code for calling AJAX in Angular Js, and
     i am passing the URL,
      and get the JSON,
      and customized the JSON ,
       and sending to Angular Scope variable,
      Using Scope variable i am easily fetching the details from front-end :)


function LoadJSONVal($scope,$http, $templateCache, $filter)
{
$scope.method = "GET"
$scope.url = "vwAppdetails?ReadViewEntries&outputformat=JSON&count=10000"
$http({method: $scope.method, url: $scope.url, cache: $templateCache}).
    success(function(data, status) {
                      $scope.status = status;
                      var AllVal = new Array();
   
                     for(var i=0; i<data.viewentry.length; i++)
                      {
                     AllVal[i] = {"AppName" : data.viewentry[i].entrydata[0].text[0], 
                                                    "Server" : data.viewentry[i].entrydata[1].text[0]
                                                    ,"Filepath" :data.viewentry[i].entrydata[2].text[0],
                                                      "Sponsor" : data.viewentry[i].entrydata[3].text[0],
                                                      "Suppteam" : data.viewentry[i].entrydata[4].text[0],
                       "UNID" : data.viewentry[i].entrydata[5].text[0],
                                                       "WebURL" : data.viewentry[i].entrydata[6].text[0]}           
     
        $scope.Value1.AppName=AllVal;

}

Wednesday, May 15, 2013

How to bind the HTML using Angular JS?

Hi All,

I have implemented couple of things in Angular Js in Lotus notes. I would like to share the same with you all.

Scenario : 
       How to open the the multiple document(using UNID) in to frontend using Angular JS

Code :
       *  This is my HTML, in this there is a directives called "ng-click", this will call the function "Iframe Model" and passing the UNID,and status of the document like EDITDOC or OPENDOc or OPENFORM

     <a  data-toggle="modal" ng-click='IframeModel(Value1.UNID,"EDITDOCUMENT")'><Computed Value></a>

      *  That function i have written in angular JS, Here,based on the parameter it is choosing the IFRAM, and  store the same in to the $Scope.

     scope.IframeModel = function(srcURL,status){
if (status=="EDITDOCUMENT")
{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="0/'+ srcURL +"?"+status+'"></iframe>';
}
else if(status=="OPENFORM"){
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="350" src="'+ srcURL +"?"+status+'"></iframe>';
}
else{
$scope.renderIframe = '<iframe id="Iframe1" width="600" height="300" src="'+ srcURL +"?"+status+'"></iframe>';
}

}

    This is the another directives which helps to bind the HTML from JS, In the above function we are storing in to the scope variable and binding the same in to the another directives called "ng-bind-html-unsafe". This bind directives open the URL at fontend
     <div ng-bind-html-unsafe="renderIframe"></div>

Monday, May 6, 2013

Notes Documents are disappearing from Lotus notes view

Hi All,

Issue : There was an issue, documents are missing in the view, but readers field was fine, so we are not sure why documents are disappearing from the view

Solution : Later on , i realized if document type is response, those response document view based on the main documents, suppose main documents has deleted the response document will not show, so i just turn off the  "Show response documents in a hierarchy" in view properties ,and i am able to easily find the missed out documents from that flat view

Wednesday, May 1, 2013

Do you know how to get the JSON and XML from Lotus notes view?

Here you go,

We have a way to get the JSON and XML format from Lotus notes view?

"https://servername/Db filepath/viewname?readviewentries&OutputFormat=JSON"
"https://servername/Db filepath/viewname?readviewentries&OutputFormat=XML"

After converting the JSON format , how to get the Key-Pair values from JSON?

Javascript : 

you have to use AJAX, and try the below code, you will get the details from the notes view


for(var i=0; i<data.viewentry.length; i++)
      {
     
           data.viewentry[i].entrydata[0].text[0]          
     


Web Tool for searching keywords in all the Lotus notes database

Hi All,

This is my another tool. The purpose of this tool is searching the keywords from multiple lotus notes databases.This tool is based on web application. I have used JQuery, Lotusscript, AJAX, JSON.

1. In this tool, we have to manually create a document with details like databasename,Server, filepath, 8 fields name.

2. We have to select the database name which is present in the drop-down  and using JSON, we will get the corresponding details like, server, and filepath etc,

3. We have to enter the search keyword in to the field, and while clicking the search button, system fetch the parameters like server , filepath , 8 field name etc and pass those parameters in to backend agent, then the agent will start to search it in the corresponding database, and retrieve the result in JSON format

4. Using AJAX. i fetch those JSON format result and show in to the front-end.

5. We have an option called "Export in to excel", it will help to export the search results

-END-

Implemented Schedule Agent Monitoring Tool in Lotus notes application

Hi All,

After detailed analysis, i have created a tool called "Schedule agent monitoring tool in Lotus notes". I will explain to everyone, how this tool is working.

1. In this tool, First, we have to manually create a server and database details, while save the document, there is an API (refer code :http://maheshwaranthiru.blogspot.com/2013/04/lotus-notes-c-apis-for-fetching-agent.html) that will run, and start to fetch all the scheduled agent details in to this tool, and create a new doucment with Last ran of agent.

2. Progress bar will help us to confirm whether APIs is still fetching the agent details or not. (Note : Dont Press CTRL+Break when API is running- otherwise lotus notes client crash.). This is the only problem in this tool. I am planning to overcome this issues in version 2.

3. There is an scheduled agent present in this tool, it will process all the documents, and checking last ran details and compared with corresponding minutes. If the comparison is more than 0, it will not send an email to the team otherwise it will send an email to team with the agent details, Team will taken the relevant steps.

- END-

Monday, April 29, 2013

Lotus Notes C API's for fetching Agent properties

Hi All,

I have created a tool for monitoring the scheduled agents. I have found an API's which help us to fetch the agent properties. This is not my own code, i found this API's in IBM website. Please refer the below code.
Note : 
1. While running, you have to check target and source database should have full acess, otherwise your server or lotus notes client will crash.
2. Dont Schedule it, try to run this API manually.

Call this API as with paramenter - GetAssistInfo db, a$, info


Sub GetAssistInfo(db As NotesDatabase, agent As String, info As AssistInfo)
np$ = Space(1024)
OSPathNetConstruct 0, db.Server, db.FilePath, np$

Dim hDB As Long
NSFDbOpen np$, hDB
If hDB = 0 Then
Messagebox "Can't open database", 16
Exit Sub
End If

pt& = Instr(agent, "|")
If pt& = 0 Then ti$ = Trim$(agent) Else ti$ = Trim$(Left$(agent, pt& - 1))

Dim nID As Long
NIFFindDesignNote hDB, ti$, NOTE_CLASS_FILTER, nID
If nID = 0 Then
Messagebox "Can't find agent " & ti$, 16
Exit Sub
End If

If Instr(db.GetDocumentByID(Hex$(nID)).~$Flags(0), "f") = 0 Then
Messagebox ti$ & " is not an agent", 16
Exit Sub
End If

Dim hNT As Long
NSFNoteOpen hDB, nID, 0, hNT

Dim iB As BlockID, vB As BlockID
NSFItemInfo hNT&, "$AssistInfo", 11, iB, dt%, vB, nv&
If Not vB.hPool = 0 Then
p& = OSLockObject(vB.hPool) + vB.Block
Peek info.Version, p& + 2, 2
Peek info.TriggerType, p& + 4, 2
Peek info.SearchType, p& + 6, 2
Peek info.IntervalType, p& + 8, 2
Peek info.Interval, p& + 10, 2
Peek v&, p& + 12, 4
If v& <= 31 Then info.Time1 = v& Else info.Time1 = Cdat(v&/100/60/60/24)
Peek v&, p& + 16, 4
If v& <= 31 Then info.Time2 = v& Else info.Time2 = Cdat(v&/100/60/60/24)
t$ = Space(81)
ConvertTIMEDATEToText 0, 0, p& + 20, t$, 80, nt%
If Not nt% = 0 Then info.StartTime = Cdat(Left$(t$, nt%))
t$ = Space(81)
ConvertTIMEDATEToText 0, 0, p& + 28, t$, 80, nt%
If Not nt% = 0 Then info.EndTime = Cdat(Left$(t$, nt%))
Peek info.Flags, p& + 36, 4
OSUnlockObject vB.hPool
End If

NSFNoteClose hNT
NSFDbClose hDB
End Sub



Exporting PDF from Lotus notes documents

Hi All,

I have developed a tool called PDF generation , it will generate the PDF from notes documents which contains sub documents present in a notes embedded view.

I have used "Domino Java and  ITEXT library for generating the PDF from lotus notes documents, if any wants to generate the PDF, let me know, i can help you.

Download the ITEXT Jar file from http://itextpdf.com/, and enjoy to learn and implement Domino Java.


Cache.NDK in Lotus notes

HI All,

Issue  : User has recently changed his access from Author to Manager, but whenever user trying to open the database, still he have author access and he is not able to see the some buttons , somehow he was not getting Manager access,

Investigation : I have checked the replication in Domino Directory, and Database ,and confirmed that everything is fine.
         
Solution : I have deleted the Cache  file from the users lotus notes machine,and try to reopen the lotus notes file and open the database , and confirmed that now user has manager access on that database.

Friday, April 26, 2013

Learning : For editing the document, we have a way to use encryption key in Lotus notes

Issue :  A person is not able to edit document, but he/she is able to see the document, and open the document. While clilcking the edit button on the document, it is not in edit mode.

Investigation : I checked the user access, she/he has editor access, and there is no reader and author fields in that document. I am quite surprising how this scenario is working. Later i have noticed that there is an field called "SecretEncryptionKeys", and started to learn about that.

Solution : Finally ,I have reached to person who are keep editing those documents, and requested that user to send the secret key via email to another person, and attach the secret key in her lotus notes, then she is able to edit the document