What is Optimizely CMS?

Optimizely is a website optimization platform that provides A/B testing, personalization, and experimentation capabilities to help businesses make data-driven decisions and improve the user experience on their websites. The "CMS" in "Optimizely CMS" likely refers to its integration with Content Management Systems, such as WordPress, to allow for more seamless optimization of a website's content.

Optimizely was founded in 2010 by Dan Siroker and Pete Koomen. It started as a platform for A/B testing and quickly expanded to offer website personalization and experimentation capabilities. Over the years, Optimizely has grown to become one of the leading website optimization platforms, serving a large number of customers across various industries. In recent years, Optimizely has continued to innovate its platform and expand its capabilities to meet the evolving needs of businesses and digital marketers.

 

Monday 6 February 2023
Posted by Jebastin
Tag :

The basic Dot Net Interview Questions and Answers 

These are the most frequently asked Dot Net Interview Questions and Answers that will help you to prepare for your interview.


1)What is .NET?

.NET is a free, open-source, cross-platform framework for building a wide variety of applications using different programming languages. It was developed by Microsoft, and provides a common set of libraries and tools that can be used to create and run applications on different platforms, including Windows, macOS, and Linux. It includes a runtime environment called the Common Language Runtime (CLR), which manages the execution of code, and a large library of pre-written code called the Framework Class Library (FCL), which can be used to perform common tasks such as data access, encryption, and networking.

2) What is .Net framework?

The .NET framework is a software development framework developed by Microsoft. It includes a large library of pre-written code and a runtime environment that allows developers to create Windows and web applications, as well as other types of software, in various programming languages such as C# and Visual Basic. The framework provides a common set of tools and libraries that can be used to create and run applications on different platforms, including Windows, macOS, and Linux. The latest version of the .NET framework is .NET 7.

3) What languages does the .NET Framework support?

.NET supports various programming languages such as C#, F#, and Visual Basic. It also has been evolving to be more cloud native, open, and cross-platform. The latest version of .NET is .NET 7.

4) What are the most important aspects of .NET?

.NET is a software framework developed by Microsoft that allows for the creation of applications for Windows, the web, and mobile devices. Some of the most important aspects of .NET include:
  1. Common Language Runtime (CLR): This is the virtual machine that manages the execution of .NET applications, providing features such as memory management, security, and exception handling.

  2. Class Library: This is a collection of pre-written code that can be used by developers to perform common tasks, such as reading and writing files, connecting to databases, and creating user interfaces.

  3. C# and Visual Basic: These are the two main programming languages supported by .NET, both of which are designed to be easy to learn and use.

  4. Platform independence: With .NET 5 and later, it allows developers to build applications that can run on multiple platforms like Windows, Linux, and macOS.

  5. Interoperability: .NET allows for seamless interaction between different programming languages and libraries, enabling developers to use the best tools for the job.

  6. Security: .NET provides built-in security features such as code access security and role-based security, which help to protect against common security threats.

  7. Scalability: .NET is designed to scale to meet the demands of large, complex applications, and it can be easily integrated with other technologies such as Azure for cloud computing.

 

5) Explain Object Oriented Programming and its relation to the .NET Framework?

Object-oriented programming (OOP) is a programming paradigm that is based on the concept of "objects", which are instances of classes that encapsulate data and behavior.

The key principles of OOP include:

  1. Encapsulation: This refers to the practice of keeping an object's internal state and behavior hidden from the outside world, and only exposing a public interface for interacting with the object.

  2. Inheritance: This refers to the ability for a class to inherit properties and methods from a parent class, allowing for code reuse and abstraction.

  3. Polymorphism: This refers to the ability for different objects to respond to the same method or property in a way that is appropriate for their specific type.

The .NET Framework is built on these principles of OOP, and it provides a rich set of classes and libraries that can be used to create object-oriented applications. C# and Visual Basic are the two main programming languages supported by the .NET Framework, both of which are designed to be easy to learn and use, with OOP concepts and syntax.

Many of the classes in the .NET Framework are designed to be inherited from, and they use polymorphism to allow for a high degree of flexibility and extensibility. The framework also provides a number of built-in features that support OOP, such as garbage collection, which automatically manages the memory used by objects, and reflection, which allows for runtime inspection of objects and their properties.

In summary, OOP is a programming paradigm that is based on the concept of objects and the .NET Framework is a software framework which is built on this paradigm and provides a rich set of classes and libraries that can be used to create object-oriented applications.

 

Thursday 19 January 2023
Posted by Jebastin
Tag :

SOLVED: Trusted Platform Module Has Malfunctioned - Error Code 80090016

Problem Summary: 
Your computer's Trusted Platform Module has malfunctioned. If this error persists, contact your system administrator with the error code 80090016.
Solutions: 

For Teams: 

Generally Trusted Platform Module (TPM) technology is designed to provide hardware-based, security-related functions. So if any issue occurs with system hardware, security, firewall, and Installed Apps, it should be possible that this type of error message occurs. 
Uninstall the Trusted Platform Module in Device Manager or ON/OFF it and Restart the computer. 
You can also try to create a new Windows profile to check if it helps to resolve this type of issue. 

For Outlook: 

Solution 1: 
Shut down Outlook and set the following registry key. HKCU\SOFTWARE\Microsoft\Office\16.0\Common\Identity\ 
REG_DWORD 
EnableADAL 
0

Solution 2: 
Try Clearing the Trusted Platform Module (TPM) resets the TPM to an unowned state. Note: Clearing the TPM can result in the loss of data. To avoid data loss, make sure you have a backup or recovery method for any data protected or encrypted by the TPM.
Tuesday 2 March 2021
Posted by Jebastin
Tag :

How to generate pkcs12 certificate on windows?

Open a command prompt and go to the bin directory under the installation directory.

To create the private certificate type: “openssl genrsa –out private-key.pem 1024” and press [Enter].

For the public certificate type: “openssl req –new –key private-key.pem –x509 –days 365 –out public-cert.pem”
Now it will ask you to enter some information, you can just skip them by pressing [Enter].

Now we need to create the p12 file. Type the following in the prompt: “openssl pkcs12 –export –in public-cert.pem –inkey private-key.pem –out my_pkcs12.p12” followed by [Enter].


Reference: http://docs.ucommerce.net/ucommerce/v6/payment-providers/setup-paypal-standard-website-payments-as-a-payment-method.html
Thursday 13 November 2014
Posted by Jebastin

Razor Code and Configuration for Umbraco Examine Search

Examine allows you to index and search data easily and wraps the Lucene.Net indexing/searching engine. Lucene is super fast and allows for very fast searching even on very large amounts of data. Examine is provider based so is very extensible and allows you to configure as many indexes as you like and each may be configured individually. Out of the box our UmbracoExamine library that is shipped with Umbraco gives you Umbraco based implementations for indexers and searchers to get started quickly.

Configuration:
 
Step 1: Open the ‘ExamineSettings.config’ file from the ‘config’ folder.
 
Step 2: Create a new Index Provider in the ExamineIndexProviders section:

<add name="MyIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"/>

Step 3: Create a new Search Provider in the ExamineSearchProviders section:

<add name="MySearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"/>

Step 4: Open the ‘ExamineIndex.config’ file from the ‘config’ folder.
Create a new Index Set in the ExamineLuceneIndexSets section:

<IndexSet SetName="MyIndexSet" IndexPath="~/App_Data/TEMP/MyIndex" />

Code:
 
@using Examine;
@{
  var searchTerm = Request.QueryString["search"];
}
<ul class="search-results">
  @foreach (var result in ExamineManager.Instance.Search(searchTerm, true))
  {       
    <li>
        <span>@result.Score</span>
        <a href="@umbraco.library.NiceUrl(result.Id)">
            @result.Fields["nodeName"]
        </a>       
    </li>   
  }
</ul>
Posted by Jebastin

Send Email in Umbraco

Instead using the ASP.Net email sending code, we can use the following code to send email in Umbraco web applications.

Web.Config Configuration:

Gmail SMTP Settings:

<system.net>
    <mailSettings>
      <smtp>
        <network
         host="smtp.gmail.com"
         port="587"
         userName="email@gmail.com"
         password="password"
         defaultCredentials="false"
         enableSsl="true" />
      </smtp>
   </mailSettings>
</system.net>

Yahoo Mail SMTP Settings:

<system.net>
    <mailSettings>
      <smtp>
        <network
         host="smtp.mail.yahoo.com"
         port="465"
         userName="email@yahoo.com"
         password="password"
         defaultCredentials="false"
         enableSsl="true" />
     </smtp>
   </mailSettings>
</system.net>

Razor:

if (IsPost) {
        library.SendMail("from@email.com", "to@email.com", "Subject", "Body", false);
    }
Thursday 25 September 2014
Posted by Jebastin

Solved: Handler “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” in its module list

It turns out that this is because ASP.Net was not completely installed with IIS even though I checked that box in the "Add Feature" dialog. To fix this, I simply ran the following command at the command prompt

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

If I had been on a 32 bit system, it would have looked like the following:

%windir%\Microsoft.NET\Framework\v4.0.21006\aspnet_regiis.exe -i
Reference: StackOverflow
Wednesday 10 September 2014
Posted by Jebastin
Tag : ,

How to set/change the SQL Server 2008 R2 sa’s password after installation?

In this article we will take a look at how to change SA Password in SQL Server using TSQL code and by using SQL Server Management Studio. The steps mentioned in this article are applicable to change any SQL Server Login Password works on SQL Server 2005 and higher versions.

T-SQL Statement:

Use Master
Go

ALTER LOGIN [sa] WITH PASSWORD=N'JJSqlServer', CHECK_POLICY = OFF
Go



Monday 8 September 2014
Posted by Jebastin

Generic Handler to Unpublish Past Events in Umbraco

The following Generic Handler (C#) is used to unpublish the past/old Events automatically after it's expiration date in Umbraco.

Source Code:

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Configuration;
  6. using umbraco.MacroEngines;
  7. using umbraco.cms.businesslogic.web;
  8. namespace KPMGAudit.Web.GenericHandlers
  9. {
  10.     /// <summary>
  11.     /// Summary description for UnpublishExpiredEvents
  12.     /// </summary>
  13.     public class UnpublishExpiredEvents : IHttpHandler
  14.     {
  15.         public void ProcessRequest(HttpContext context)
  16.         {
  17.             int EventsNodeId = Convert.ToInt32(ConfigurationManager.AppSettings["EventsNodeId"]);
  18.             string strEventStartDate = string.Empty, strEventEndDate = string.Empty;
  19.             context.Response.ContentType = "text/plain";
  20.             dynamic EventsNode = new DynamicNode().NodeById(EventsNodeId);
  21.             List<DynamicNode> eList = EventsNode.Children.Items;
  22.             foreach (var Event in eList)
  23.             {
  24.                 int CurrentEventNodeId = Convert.ToInt32(Event.Id);
  25.                 try
  26.                 {
  27.                     DateTime EventStartDate = Convert.ToDateTime(Event.GetProperty("eventStartDate").Value);
  28.                     strEventStartDate = EventStartDate.ToString("MM/dd/yyyy");
  29.                 }
  30.                 catch { strEventStartDate = string.Empty; }
  31.                 try
  32.                 {
  33.                     DateTime EventEndDate = Convert.ToDateTime(Event.GetProperty("eventEndDate").Value);
  34.                     strEventEndDate = EventEndDate.ToString("MM/dd/yyyy");
  35.                 }
  36.                 catch { strEventEndDate = string.Empty; }
  37.                 Document CurrentEventNode = new Document(CurrentEventNodeId);
  38.                 if (!string.IsNullOrEmpty(strEventEndDate))
  39.                 {
  40.                     if (Convert.ToDateTime(strEventEndDate) < DateTime.Now)
  41.                     {
  42.                         CurrentEventNode.UnPublish();
  43.                     }
  44.                 }
  45.                 else
  46.                 {
  47.                     if (Convert.ToDateTime(strEventStartDate) < DateTime.Now)
  48.                     {
  49.                         CurrentEventNode.UnPublish();
  50.                     }
  51.                 }
  52.             }
  53.         }
  54.         public bool IsReusable
  55.         {
  56.             get
  57.             {
  58.                 return false;
  59.             }
  60.         }
  61.     }
  62. }
Or
  1. public void UnpublishNode(Document CurrentContentNode, DateTime ContentExpiryDate)
  2.         {
  3.             if (ContentExpiryDate != DateTime.MinValue)
  4.             {
  5.                 if (Convert.ToDateTime(ContentExpiryDate) < DateTime.Now)
  6.                 {
  7.                     CurrentContentNode.UnPublish();
  8.                 }
  9.             }
  10.         }

Configuration: (umbracoSettings.config)

  1.   <scheduledTasks>
  2.     <!-- add tasks that should be called with an interval (seconds) -->
  3.     <!--    <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
  4.     <task log="false" alias="ExpiredEventsUnpublishScheduler" interval="60" url="http://local.kpmg.com/GenericHandlers/UnpublishExpiredEvents.ashx"/>
  5.   </scheduledTasks>
Thursday 7 August 2014
Posted by Jebastin

How to Use CDATA in XML?

All text in an XML document will be parsed by the parser. But text inside a CDATA section will be ignored by the parser.

XML parsers normally parse all the text in an XML document.
When an XML element is parsed, the text between the XML tags is also parsed:
<message>This text is also parsed</message>
 The parser does this because XML elements can contain other elements, as in this example, where the <name> element contains two other elements (first and last):
<name><first>Bill</first><last>Gates</last></name>
and the parser will break it up into sub-elements like this:
<name>
  <first>Bill</first>
  <last>Gates</last>
</name>
 Parsed Character Data (PCDATA) is a term used about text data that will be parsed by the XML parser.

CDATA - (Unparsed) Character Data

The term CDATA is used about text data that should not be parsed by the XML parser.
Characters like "<" and "&" are illegal in XML elements.
"<" will generate an error because the parser interprets it as the start of a new element.
"&" will generate an error because the parser interprets it as the start of an character entity.
Some text, like JavaScript code, contains a lot of "<" or "&" characters. To avoid errors script code can be defined as CDATA.
Everything inside a CDATA section is ignored by the parser.
A CDATA section starts with "<![CDATA[" and ends with "]]>":

<script>
<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
  {
  return 1;
  }
else
  {
  return 0;
  }
}
]]>
</script>
In the example above, everything inside the CDATA section is ignored by the parser.

Code:
  1.  string CDATAStart = "<![CDATA[", CDATAEnd = "]]>";
  2.  LongDescription = CDATAStart + mcLongDescription.Trim() + CDATAEnd;
Notes on CDATA sections:
A CDATA section cannot contain the string "]]>". Nested CDATA sections are not allowed.
The "]]>" that marks the end of the CDATA section cannot contain spaces or line breaks. 

Reference: W3Schools, StackOverflow
Posted by Jebastin
Tag : ,

C# Code to implement Google Analytics Tracking Script dynamically

In general we track a page using JavaScript statically. This C# code is used to implement Google Analytics Tracking Script dynamically for every page we want to do it.

Source Code:

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Configuration;
  4. using System.Linq;
  5. using System.Web;
  6. namespace KPMGAudit.Web.GoogleAnalytics
  7. {
  8.     public static class Tracking
  9.     {
  10.         public static string TrackingScript(string url)
  11.         {
  12.             var jsTestString = string.Format(@"
  13.                     <script type=""text/javascript"">
  14.                         var _gaq = _gaq || [];
  15.                         _gaq.push(['_setAccount', '{0}']);
  16.                         _gaq.push(['_trackPageview','{1}']);
  17.                         (function() {{
  18.                         var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  19.                         ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  20.                         var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  21.                         }})();
  22.                     </script>", ConfigurationManager.AppSettings["GoogleAnalyticsAccountCode"], url);
  23.             return jsTestString;
  24.         }
  25.     }
  26. }
  1. // Inject javascript into Long Description
  2. var url = string.Format("/{0}/{1}", mcContentCategory.AsUrl(), mcTitle.AsUrl());
  3. mcLongDescription = mcLongDescription + GoogleAnalytics.Tracking.TrackingScript(url); 

Another way: Click here.
Posted by Jebastin

How to remove the trailing directory slash from the URL?

It's possible to configure Umbraco to remove the final trailing slash on the URL. If you want to do this, locate the 'umbracoSettings.config' file. This can be found in the 'webroot\config\' directory of your site.
Open this file and locate the 'addTrailingSlash' setting in the 'requestHandler' section of the file.
<requestHandler>
<addTrailingSlash>false</addTrailingSlash>
</requestHandler>
Then all you need to do is to change the addTrailingSlash value to 'false'. Don't forget to save your changes.
Wednesday 6 August 2014
Posted by Jebastin

How to remove the .ASPX extension from the URL?

First of all, to configure Umbraco to show URL's without the .aspx extension, you're going to need to locate the 'umbracoUseDirectoryUrls' setting in the ' appSettings' section of the 'web.config' file for your site.
<appSettings>
<add key="umbracoUseDirectoryUrls" value="true" />
</appSettings>
Once you've opened this file, all you need to do is change the 'umbracoUseDirectoryUrls' value to 'true'.
Posted by Jebastin

How to load AddThis dynamically with ajax?

On page load there is no issues with AddThis widget. But when the 'Share' button is binding via ajax, then the AddThis functionality will not work. To fix this solution, use the following script.
<script type="text/javascript">
    function generateAddThisButton(ID,URL,Title,Description) {
        var addthis_ui_config =
        {
            services_compact: 'facebook, myspace, igoogle, netvibes, windows, dashboard, more'
        }
        var host = window.location.host;
        var propertyURL = host + URL;
        var propertyTitle = Title;
        var propertyDescription = Description.replace('<p>','').replace('</p>','');
        var addthis_share_config =
        {
            url: propertyURL,
            title: propertyTitle,
            description: propertyDescription
            //swfurl: "http://www.youtube.com/v/1F7DKyFt5pY&hl=en&fs=1",
            //screenshot: "http://i2.ytimg.com/vi/1F7DKyFt5pY/default.jpg"
        }
        addthis.button("#" + ID, addthis_ui_config, addthis_share_config);
    }
</script>
Thursday 31 July 2014
Posted by Jebastin

How to Add Active Navigation Class Based on URL?

Ideally you output this class from the server side, but if you can't...

Let's say you have navigation like this:

HTML:
  1. <nav>
  2.     <ul>
  3.         <li><a href="/">Home</a></li>
  4.         <li><a href="/about/">About</a></li>
  5.         <li><a href="/clients/">Clients</a></li>
  6.         <li><a href="/contact/">Contact Us</a></li>
  7.     </ul>
  8. </nav>

And you are at the URL:

http://yoursite.com/about/team/

And you want the About link to get a class of "active" so you can visually indicate it's the active navigation.

jQuery:
  1. <script type="text/javascript">
  2.     $(function () {
  3.         var page = location.pathname.split("/")[1];
  4.         if (page != "") {
  5.             $('nav a[href^="/' + page + '"]').parent().addClass('active');
  6.         }
  7.     });
  8. </script>

JavaScript:
  1. <script type="text/javascript">
  2. (function() {
  3.     var nav = document.getElementById('nav'),
  4.         anchor = nav.getElementsByTagName('a'),
  5.         current = window.location.pathname.split('/')[1];
  6.         for (var i = 0; i < anchor.length; i++) {
  7.         if(anchor[i].href == current) {
  8.             anchor[i].className = "active";
  9.         }
  10.     }
  11. })();
  12. </script>

Essentially that will match links in the nav who's href attribute begins with "/about" (or whatever the secondary directory happens to be).

Comparison Operators:
  1. = is equal
  2. != is not equal
  3. ^= starts with
  4. $= ends with
  5. *= contains

Reference: CSS-Tricks
Thursday 24 April 2014
Posted by Jebastin

How to enable paste option in Windows Server 2008 to copy from local machine?

Restart rdpclip.exe in Server machine.
Tuesday 18 March 2014
Posted by Jebastin

jQuery to load first 5 elements & click "load more" to display next 5 elements

jQuery functionality to load first 5 elements & click "load more" to display next 5 elements.

HTML:
  1. <ul id="myList">
  2.     <li>One</li>
  3.     <li>Two</li>
  4.     <li>Three</li>
  5.     <li>Four</li>
  6.     <li>Five</li>
  7.     <li>Six</li>
  8.     <li>Seven</li>
  9.     <li>Eight</li>
  10.     <li>Nine</li>
  11.     <li>Ten</li>
  12.     <li>Eleven</li>
  13.     <li>Twelve</li>
  14.     <li>Thirteen</li>
  15.     <li>Fourteen</li>
  16.     <li>Fifteen</li>
  17.     <li>Sixteen</li>
  18.     <li>Seventeen</li>
  19.     <li>Eighteen</li>
  20.     <li>Nineteen</li>
  21.     <li>Twenty one</li>
  22.     <li>Twenty two</li>
  23.     <li>Twenty three</li>
  24.     <li>Twenty four</li>
  25.     <li>Twenty five</li>
  26. </ul>
  27. <div id="loadMore">Load more</div>
  28. <div id="showLess">Show less</div>

CSS:
  1. #myList li{
  2.     display:none;
  3. }
  4. #loadMore {
  5.     color:green;
  6.     cursor:pointer;
  7. }
  8. #loadMore:hover {
  9.     color:black;
  10. }
  11. #showLess {
  12.     color:red;
  13.     cursor:pointer;
  14. }
  15. #showLess:hover {
  16.     color:black;
  17. }

jQuery:
  1. $(document).ready(function () {
  2.     size_li = $("#myList li").size();
  3.     x=3;
  4.     $('#myList li:lt('+x+')').show();
  5. });
  6. $('#loadMore').click(function () {
  7.         x= (x+5 <= size_li) ? x+5 : size_li;
  8.         $('#myList li:lt('+x+')').show();
  9. });
  10. $('#showLess').click(function () {
  11.     x=(x-5<0) ? 3 : x-5;
  12.     $('#myList li').not(':lt('+x+')').hide();
  13. });
Reference: StackOverflow   jsfiddle
Wednesday 19 February 2014
Posted by Jebastin
Tag :

How to get the class name using jQuery?

Consider the following HTML:
<div id="myId" class="myclass"></div>

jQuery:
var className = $('.myclass').attr('class');
(or)
var className = $('#myId').attr('class');

Reference: StackOverflow.com
Posted by Jebastin
Tag :

Working with jQuery ajax error function

By using the $.ajaxSetup() we can handle the error/exception as mentioned below:
  1. $(function() {
  2.     $.ajaxSetup({
  3.         error: function(jqXHR, exception) {
  4.             if (jqXHR.status === 0) {
  5.                 alert('Not connect.\n Verify Network.');
  6.             } else if (jqXHR.status == 404) {
  7.                 alert('Requested page not found. [404]');
  8.             } else if (jqXHR.status == 500) {
  9.                 alert('Internal Server Error [500].');
  10.             } else if (exception === 'parsererror') {
  11.                 alert('Requested JSON parse failed.');
  12.             } else if (exception === 'timeout') {
  13.                 alert('Time out error.');
  14.             } else if (exception === 'abort') {
  15.                 alert('Ajax request aborted.');
  16.             } else {
  17.                 alert('Uncaught Error.\n' + jqXHR.responseText);
  18.             }
  19.         }
  20.     });
  21. });
Reference: StackOverflow.com
Posted by Jebastin
Tag : ,

List of built-in functions in Javascript

The following are the list of pre-defined/built-in functions in Javascript.

Number Methods

The Number object contains only the default methods that are part of every object's definition.
MethodDescription
constructor()Returns the function that created this object's instance. By default this is the Number object.
toExponential()Forces a number to display in exponential notation, even if the number is in the range in which JavaScript normally uses standard notation.
toFixed()Formats a number with a specific number of digits to the right of the decimal.
toLocaleString()Returns a string value version of the current number in a format that may vary according to a browser's locale settings.
toPrecision()Defines how many total digits (including digits to the left and right of the decimal) to display of a number.
toString()Returns the string representation of the number's value.
valueOf()Returns the number's value.

Boolean Methods

Here is a list of each method and its description.
MethodDescription
toSource()Returns a string containing the source of the Boolean object; you can use this string to create an equivalent object.
toString()Returns a string of either "true" or "false" depending upon the value of the object.
valueOf()Returns the primitive value of the Boolean object.

String Methods

Here is a list of each method and its description.
MethodDescription
charAt()Returns the character at the specified index.
charCodeAt()Returns a number indicating the Unicode value of the character at the given index.
concat()Combines the text of two strings and returns a new string.
indexOf()Returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.
lastIndexOf()Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found.
localeCompare()Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.
length()Returns the length of the string.
match()Used to match a regular expression against a string.
replace()Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.
search()Executes the search for a match between a regular expression and a specified string.
slice()Extracts a section of a string and returns a new string.
split()Splits a String object into an array of strings by separating the string into substrings.
substr()Returns the characters in a string beginning at the specified location through the specified number of characters.
substring()Returns the characters in a string between two indexes into the string.
toLocaleLowerCase()The characters within a string are converted to lower case while respecting the current locale.
toLocaleUpperCase()The characters within a string are converted to upper case while respecting the current locale.
toLowerCase()Returns the calling string value converted to lower case.
toString()Returns a string representing the specified object.
toUpperCase()Returns the calling string value converted to uppercase.
valueOf()Returns the primitive value of the specified object.

String HTML wrappers

Here is a list of each method which returns a copy of the string wrapped inside the appropriate HTML tag.
MethodDescription
anchor()Creates an HTML anchor that is used as a hypertext target.
big()Creates a string to be displayed in a big font as if it were in a <big> tag.
blink()Creates a string to blink as if it were in a <blink> tag.
bold()Creates a string to be displayed as bold as if it were in a <b> tag.
fixed()Causes a string to be displayed in fixed-pitch font as if it were in a <tt> tag
fontcolor()Causes a string to be displayed in the specified color as if it were in a <font color="color"> tag.
fontsize()Causes a string to be displayed in the specified font size as if it were in a <font size="size"> tag.
italics()Causes a string to be italic, as if it were in an <i> tag.
link()Creates an HTML hypertext link that requests another URL.
small()Causes a string to be displayed in a small font, as if it were in a <small> tag.
strike()Causes a string to be displayed as struck-out text, as if it were in a <strike> tag.
sub()Causes a string to be displayed as a subscript, as if it were in a <sub> tag
sup()Causes a string to be displayed as a superscript, as if it were in a <sup> tag

Array Methods

Here is a list of each method and its description.
MethodDescription
concat()Returns a new array comprised of this array joined with other array(s) and/or value(s).
every()Returns true if every element in this array satisfies the provided testing function.
filter()Creates a new array with all of the elements of this array for which the provided filtering function returns true.
forEach()Calls a function for each element in the array.
indexOf()Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found.
join()Joins all elements of an array into a string.
lastIndexOf()Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found.
map()Creates a new array with the results of calling a provided function on every element in this array.
pop()Removes the last element from an array and returns that element.
push()Adds one or more elements to the end of an array and returns the new length of the array.
reduce()Apply a function simultaneously against two values of the array (from left-to-right) as to reduce it to a single value.
reduceRight()Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value.
reverse()Reverses the order of the elements of an array -- the first becomes the last, and the last becomes the first.
shift()Removes the first element from an array and returns that element.
slice()Extracts a section of an array and returns a new array.
some()Returns true if at least one element in this array satisfies the provided testing function.
toSource()Represents the source code of an object
sort()Sorts the elements of an array.
splice()Adds and/or removes elements from an array.
toString()Returns a string representing the array and its elements.
unshift()Adds one or more elements to the front of an array and returns the new length of the array.

Date Methods:

Here is a list of each method and its description.
MethodDescription
Date()Returns today's date and time
getDate()Returns the day of the month for the specified date according to local time.
getDay()Returns the day of the week for the specified date according to local time.
getFullYear()Returns the year of the specified date according to local time.
getHours()Returns the hour in the specified date according to local time.
getMilliseconds()Returns the milliseconds in the specified date according to local time.
getMinutes()Returns the minutes in the specified date according to local time.
getMonth()Returns the month in the specified date according to local time.
getSeconds()Returns the seconds in the specified date according to local time.
getTime()Returns the numeric value of the specified date as the number of milliseconds since January 1, 1970, 00:00:00 UTC.
getTimezoneOffset()Returns the time-zone offset in minutes for the current locale.
getUTCDate()Returns the day (date) of the month in the specified date according to universal time.
getUTCDay()Returns the day of the week in the specified date according to universal time.
getUTCFullYear()Returns the year in the specified date according to universal time.
getUTCHours()Returns the hours in the specified date according to universal time.
getUTCMilliseconds()Returns the milliseconds in the specified date according to universal time.
getUTCMinutes()Returns the minutes in the specified date according to universal time.
getUTCMonth()Returns the month in the specified date according to universal time.
getUTCSeconds()Returns the seconds in the specified date according to universal time.
getYear()Deprecated - Returns the year in the specified date according to local time. Use getFullYear instead.
setDate()Sets the day of the month for a specified date according to local time.
setFullYear()Sets the full year for a specified date according to local time.
setHours()Sets the hours for a specified date according to local time.
setMilliseconds()Sets the milliseconds for a specified date according to local time.
setMinutes()Sets the minutes for a specified date according to local time.
setMonth()Sets the month for a specified date according to local time.
setSeconds()Sets the seconds for a specified date according to local time.
setTime()Sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.
setUTCDate()Sets the day of the month for a specified date according to universal time.
setUTCFullYear()Sets the full year for a specified date according to universal time.
setUTCHours()Sets the hour for a specified date according to universal time.
setUTCMilliseconds()Sets the milliseconds for a specified date according to universal time.
setUTCMinutes()Sets the minutes for a specified date according to universal time.
setUTCMonth()Sets the month for a specified date according to universal time.
setUTCSeconds()Sets the seconds for a specified date according to universal time.
setYear()Deprecated - Sets the year for a specified date according to local time. Use setFullYear instead.
toDateString()Returns the "date" portion of the Date as a human-readable string.
toGMTString()Deprecated - Converts a date to a string, using the Internet GMT conventions. Use toUTCString instead.
toLocaleDateString()Returns the "date" portion of the Date as a string, using the current locale's conventions.
toLocaleFormat()Converts a date to a string, using a format string.
toLocaleString()Converts a date to a string, using the current locale's conventions.
toLocaleTimeString()Returns the "time" portion of the Date as a string, using the current locale's conventions.
toSource()Returns a string representing the source for an equivalent Date object; you can use this value to create a new object.
toString()Returns a string representing the specified Date object.
toTimeString()Returns the "time" portion of the Date as a human-readable string.
toUTCString()Converts a date to a string, using the universal time convention.
valueOf()Returns the primitive value of a Date object.

Date Static Methods:

In addition to the many instance methods listed previously, the Date object also defines two static methods. These methods are invoked through the Date( ) constructor itself:
MethodDescription
Date.parse( )Parses a string representation of a date and time and returns the internal millisecond representation of that date.
Date.UTC( )Returns the millisecond representation of the specified UTC date and time.

Math Methods

Here is a list of each method and its description.
MethodDescription
abs()Returns the absolute value of a number.
acos()Returns the arccosine (in radians) of a number.
asin()Returns the arcsine (in radians) of a number.
atan()Returns the arctangent (in radians) of a number.
atan2()Returns the arctangent of the quotient of its arguments.
ceil()Returns the smallest integer greater than or equal to a number.
cos()Returns the cosine of a number.
exp()Returns EN, where N is the argument, and E is Euler's constant, the base of the natural logarithm.
floor()Returns the largest integer less than or equal to a number.
log()Returns the natural logarithm (base E) of a number.
max()Returns the largest of zero or more numbers.
min()Returns the smallest of zero or more numbers.
pow()Returns base to the exponent power, that is, base exponent.
random()Returns a pseudo-random number between 0 and 1.
round()Returns the value of a number rounded to the nearest integer.
sin()Returns the sine of a number.
sqrt()Returns the square root of a number.
tan()Returns the tangent of a number.
toSource()Returns the string "Math".

RegExp Methods:

Here is a list of each method and its description.
MethodDescription
exec()Executes a search for a match in its string parameter.
test()Tests for a match in its string parameter.
toSource()Returns an object literal representing the specified object; you can use this value to create a new object.
toString()Returns a string representing the specified object.


Saturday 1 February 2014
Posted by Jebastin

Link To This Post/Page

Spread The Word

Add this button to your blog:
JJ Technology Solutions

Blog Archive

Trackers

eXTReMe Tracker
facebook

- Copyright © JJ Technology Solutions - Powered by Source Code Solutions -