Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C# ͼƬ²Ã¼ô

/// <summary>
/// ËõС²Ã¼ôͼƬ
/// </summary>
/// <param name="int_Width">ÒªËõС²Ã¼ôͼƬ¿í¶È</param>
/// <param name="int_Height">ÒªËõС²Ã¼ôͼƬ³¤¶È</param>
/// <param name="input_ImgUrl">Òª´¦ÀíͼƬ·¾¶</param>
/// <param name="out_ImgUrl">´¦ÀíÍê±ÏͼƬ·¾¶</param>
public void ImgReduceCutOut(int int_Width, int int_Height, string input_ImgUrl, string out_ImgUrl)
{
// £½£½£½ÉÏ´«±ê׼ͼ´óС£½£½£½
int int_Standard_Width = 160;
int int_Standard_Height = 160;
int Reduce_Width = 0; // ËõСµÄ¿í¶È
int Reduce_Height = 0; // ËõСµÄ¸ß¶È
int CutOut_Width = 0; // ²Ã¼ôµÄ¿í¶È
int CutOut_Height = 0; // ²Ã¼ôµÄ¸ß¶È
int level = 100; //ËõÂÔͼµÄÖÊÁ¿ 1-100µÄ·¶Î§
// £½£½£½»ñµÃËõС£¬²Ã¼ô´óС£½£½£½
if (int_Standard_Height * int_Width / int_Standard_Width > int_Height)
{
Reduce_Width = int_Width;
Reduce_Height = int_Standard_Height * int_Width / int_Standard_Width;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
else if (int_Standard_Height * int_Width / int_Standard_Width < int_Height)
{
Reduce_Width = int_Standard_Width * int_Height / int_Standard_Height;
Reduce_Height = int_Height;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
else
{
Reduce_Width = int_Width;
Reduce_Height = int_Height;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
// £½£½£½Í¨¹ýÁ¬½Ó´´½¨Image¶ÔÏó£½£½£½
System.Drawing.Image oldimage = System.Drawing.Image.fromFile(Server.MapPath(input_ImgUrl));


Ïà¹ØÎĵµ£º

ÈçºÎ¼ÆËãMS SQLÓï¾äÖ´ÐеÄʱ¼ä»¹ÓÐc#


MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
   --Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......

C#ÖÐ¶Ô XML½Úµã½øÐÐÔö¡¢É¾¡¢¸Ä¡¢²é

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
    /// <summary>
    /// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
  &nb ......

C# ͨ¹ýxslת»»´óxmlÎļþ·½·¨

ͨ¹ýxslת»»´óxmlÎļþ
Õ⼸ÌìÔÚ×öÕâ¸ö£¬ÍøÉϵö·½·¨ÎÒ¶¼ÊÔ¹ýÁË£¬»ã×ÜÈçÏÂ
·½·¨Ò»£º
XPathDocument myXPathDoc = new XPathDocument(tbXMLFile.Text);
 
XslCompiledTransform myXslTrans = new XslCompiledTransform();
myXslTrans.Load(tbXSLFile.Text);
 
XmlTextWriter myWriter = new XmlTextWrit ......

C#×Ô¶¯¹Ø»úÔ´Âë

Ô´ÂëÈçÏ£º
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.IO;
using Microsoft.Win32;
namespace mv
{ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ