RSS

Author Archives: Mr Dublin

JavaScript: Cookies


A cookie is a variable that is stored on the user’s computer. You can use Javascript to create and retrieve cookie values.

To create a cookie:


function setCookie(sCookieName, sCookieValue)
{
var oCookieExpiryDate = null;
try
{
oCookieExpiryDate = new Date();
if (oCookieExpiryDate == null)
{
return -1;
}
oExpiryDate.setTime(oCookieExpiryDate.getTime() + (1000 * 60 * 60 * 24 * 30)); //30 days
document.cookie = sCookieName + "=" + sCookieValue + "; path=/" + ((oCookieExpiryDate == null) ? "" : "; expires=" + oCookieExpiryDate.toGMTString());
}
catch(e)
{
}
finally
{
}
}

To get the value of a cookie:


function getCookie (sCookieName)
{
try
{
var sCookieNameEQ = sCookieName + "=";
var oCookiesArray = document.cookie.split(';');
for(var i=0;i < oCookiesArray.length;i++)
{
var oCookieItem = oCookiesArray[i];
while (oCookiesArray.charAt(0)==' ')
{
oCookieItem = oCookieItem.substring(1,oCookieItem.length);
}
if (oCookieItem.indexOf(sCookieNameEQ) == 0)
{
return oCookieItem.substring(sCookieNameEQ.length,oCookieItem.length);
}
}
return null;
}
catch(e)
{
}
finally
{
}
}

 

 
Leave a comment

Posted by on October 10, 2012 in Programming

 

Tags: , , , , , , , , , , , ,

Westport House

Westport House

 
2 Comments

Posted by on October 7, 2012 in Photography

 

Tags: , , , ,

Glendalogh Landscape

Glendalogh Landscape

 
1 Comment

Posted by on September 30, 2012 in Photography

 

Tags: , , , , , , , , ,

ReportViewer Error : Operation is not valid due to the current state of the object


I was getting this error in my ASP.NET application when I try to load a report into the report viewer control. To solve this I used the Reset() method of the report viewer control.



oReportViewer.Reset()
oReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
oReportViewer.Visible = True
oReportViewer.ServerReport.ReportServerUrl = New System.Uri(sReportServiceURL)
oReportViewer.ServerReport.ReportPath = sReportName
oReportViewer.ShowParameterPrompts = False
oReportViewer.ShowDocumentMapButton = False
oReportViewer.DocumentMapWidth = 0
oReportViewer.ShowDocumentMapButton = False
oReportViewer.ShowFindControls = False
oReportViewer.ServerReport.Refresh()

 
Leave a comment

Posted by on September 27, 2012 in Programming

 

Tags: , , , , , , , , , ,

Dublin Tall Ships

 
Leave a comment

Posted by on September 22, 2012 in Photography

 

Tags: , , ,

[XCode] Launch Google maps app


This code is to launch Google maps from an iPhone app and passing a longitude and latitude values:



NSString *googleMapsURLString = [NSString stringWithFormat:@"http://maps.google.com/maps?q=%1.6f,%1.6f",56.152227,-9.162045];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:googleMapsURLString]];

 
Leave a comment

Posted by on June 3, 2012 in Programming

 

Tags: , , , , , , , ,

Michael D Higgins

Michael D Higgins

Labour’s Michael D Higgins has been officially elected to the office of President of Ireland. He received 1,007,104 votes, exceeding the quota by 121,222.

http://www.michaeldhiggins.ie/about/

Bray Beach

Bray Beach

 
Leave a comment

Posted by on October 30, 2011 in Photography

 

Tags: , , , , , , , , , ,

Room In Westport House

Room In Westport House

This is a room in Westport House.

To know more about this historic house visit this site

Room In Westport House

 
Leave a comment

Posted by on October 26, 2011 in Photography

 

Tags: , , , , , , , , , , ,

Road To Greystones

Alphabet taught to kids nowadays

Road To Greystones

Road To Greystones

 
1 Comment

Posted by on October 14, 2011 in Photography

 

Tags: , , , , , ,

Malahide Beach

Programming Languages

What do you use for programming? I mainly use VB.Net, I used and enjoyed C#. And as a web developer I used JavaScript. I remember doing some php long time ago. In the university I used Assembly, Fortran, and VB 6.0

But I only speaks two languages

Malahide Beach

Malahide Beach

 
Leave a comment

Posted by on September 23, 2011 in Photography

 

Tags: , , , , , , , , , , ,

 
%d bloggers like this: