Tuesday, August 5, 2014

Magento – Get Current Store Details (ID, Code, Name and Status)

// Gets the current store's details
$store = Mage::app()->getStore();
 
// Gets the current store's id
$storeId = Mage::app()->getStore()->getStoreId();
 
// Gets the current store's code
$storeCode = Mage::app()->getStore()->getCode();
 
// Gets the current website's id
$websiteId = Mage::app()->getStore()->getWebsiteId();
 
// Gets the current store's group id
$storeGroupId = Mage::app()->getStore()->getGroupId();
 
// Gets the current store's name
$storeName = Mage::app()->getStore()->getName();
 
// Gets the current store's sort order
$storeSortOrder = Mage::app()->getStore()->getSortOrder();
 
// Gets the current store's status
$storeIsActive = Mage::app()->getStore()->getIsActive();
 
// Gets the current store's locale
$storeLocaleCode = Mage::app()->getStore()->getLocaleCode();
 
// Gets the current store's home url
$storeHomeUrl = Mage::app()->getStore()->getHomeUrl();

Tuesday, July 22, 2014

Paypal IPN History page

Paypal IPN History page

To view the Instant Payment Notification (IPN) sent to your server, and the status, go to "History" at the top of the page, and select "IPN History" from the list.

You can also follow these steps:

  1. Go to the PayPal website and log in to your account.
  2. Click "Profile" at the top of the page.
  3. Click "Instant Payment Notification Preferences" in the Selling Preferences column.
  4. Click "IPN History page

Genrate Excel and CSV File in Asp.Net

 
Generate Excel File from Datagrid or GridView in Asp.Net
=================================================

[code]
private void GenerateExcelFile(DataSet dsData)
{
DataTable objDataTable = new DataTable();

objDataTable.Columns.Add(new DataColumn("PageTitle"));
objDataTable.Columns.Add(new DataColumn("MetaData"));
objDataTable.Columns.Add(new DataColumn("Title"));
objDataTable.Columns.Add(new DataColumn("Price"));
objDataTable.Columns.Add(new DataColumn("PriceRetail"));
objDataTable.Columns.Add(new DataColumn("StyleNumber"));
objDataTable.Columns.Add(new DataColumn("DescShort"));
objDataTable.Columns.Add(new DataColumn("DescLong"));
objDataTable.Columns.Add(new DataColumn("SmallImage"));
objDataTable.Columns.Add(new DataColumn("LargeImage"));
objDataTable.Columns.Add(new DataColumn("DateDownload"));

foreach (DataRow dr in dsData.Tables[0].Rows)
{
DataRow ObjDr = objDataTable.NewRow();

ObjDr["PageTitle"] = dr["PageTitle"];
ObjDr["MetaData"] = dr["MetaData"];
ObjDr["Title"] = dr["Title"];
ObjDr["Price"] = dr["Price"];
ObjDr["PriceRetail"] = dr["PriceRetail"];
ObjDr["StyleNumber"] = dr["StyleNumber"];
ObjDr["DescShort"] = dr["DescShort"];
ObjDr["DescLong"] = dr["DescLong"];
ObjDr["SmallImage"] = dr["SmallImage"];
ObjDr["LargeImage"] = dr["LargeImage"];
ObjDr["DateDownload"] = dr["DateDownload"];

objDataTable.Rows.Add(ObjDr);
}

System.IO.StringWriter objStringWriter = new System.IO.StringWriter();
HtmlTextWriter objHtmlTextWriter = new HtmlTextWriter(objStringWriter);
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=File.xls;");

DataGrid dg = new DataGrid();
dg.DataSource = objDataTable;
dg.DataBind();

dg.RenderControl(objHtmlTextWriter);
Response.Write(objStringWriter.ToString());
Response.End();
}
[/code]

Generate CSV File in Asp.Net
========================
[code]
private void GenerateCSV(DataSet dsData)
{
System.Text.StringBuilder objSB = new System.Text.StringBuilder();

// Looping trough Fields name of Database
for (int i = 0; i <= dsData.Tables[0].Columns.Count - 1; i++)
{
if (i < dsData.Tables[0].Columns.Count - 1)
{
objSB.Append(dsData.Tables[0].Columns[i].ColumnName.ToString() + "\t");
}
else
{
objSB.Append(dsData.Tables[0].Columns[i].ColumnName.ToString() + "\r\n");
}
}
// Looping through Every rows and column.
for (int i = 0; i <= dsData.Tables[0].Rows.Count - 1; i++)
{
for (int j = 0; j <= dsData.Tables[0].Columns.Count - 1; j++)
{
if (j < dsData.Tables[0].Columns.Count - 1)
{
objSB.Append(dsData.Tables[0].Rows[i][j].ToString() + "\t");
}
else
{
objSB.Append(string.IsNullOrEmpty(dsData.Tables[0].Rows[i][j].ToString()) ? "-" : dsData.Tables[0].Rows[i][j].ToString() + "\r\n");
}
}
}

Response.Clear();
Response.Charset = "";
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=File.csv;");

Response.Write(objSB.ToString());
Response.End();
}
[/code]

Tuesday, March 13, 2012

Display youtube video in asp.net mvc using "YouTubePlayerHelper"

Here i am explaining how you can display youtube video in asp.net mvc page using "YouTubePlayerHelper". Using "YouTubePlayerHelper" you have to just pass youtube media file name and id of the player. You can also pass the you-tube player option like width, height, color and border which are optional.
 
How to used "YouTubePlayerHelper"in asp.net mvc page ?
 
It is simple just add namespace where your "YouTubePlayerHelper"class reside and then add the following code in your asp.net mvc page.
 
For "YouTubePlayerHelper" you can download from here.
 
[code]
<%@ Import Namespace="Lesson1.Helpers" %>
<%= Html.YouTubePlayer("test","3sdJtQWlVrI", new YouTubePlayerOption { Width = 480, Height = 385, PrimaryColor = System.Drawing.Color.White, SecondaryColor = System.Drawing.Color.Pink,Border= true })%>
[\code]
 
Here i am just pass the youtube video file name "3sdJtQWlVrI" and pass the some option for displaying youtube video in my asp.net mvc page.
 
Here one question arise in your mide that Why i am creating "YouTubePlayerHelper" class?? It is simple to just right down the embedded code and give all the option and display youtube video just simple then.....
 
Because of creating "YouTubePlayerHelper" class is you have not right down the whole embedded code each and every page where you need ti display youtube video. If changes occurs in embedded code you have to just change "YouTubePlayerHelper" class nothing else.

jQuery AdRotator like ASP.NET AdRotator Control

ASP.NET AdRotator control is a useful to randomly display advertisements on the page. But asp.net AdRotator control only display adv when page is refresh. In this article i describe how to create AdRotator control using jQuery without adding asp.net Adrotator control and it refresh Adv at interval time no need to refresh the page. Using jQuery you have to just pass only three parameters intervalTime,
xmlFileName and keywords.
 
Following steps are used to create jQuery AdRotator
 
Step1 : Here i am using same xml file which is used by asp.net AdRotator control. But i have changed little bit in the xml file. Here i have add "Keywords" as a attribute of the tag and also remove tag from the tag. So create one xml file say "AR.xml" file using following xml.
[code]
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
<Ad Keyword="big">
<ImageUrl>image/AR1.jpg</ImageUrl>
<NavigateUrl>http://www.google.com</NavigateUrl>
<AlternateText>ASP.NET MVC 1.0 Quickly</AlternateText>
</Ad>
<Ad Keyword="small">
<ImageUrl>image/AR2.jpg</ImageUrl>
<NavigateUrl>http://www.yahoo.com</NavigateUrl>
<AlternateText>ASP.NET 3.5 Social Networking</AlternateText>
</Ad>
<Ad Keyword="small">
<ImageUrl>image/AR3.jpg</ImageUrl>
<NavigateUrl>http://www.live.com</NavigateUrl>
<AlternateText>ASP.NET 3.5 Application Architecture</AlternateText>
</Ad>
</Advertisements>
[/code]
 
Step 2: Then add following four script file in "js" folder and refrence this four file in your page
 
[code]
<script type="text/javascript" src="js/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="js/jquery.xml2json.js"></script>
<script type="text/javascript" src="js/jquery.metadata.js"></script>
<script type="text/javascript" src="js/AR.js"></script>
[/code]
 
Step 3: Here i have create two diffrent way to display Adv
1) Without using metadata
2) Using metadata
 
1) Without using metadata
 
Step 1: In without using metadata you have to pass three parameter that is intervalTime,xmlFileName and keywords in the javascript block.Add one javscript block in the header section after adding four javascript refrence file.
 
[code]
<script type="text/javascript">
$(document).ready(function () {
$("#ARDiv").adrotator({ intervalTime: 10000, xmlFileName: 'AR.xml', keywords: 'small' });
});
[/code]
 
 
Step 2: Now add one div tag between the body tag and give id "ARDiv" to that tag
 
[code]
<div id="ARDiv"></div>
[/code]
 
 
 
Step 3: Now run the page and see the result after 10 second Adv image will be changed and only display those Adv image which have keywords "small"
 
1) Using metadata
 
Step 1: In using metadata you have to pass three parameter that is intervalTime, xmlFileName and keywords not in the javascript block but you have to pass tree paramter to div tag this way and add this div tag between body tag.
 
[code]
<div id="ARDiv1" class="{ intervalTime: 10000, xmlFileName: 'AR.xml', keywords: 'small' }"></div>
[/code]
 
 
Step 2: Now add one javscript block in the header section
 
[code]
<script type="text/javascript">
$(document).ready(function () {
$("#ARDiv1").adrotator();
});
</script>
[/code]
 
 
Step 3: Now run the page and see the result after 10 second Adv image will be changed and only display those Adv image which have keywords "small"
 
 
 
Here i am just do simple way. But your suggestion give me better idea to improve this script.
You can download code from here.

Wednesday, December 8, 2010

Fw: Pencil and Eraser-Inspirational

Pencil : I'm sorry....

Eraser : For what? You didn't do anything wrong.

Pencil : I'm sorry because you get hurt because of me. Whenever I made a mistake,
you're always there to erase it. But as you make my mistakes vanish, you
lose a part of yourself. You get smaller and smaller each time.

Eraser : That's true. But I don't really mind. You see, I was made to do this.
I was made to help you whenever you do something wrong. Even though one day,
I know I'll be gone and you'll replace me with a new one, I'm actually happy with
my job. So please, stop worrying.
I hate seeing you sad. :)


I found this conversation between the pencil and the eraser very inspirational.
Parents are like the eraser whereas their children are the pencil. They're always
there for their children, cleaning up their mistakes. Sometimes along the way...
they get hurt, and become smaller (older, and eventually pass on). Though their
children will eventually find someone new (spouse), but parents are still happy
with what they do for their children, and will always hate seeing their precious ones worrying, or sad.

This Is for all Parents Out There.....

Pencil and Eraser-Inspirational

Pencil : I'm sorry....

Eraser : For what? You didn't do anything wrong.

Pencil : I'm sorry because you get hurt because of me. Whenever I made a mistake,
you're always there to erase it. But as you make my mistakes vanish, you
lose a part of yourself. You get smaller and smaller each time.

Eraser : That's true. But I don't really mind. You see, I was made to do this.
I was made to help you whenever you do something wrong. Even though one day,
I know I'll be gone and you'll replace me with a new one, I'm actually happy with
my job. So please, stop worrying.
I hate seeing you sad. :)


I found this conversation between the pencil and the eraser very inspirational.
Parents are like the eraser whereas their children are the pencil. They're always
there for their children, cleaning up their mistakes. Sometimes along the way...
they get hurt, and become smaller (older, and eventually pass on). Though their
children will eventually find someone new (spouse), but parents are still happy
with what they do for their children, and will always hate seeing their precious ones worrying, or sad.

This Is for all Parents Out There.....

Friday, November 19, 2010

Tower Of Hanoi

[Code]
 #include<stdio.h>
 #include<conio.h>
 #include<math.h>
 
 void hanoi(int x, char from,char to,char aux)
 {
  if(x==1)
  {
   printf("Move Disk From %c to %c\n",from,to);
  }
  else
  {
   hanoi(x-1,from,aux,to);
   printf("Move Disk From %c to %c\n",from,to);
   hanoi(x-1,aux,to,from);
  }
}
void main()
{
 int disk;
 int moves;
 clrscr();
 printf("Enter the number of disks you want to play with:");
 scanf("%d",&disk);
 moves=pow(2,disk)-1;
 printf("\nThe No of moves required is=%d \n",moves);
 hanoi(disk,'A','C','B');
 getch();
}
[/Code]

Thursday, November 18, 2010

Law of simplicity

I came across an interesting set of principles that you might want to keep
in mind the next time you set out to design an application, a website, or even
improve your daily life. They are The Laws of Simplicity
and were conceived by John Maeda, an artist and noted computer scientist from
the MIT Media Lab. He compiled them in a short, 100-page book (and posted them
on his website as well). I found them in a back issue of Wired
magazine, in an article that applied them in
a critique some new gadget. I have since found that they increasingly
influence my own analysis of UIs and websites, and occassionally
use them as the basis for discussions with clients to keep a design
session on track.
The Laws are:
1. Reduce – The simplest way to achieve simplicity is through
thoughtful reduction of functionality.
2. Organize – Organization makes a system of many appear fewer.
3. Time – Savings in time feel like simplicity.
4. Learn – Knowledge makes everything simpler.
5. Differences – Simplicity and complexity need each other.
6. Context – What lies in the periphery of simplicity is de?nitely not peripheral.
7. Emotion – More emotions are better than less.
8. Trust – In simplicity we trust.
9. Failure – Some things can never be made simple.
10. The One – Simplicity is about subtracting the obvious, and adding the
meaningful.
You can find a more detailed explanation of each law on his site

guidelines for asp.net development

<!–

ASP.NET Development
guidelines

<!--[if !supportLists]-->·
<!--[endif]-->Guidelines
for ASP.NET AJAX
Performance Improvement

Among the 95% of the .NET developers that said they are
using some flavor of Ajax either in production, development or prototype, the
most used AJAX Framework is ASP.NET AJAX, with 73,7%, followed by the Ajax
Control Toolkit which is used by almost half of the .NET developer that are
using Ajax.

However ASP.NET AJAX model is showing performance problem.
The web application developed in ASP.NET AJAX makes the site slow down.

So following are the few of guideline which will help you
out to improve performance of ASP.NET AJAX application. This will basically
apply to the ASP.NET AJAX version 1.0 final release.

  1. Use HttpWatch to check the network traffic.
    1. This is one of important tool using which you can check the data returned by
      the server. There is dedicated tool available for this. Moreover to that
      you can also utilize Firebux extension of firefox to watch network
      traffic. The dedicated tool is available for the download from following
      URL: http://www.httpwatch.com/download/.

      This is a limited feature version.

  2. Use "ScriptReferenceProfile" to show Javascript reference
    1. ScriptReferenceProfiler is an open source tool on CodePlex, for analysis the JavaScript
      references of ASP.NET AJAX, we can simply add the following code to our
      page in order to show the JavaScript references imported by
      ScriptManager.

      <microsoft:scriptreferenceprofiler runat="server">

</microsoft:scriptreferenceprofiler>

You can obtain it from the following URL

Reference: http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=13356

  1. Web.Config Optimization
    1. To have optimized web.config file our application, all we need to do is to
      have a compression and caching is enabled in web.config file for the
      ASP.NET AJAX Includes. You can use the following code in web.config file
      to enable compression & caching for AJAX includes.

      <system.web.extensions>

      <scripting>

      <scriptResourceHandler enableCompression="true" enableCaching="true"/>

      </scripting>

      </system.web.extensions>

      Also check before and after result of before and after of enabling
      caching & compression in network traffic.

      Now this is limited to the compression and caching for AJAX includes. In our site we also
      generally have many other script files included. There can also be no. of
      different CSS files, JS files etc. We can also compress them so that It make fewer request in bytes.

      Basically there is no any method available in ASP.NET which allows the
      compression of JS & CSS files. We need to do it manually and
      reference those compressed file in our application.

      One very key important point to consider is related to change management
      of those files. Once you have compressed file in place and referenced in
      your different pages, If your JS file or CSS
      file need to have any modification, then you again have to recompress it
      from newer version.

      So this method should be adopted for such scripts or CSS which are less
      frequently changed.

      There are different tools available which allows your script and CSS file
      compression. Following are the different methods which can be used for
      this purpose.

      1) Yahoo compresser (http://yui.2clics.net/)

      2) http://www.vlead.in/resources/tools/minify-javascript/index.php
      (The best one which I utilized)

  2. Optimization of ScriptManager
    1. The ScriptManager control manages client script for AJAX-enabled ASP.NET Web
      pages. By default, the ScriptManager control registers the script for the
      Microsoft AJAX Library with the page. This enables client script to use
      the type system extensions and to support features such as partial-page
      rendering and Web-service calls. Following, we need to setting
      the property of ScriptManager to optimize the performance of ASP.NET
      AJAX.

<!--[if !supportLists]-->·
<!--[endif]-->Set "scriptMode" to Release.

for e.g.

<asp:ScriptManager ID="ScriptManager1″
runat="server" ScriptMode="Release">

</asp:ScriptManager>

Moreover to this set "debug" mode in "compilation" section of web.config file
to false.

<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

<!--[if !supportLists]-->·
<!--[endif]-->Disable partial page rendering

If we using the UpdatePanel in the page, we must set this property to true,
conversely, if the UpdatePanel is not using in our page, it would be better
that we set the EnablePartialRendering to false.

For e.g.

<asp:ScriptManager ID="ScriptManager1″ runat="server"
EnablePartialRendering="false">

</asp:ScriptManager>

  1. Move All Script Tags After Body Content
    1. ASP.NET ScriptManager control has a property "LoadScriptsBeforeUI", when set to
      false, should load all AJAX
      framework scripts after the content of the page. But it does not
      effectively push down all scripts after the content. Some framework
      scripts, extender scripts and other scripts registered by Ajax Control
      Toolkit still load before the page content loads.

So these are the basic general guidelines which can be
followed one by one to have an improved ASP.NET AJAX response.



<!--[if !supportLists]-->·
<!--[endif]-->Guideline
for ASP.NET Application Performance

Following, I will demonstrate some of important guideline
for the improvement of ASP.NET application. These guidelines should be
implemented carefully by taking into consideration of development needs. It is
not necessary to have all following steps followed.

  1. Removing unnecessary HTTP MODUES from site.
    1. There are several ASP.NET default HttpModules which
      sit in the request pipeline and intercept each and every request.

      For example, if you aren't using Membership and Profile provider, you
      don't need "FormsAuthentication" module. If you aren't using Windows
      Authentication for your users, you don't need "WindowsAuthentication".

      We can remove those unnecessary references of HTTP modules from
      web.config using <remove> tag.

      Generally following are the HTTP modules which are not generally used in
      our current development architecture.

      <remove name="WindowsAuthentication" />

      <remove name="PassportAuthentication" />

      <remove name="AnonymousIdentification" />

      <remove name="UrlAuthorization" />

      <remove name="FileAuthorization" />

  2. Removing or compressing "VIEWSTATE" from page
    1. We can override few of method of default System.Web.UI.Page class of .net
      framework.

      Use the following file and include it in your project's APP_CODE.
      Inherits rest of all your pages from this page instead of regular System.Web.UI.Page
      class.

      Ref: BasePage.vb
      <!--[if !supportLineBreakNewLine]-->
      <!--[endif]-->

  3. Use caching for pages which changes less frequently
    1. There are several ways to use the cache; we'll focus on the easiest tricks to
      get you started, then point you toward some resources that will help you
      tackle more advanced ways to utilize the cache.

      The simplest solution is to use the OutputCache directive on your pages
      or user controls.

  4. Disable VIEWSTATE for pages where no Grid related functionality.
    1. One should set the VIEWSTATE disabled in those pages where there is no grid
      level manipulation. When we have a simple page with no complex logic, it
      should be disabled.

      Moreover to that set the following pages which are not security
      sensitive.

      1) EnableViewStateMac="false"

      2) ViewStateEncryptionMode="never"
      <!--[if !supportLineBreakNewLine]-->
      <!--[endif]-->

  5. Use classical ASP type of page for normal pages.
    1. Another important point is to use a classical ASP type of pages which are simple.
      Those pages which do not have any complex display should be developed
      like normal ASP pages. Please check the following referenced page for
      this similar purpose.

      these are such files which do not have underlying code behind file
      attached to it.

      We can also utilize the feature of "include" file method which is there
      in classical ASP.



<!--[if !supportLists]-->·
<!--[endif]-->Guidelines
for structuring ASP.NET Application

In the following, I will demonstrate the basic guidelines
for the structuring of any web application.

See these guidelines are generally be best suitable for SEO
oriented sites. It can also be adopted for general site also keeping
requirement in mind.

These guidelines are prepared keeping modularized
development in mind. So there are no such tricks that by following them you
will be able to better structure your site. One should do the do modularized
development in their programming also to achieve this.

  1. Use dedicated folders for JS & CSS files.In a site generally there are different JS & CSS files for different
    functionality. These JS & CSS files should be accordingly structure
    inside your website. Please take a look at the following example for the
    better illustration of this method.

    Say for e.g. in a site few pages have functionality to display a jQuery
    zoom light box when anyone click on the image of product.

    So following should be the structure of JS & CSS files.

    In this example, assume there are also few global JS & CSS. So I will
    also demonstrate the purpose of integrating them in site.

    Root

    |___js

    | |___lightbox

    | |___lightbox.js

    |____|___global

    |____jquery-1.2.6.min.js

    |____common.js

    |___css

    | |___lighbox

    | |___ lighbox.css

    |________global

    |____global.css

    This modularization can also be used to
    differentiate CSS & JS for each page of site.

    Modularization is also not limited to the CSS & JS files, one can
    follow same modularization concept across different type of files also
    like XML content, flash content, image folders etc.

    <!--[if !supportLineBreakNewLine]-->
    <!--[endif]-->

  2. Use proper naming conversion in CSS files.
    1. Care full design of CSS classes and attributes provide better traceability. As
      you just shown above that the CSS & JS can be modularized. We should
      also use proper naming convention in those CSS file. If you follow these
      conventions, you can easily identify respective class.

      Say for e.g.

      you set naming abbreviation of respective CSS as per below.

      1) global.css
      = glb

      2) lightbox.css = lg

      so now you can have following CSS class/section defined in respective css
      files.

      like in global.css

      glb-main

      {

      }

      .glb-title

      {

      color: #7D3D0D;

      font-family: Arial;

      font-size: 20px;

      font-weight: normal;

      text-decoration: none;

      clear: both;

      }

      in the same way, you can also different class in lighbox.css

      .lg-dvtop

      {

      width: 100%;

      margin: 20px 10px 10px 10px;

      }

      .lg-content

      {

      width: 700px;

      height: 600px;

      }

  3. Configure
    APP_CODE to have two sub directories. Each sub directory can be used for
    different language. It is generally like following.

    APP_CODE
    |___VB

    |___CS

    Respective programming files should be placed in respective folders. Also
    make sure to configure code sub directory in web.config also.



<!--[if !supportLists]-->·
<!--[endif]-->Guidelines
before final release of site

Following, there are some important and necessary checks
that web-sites should be checked against before the official launch.

  1. Favicon
    1. A favicon icon the tab or window in which your website is open in the
      user's browser. It is also saved with the bookmark so that users can
      easily identify pages from your website.

      for e.g.

      <link href="images/fav_icon.ico" rel="icon"
      type="image/Jpeg" />
      <!--[if !supportLineBreakNewLine]-->
      <!--[endif]-->

  2. Title & Meta data
    1. Your page title is the most important element for SEO and is also important so
      that users know what's on the page. Make sure it changes on every page
      and relates to that page's content.

      Also one should make sure that related meta data
      details are also get placed in every pages and are changes as it should
      be to different pages.

  3. Cross-Browser Check
    1. The most popular browsers to check are Internet Explorer 6, 7 and 8, Firefox
      3, Safari 3. Following are the few methods used to do cross browser check

      1) XecoCode (http://www.xenocode.com/browsers/)

      2) IETester (http://www.my-debugbar.com/wiki/IETester/HomePage)

      3) Browser shot (http://browsershots.org/)

  4. Links
    1. Don't just assume all your links work. Click on them. You may often forget to
      add "http://" to links to external websites. There may be case when some
      URL rewriting related prefix or postfix would be forgotten.