Monthly Archives: June 2009

Best Video I’ve Seen Today Will Make You Smile

http://gizmodo.com/5231112/best-video-ive-seen-today-will-make-you-smile

If this video doesn’t bring a tear to your eyes and makes you smile for the rest of the day, you are a cold hearted bastard. Watch it from beginning to end—you won’t regret it.

This cover of Stand By Me was recorded by completely unknown artists in a street virtual studio all around the world. It all started with a base track—vocals and guitar—recorded on the streets of Santa Monica, California, by a street musician called Roger Ridley. The base track was then taken to New Orleans, Louisiana, where Grandpa Elliott—a blind singer from the French Quarter—added vocals and harmonica while listening to Ridley’s base track on headphones. In the same city, Washboard Chaz’s added some metal percussion to it.

And from there, it just gets rock ‘n’ rolling bananas: The producers took the resulting mix all through Europe, Africa, and South America, adding new tracks with multiple instruments and vocals that were assembled in the final version you are seeing in this video. All done with a simple laptop and some microphones.

I don’t know about you, but it blew me away. Best version of Ben E. King’s classic I’ve ever heard in my life. And I’ve probably heard between five and two billion of them. [Playing for Change—Thanks to my friend Fernando]

The ASP.NET Capsule #14: How to automatically send a DevExpress XtraReport via Email

The following example demonstrates how to automatically send a report via e-mail. To do this, a report should first be exported into one of the available formats. In this example, a report is exported to PDF, since this format provides the best output quality (the PDF result is as close to a report’s print result as possible).

You can find the full sample (with C# and VB.NET code) on: http://www.devexpress.com/Support/Center/e/E16.aspx

The following source code assumes you have a button with a click event handler named “Button1_Click”. The XtraReport class is named XtraReport1.

   1:  using System;
   2:  using System.IO;
   3:  using System.Net.Mail;
   4:  // ...
   5:   
   6:  using System.Windows.Forms;
   7:   
   8:  namespace SendReportAsEMailCS
   9:  {
  10:      public partial class Form1 : Form
  11:      {
  12:          public Form1()
  13:          {
  14:              InitializeComponent();
  15:          }
  16:   
  17:          private void button1_Click(object sender, EventArgs e)
  18:          {
  19:              try
  20:              {
  21:                  // Create a new report.                
  22:                  XtraReport1 report = new XtraReport1();
  23:   
  24:                  // Create a new memory stream and export the report into 
  25:                  // it as PDF.
  26:                  MemoryStream mem = new MemoryStream();
  27:                  report.ExportToPdf(mem);
  28:   
  29:                  // Create a new attachment and put the PDF report into 
  30:                  // it.
  31:                  mem.Seek(0, System.IO.SeekOrigin.Begin);
  32:                  Attachment att = new Attachment(mem, "TestReport.pdf", 
  33:                                                  "application/pdf");
  34:   
  35:                  // Create a new message and attach the PDF report to 
  36:                  // it.
  37:                  MailMessage mail = new MailMessage();
  38:                  mail.Attachments.Add(att);
  39:   
  40:                  // Specify sender and recipient options for the e-mail 
  41:                  // message.
  42:                  mail.From = new MailAddress("someone@somewhere.com", 
  43:                                              "Someone");
  44:                  mail.To.Add(new 
  45:                      MailAddress(report.ExportOptions.Email.RecipientAddress,
  46:                      report.ExportOptions.Email.RecipientName));
  47:   
  48:                  // Specify other e-mail options.
  49:                  mail.Subject = report.ExportOptions.Email.Subject;
  50:                  mail.Body = "This is a test e-mail message sent by an 
  51:                               application.";
  52:   
  53:                  // Send the e-mail message via the specified SMTP server.
  54:                  SmtpClient smtp = new SmtpClient("smtp.somewhere.com");
  55:                  smtp.Send(mail);
  56:   
  57:                  // Close the memory stream.
  58:                  mem.Close();
  59:                  mem.Flush();
  60:              }
  61:              catch (Exception ex)
  62:              {
  63:                  MessageBox.Show(this, "Error sending a report.\n" +
  64:                                         ex.ToString());
  65:              }
  66:          }
  67:      }
  68:  }

DevExpress CodeRush Xpress for C# & VB.NET

Mark Miller from DevExpress just posted an incredible article on CodeRush Xpress.

Here is a part of it:

 

Download CodeRush Xpress - free from Dev Express!

CodeRush Xpress is a powerful developer productivity tool from Dev Express. The product is free, licensed by Microsoft on behalf of all developers working in Visual Studio 2008 in all paid-for product skus (e.g., Standard, Professional, Team System). Note however that CodeRush Xpress will not load in the Express Editions of Visual Studio.

CodeRush Xpress includes features that support common developer tasks in the following areas:

FeatureSummary

CodeRush Xpress fully supports all language features of Visual Basic and C# in Visual Studio 2008. If a specific feature applies to only one of these two languages, it will be noted with one of these icons:

VB C#

More details on CodeRush Xpress functionality follow.

NavigateFeatures

Navigate

CodeRush Xpress includes seven powerful navigation features to make getting to that important location fast and easy.

Camel Case Navigation

You can move among the lowercase-to-uppercase transitions using Camel Case Nav.

To move right, hold down the Alt key and press the Right arrow key inside a camel case identifier.

CamelCaseRight

To move left, hold down the Alt key and press the Left arrow key inside a camel case identifier.

CamelCaseLeft

Camel Case Nav is useful when you want to rename an identifier and change the name in a manner that keeps a portion of the existing camel case identifier. For example, if an existing identifier was called "StartTasks" and you wanted to rename it to "StartFilteredTasks", you could use Camel Case Nav to instantly get the caret between the "Start" and "Tasks" parts before typing in the…

 

Here is the full story: https://community.devexpress.com/blogs/markmiller/archive/2009/06/25/coderush-xpress-for-c-and-visual-basic-2008.aspx

News: Welcome to Telerik Labs

This is the place where you can evaluate and become part of all the exciting technologies, innovations and products Telerik is working on. Here you will have early access to numerous interesting demos and samples as well as future additions to our product line. Feel free to download, explore, comment or just play around.

Telerik Labs Home Page: https://www.telerik.com/community/labs.aspx

Featured Projects

RadDock for WinForms Beta

RadScheduler for Silverlight Beta

BugTracker Demo – a Silverlight Drag & Drop and MVVM Showcase

Telerik IntelliSense for Expression Blend

Telerik Visual Style Builder for RadControls for ASP.NET AJAX

News: Telerik Webinar: WebUI Test Studio

image

On Wednesday July 1st, Falafel Software is offering a FREE webinar on ArtOfTest’s WebAii Framework and the Automation Design Canvas.

The following subjects will be discussed and demonstrated:

  1. Browser Support
  2. Test Regions
  3. Silverlight automation
  4. Ajax Testing
  5. Best practices.

The Webinar will be conducted over GotoWebinar.com and upon registration you will receive the choices of Audio (VOIP or Phone) in several countries.

https://www2.gotomeeting.com/register/830223259

The ASP.NET Capsule #13: Preparing your Telerik based website to run in medium trust

Today I installed a new website for one of our customers in a shared hosting provider (I will omit the name because I think is one of the worst shared hosting providers available, cheap but crappy).

In any case, virtually every single shared hosting provider works on medium trust or some sort of security level near the medium trust and only a few of them provides full trust as an add-on or upgrade.

So, after setting up the database I uploaded all the necessary files and that’s when this error came into play:

Telerik_Error_MediumTrust

Of course I was surprised at first but after reading carefully I came to realize that all I needed was to change the base class my pages inherit from. The class is the RadAjaxPage.

Taken from the documentation:

This class is required as a base class for any page that hosts a RadAjaxManager control and runs under Medium trust privileges.

Now, not all pages needs to inherit from RadAjaxPage. Only pages that use RadControls which in turn use the RadAjaxManager control are in need of this.

Also taken from the documentation:

AJAX Manager is one of the two major controls of the Telerik RadAjax suite. The other one is AJAX Panel. AJAX Manager allows developers rapidly develop powerful and complex AJAX solutions.

The main features of AJAX Manager are:

  • You can ajaxify all controls that normally work with postbacks.
  • Defines visually and codeless (in Visual Studio design-time) which elements should initiate AJAX requests and which elements should be updated
  • No need to modify your application logic
  • Allows you to update a number of page elements at once regardless of their position on the page.
  • No need to write any JavaScript or invoke AJAX requests manually

So, a code behind file for a page that would normally look like this:

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Web.UI;
   6:  using System.Web.UI.WebControls;
   7:   
   8:  namespace Some.Web
   9:  {
  10:      public partial class SomeForm : System.Web.UI.Page
  11:      {
  12:          protected void Page_Load(object sender, EventArgs e)
  13:          {
  14:   
  15:          }
  16:      }
  17:  }

would change to:

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Web.UI;
   6:  using System.Web.UI.WebControls;
   7:  using Telerik.Web.UI;
   8:   
   9:  namespace Some.Web
  10:  {
  11:      public partial class SomeForm : Telerik.Web.UI.RadAjaxPage
  12:      {
  13:          protected void Page_Load(object sender, EventArgs e)
  14:          {
  15:   
  16:          }
  17:      }
  18:  }

And that will do the trick.

The bad news is that still, Telerik Reporting doesn’t work in medium trust, so let’s hope this feature will be included in the near future.

Enjoy!

Chicken a la carte – What are we teaching our children?

Hi all.

I don’t usually post stuff like this in my technical blog but we could spare 6 minutes to watch this award winning short film and analyze how the world is and what are we teaching our children.

I apologize if this post is consider inappropriate for the technical flow of the site but we all live in this world and we are humans after all. Please allow yourself 6 minutes and let’s change our little part of the world.

Enjoy!

News: System.Data.OracleClient update

Microsoft has made a huge announcement regarding the OracleClient library in ADO.NET. Himanshu Vasishth, Program Manager for ADO.NET OracleClient made the following information available in the ADO.NET Team Blog yesterday:

As a part of formulating our long term strategy for ADO.NET, we have had several discussions with number of our customers, internal and external partners, and MVPs to better align our development efforts to ensure we are delivering the right technologies according to our customers’ highest priority needs. One of the key intent of these discussions and the associated research was to understand the needs and requirements of customers who develop applications with Oracle using “System.Data.OracleClient” (OracleClient).   OracleClient is the ADO.NET provider for Oracle developed by Microsoft and ships as a part of the .NET Framework.

We learned  that a significantly large portion of customers use our partners’  ADO.NET providers for Oracle;  with regularly updated support for Oracle releases and new features. In addition, many of the third party providers are able to consistently provide the same level of quality and support that customers have come to expect from Microsoft. This is strong testament of our partners support for our technologies and the strength of our partner ecosystem.  It is our assessment that even if we made significant investments in ADO.Net OracleClient to bring it at parity with our partners based providers, customers would not have a compelling reason to switch to ADO.Net OracleClient.

The Decision

After carefully considering all the options and talking to our customers, partners, and MVPs it was decided to deprecate OracleClient as a part of our ADO.NET roadmap.

Read the full story here.