Monday, July 26, 2010
Friday, July 23, 2010
HelpFull links on SSRS
http://www.simple-talk.com/sql/reporting-services/ten-common-sql-server-reporting-services-challenges-and-solutions/
http://www.beansoftware.com/ASP.NET-Tutorials/SQL-Server-Reporting-Services.aspx
http://www.beansoftware.com/ASP.NET-Tutorials/SQL-Server-Reporting-Services.aspx
Thursday, July 15, 2010
Decryption Code for AlertPay EPD
string Salt_Key = [Your IPN Security Code];
private readonly byte[] Ivector = Encoding.Default.GetBytes("alertpay");
private string Decrypt(string Input)
{
byte[] Buffer = Convert.FromBase64String(Input);
TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider();
tripleDES.Key = Encoding.Default.GetBytes(Salt_Key);
tripleDES.IV = Ivector;
//tripleDES.Padding = PaddingMode.Zeros;
tripleDES.Mode = CipherMode.CBC;
ICryptoTransform Transform = tripleDES.CreateDecryptor();
return HttpUtility.UrlDecode(Encoding.Default.GetString(Transform.TransformFinalBlock(Buffer, 0, Buffer.Length)));
}
protected void Page_Load(object sender, EventArgs e)
{
string data = [your encrypted Data];
string[] Result = Decrypt(data).Split(new char[] { '&' });
foreach(string s in Result)
Response.Write(s + "
");
}
private readonly byte[] Ivector = Encoding.Default.GetBytes("alertpay");
private string Decrypt(string Input)
{
byte[] Buffer = Convert.FromBase64String(Input);
TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider();
tripleDES.Key = Encoding.Default.GetBytes(Salt_Key);
tripleDES.IV = Ivector;
//tripleDES.Padding = PaddingMode.Zeros;
tripleDES.Mode = CipherMode.CBC;
ICryptoTransform Transform = tripleDES.CreateDecryptor();
return HttpUtility.UrlDecode(Encoding.Default.GetString(Transform.TransformFinalBlock(Buffer, 0, Buffer.Length)));
}
protected void Page_Load(object sender, EventArgs e)
{
string data = [your encrypted Data];
string[] Result = Decrypt(data).Split(new char[] { '&' });
foreach(string s in Result)
Response.Write(s + "
");
}
Friday, July 9, 2010
Image Thumbnails Nice Code
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Drawing.Imaging;
string photoPath = Server.MapPath("1.jpg");
int thumbnailSize = 50;
Bitmap photo = new Bitmap(photoPath);
int width, height;
if (photo.Width > photo.Height)
{
width = thumbnailSize;
height = photo.Height * thumbnailSize / photo.Width;
}
else
{
width = photo.Width * thumbnailSize / photo.Height;
height = thumbnailSize;
}
Bitmap target = new Bitmap(width, height);
using (Graphics graphics = Graphics.FromImage(target))
{
graphics.CompositingQuality = CompositingQuality.HighSpeed;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.DrawImage(photo, 0, 0, width, height);
target.Save(Server.MapPath("/2.jpg"));
img.ImageUrl = "~/2.jpg";
}
using System.Drawing.Drawing2D;
using System.IO;
using System.Drawing.Imaging;
string photoPath = Server.MapPath("1.jpg");
int thumbnailSize = 50;
Bitmap photo = new Bitmap(photoPath);
int width, height;
if (photo.Width > photo.Height)
{
width = thumbnailSize;
height = photo.Height * thumbnailSize / photo.Width;
}
else
{
width = photo.Width * thumbnailSize / photo.Height;
height = thumbnailSize;
}
Bitmap target = new Bitmap(width, height);
using (Graphics graphics = Graphics.FromImage(target))
{
graphics.CompositingQuality = CompositingQuality.HighSpeed;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.DrawImage(photo, 0, 0, width, height);
target.Save(Server.MapPath("/2.jpg"));
img.ImageUrl = "~/2.jpg";
}
Subscribe to:
Posts (Atom)