在线PDF转换网站集合

Jquery CDN ,

网站加载速度在线监测工具

此实现不是 Windows 平台 FIPS 验证的加密算法的一部分。

11
2015
07

C#图片切割

 

public class ImageManager
    {
        /// <summary>
        /// 图像切割
        /// </summary>
        /// <param name="url">图像文件名称</param>
        /// <param name="width">切割后图像宽度</param>
        /// <param name="height">切割后图像高度</param>
        /// <param name="savePath">切割后图像文件保存路径</param>
        /// <param name="fileExt">切割后图像文件扩展名</param>
        public static void Cut(string url, int width, int height,string savePath,string fileExt,string logofile)
        {
            Bitmap bitmap = new Bitmap(url);
            Decimal MaxRow = Math.Ceiling((Decimal)bitmap.Height / height);
            Decimal MaxColumn = Math.Ceiling((decimal)bitmap.Width / width);
            for (decimal i = 0; i < MaxRow; i++)
            {
                for (decimal j = 0; j < MaxColumn; j++)
                {
                    string filename = i.ToString() + "," + j.ToString() + "." + fileExt;
                    Bitmap bmp = new Bitmap(width, height);
                  
                    for (int offsetX = 0; offsetX < width; offsetX++)
                    {
                        for (int offsetY = 0; offsetY < height; offsetY++)
                        {
                            if (((j * width + offsetX) < bitmap.Width) && ((i * height + offsetY) < bitmap.Height))
                            {
                                bmp.SetPixel(offsetX, offsetY, bitmap.GetPixel((int)(j * width + offsetX), (int)(i * height + offsetY)));
                            }
                        }
                    }                   
                    Graphics g = Graphics.FromImage(bmp);
                    g.DrawString("哲慧科技", new Font("黑体", 20), new SolidBrush(Color.FromArgb(70, Color.WhiteSmoke)), 60, height/2);//加水印
                    ImageFormat format = ImageFormat.Png;                  
                    switch (fileExt.ToLower())
                    {
                        case "png":
                            format = ImageFormat.Png;
                            break;
                        case "bmp":
                            format = ImageFormat.Bmp;
                            break;
                        case "gif":
                            format = ImageFormat.Gif;
                            break;                        

11
2015
07

C#图片分割

 

   Bitmap image = new Bitmap(textBox1.Text);//从TextBox里获得图像的路径
    int Height = image.Height;//图像高度
    int Width = image.Width;//图像宽度
    int x = Convert.ToInt32(comboBox1.Text);//横切x份
    int y = Convert.ToInt32(comboBox2.Text);//纵切y份

11
2015
07

c#分割图片代码

 

public static class ImageSplitTool
    {
        public static ImageSource[] SplitImage(BitmapSource source, int tileWidth, int tileHeight)
        {
            var colCount = source.PixelWidth / tileWidth;
            var rowCount = source.PixelHeight / tileHeight;
            var results = new ImageSource[rowCount * colCount];
            var stride = tileWidth * ((source.Format.BitsPerPixel + 7) / 8);
            var pixelsCount = tileWidth * tileHeight;
            var tileRect = new Int32Rect(0, 0, tileWidth, tileHeight);

11
2015
07

C#图片切割,图片压缩,缩略图的生成代码

 

**//// <summary>
    /// 图片切割函数
    /// </summary>
    /// <param name="sourceFile">原始图片文件</param>
    /// <param name="xNum">在X轴上的切割数量</param>
    /// <param name="yNum">在Y轴上的切割数量</param>
    /// <param name="quality">质量压缩比</param>
    /// <param name="outputFile">输出文件名,不带后缀</param>
    /// <returns>成功返回true,失败则返回false</returns>
    public static bool imageCut(String sourceFile, int xNum, int yNum, long quality, String outputFile)
    {
        try
        {
            long imageQuality                        =    quality;
            Bitmap sourceImage                       =    new Bitmap(sourceFile);
            ImageCodecInfo myImageCodecInfo          =    GetEncoderInfo("image/jpeg");
            Encoder myEncoder                        =    Encoder.Quality;
            EncoderParameters myEncoderParameters    =    new EncoderParameters(1);
            EncoderParameter myEncoderParameter      =    new EncoderParameter(myEncoder, imageQuality);
            myEncoderParameters.Param[0]             =    myEncoderParameter;
            float xWidth                             =    sourceImage.Width / xNum;
            float yWidth                             =    sourceImage.Height / yNum;
            String outputImage                       =    "";
           
            for (int countY = 0; countY < yNum; countY++)
                for (int countX = 0; countX < xNum; countX++)
                {

07
2015
07

国外网站搜索引擎和目录提交入口

国内的网站只需提交到谷歌、百度、搜狗、有道等几个搜索引擎和几个网站目录就可以了。
 

网上整理的搜索引擎提交入口
 
google.com
http://www.google.com/addurl/?continue=/addurl

yahoo.com
http://siteexplorer.search.yahoo.com/submit

01
2015
07

Aspose.Total for .NET 2015 - Unlimited License 注册码

 

 

网上看到的,还没验证过呢、

 

 

How to license Aspose.Total for .NET products
Add
"License.cs" [C#] OR
"License.vb" [Visual Basic] to your application
License.cs
Code:
using System;
using System.IO;
namespace LicenseHelper
{   
    public static class License
    {       
        public const string Key =
            "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" +
            "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc2UuY2" +
            "9tPC9FbWFpbFRvPg0KICAgIDxMaWNlbnNlVHlwZT5EZXZlbG9wZXIgT0VNPC9MaWNlbnNlV" +
            "HlwZT4NCiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1p" +
            "dGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+DQogICAgPE9yZGVySUQ+MTQ" +
            "wNDA4MDUyMzI0PC9PcmRlcklEPg0KICAgIDxVc2VySUQ+OTQyMzY8L1VzZXJJRD4NCiAgIC" +
            "A8T0VNPlRoaXMgaXMgYSByZWRpc3RyaWJ1dGFibGUgbGljZW5zZTwvT0VNPg0KICAgIDxQc" +
            "m9kdWN0cz4NCiAgICAgIDxQcm9kdWN0PkFzcG9zZS5Ub3RhbCBmb3IgLk5FVDwvUHJvZHVj" +
            "dD4NCiAgICA8L1Byb2R1Y3RzPg0KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl" +
            "0aW9uVHlwZT4NCiAgICA8U2VyaWFsTnVtYmVyPjlhNTk1NDdjLTQxZjAtNDI4Yi1iYTcyLT" +
            "djNDM2OGYxNTFkNzwvU2VyaWFsTnVtYmVyPg0KICAgIDxTdWJzY3JpcHRpb25FeHBpcnk+M" +
            "jAxNTEyMzE8L1N1YnNjcmlwdGlvbkV4cGlyeT4NCiAgICA8TGljZW5zZVZlcnNpb24+My4w" +
            "PC9MaWNlbnNlVmVyc2lvbj4NCiAgICA8TGljZW5zZUluc3RydWN0aW9ucz5odHRwOi8vd3d" +
            "3LmFzcG9zZS5jb20vY29ycG9yYXRlL3B1cmNoYXNlL2xpY2Vuc2UtaW5zdHJ1Y3Rpb25zLm" +
            "FzcHg8L0xpY2Vuc2VJbnN0cnVjdGlvbnM+DQogIDwvRGF0YT4NCiAgPFNpZ25hdHVyZT5GT" +
            "zNQSHNibGdEdDhGNTlzTVQxbDFhbXlpOXFrMlY2RThkUWtJUDdMZFRKU3hEaWJORUZ1MXpP" +
            "aW5RYnFGZkt2L3J1dHR2Y3hvUk9rYzF0VWUwRHRPNmNQMVpmNkowVmVtZ1NZOGkvTFpFQ1R" +
            "Hc3pScUpWUVJaME1vVm5CaHVQQUprNWVsaTdmaFZjRjhoV2QzRTRYUTNMemZtSkN1YWoyTk" +
            "V0ZVJpNUhyZmc9PC9TaWduYXR1cmU+DQo8L0xpY2Vuc2U+";
        public static Stream LStream = (Stream)new MemoryStream(Convert.FromBase64String(LicenseHelper.License.Key));
               
    }
}
License.vb
Code:
Imports System
Imports System.IO
Namespace LicenseHelper
    Public Class License
        Public Const Key As String =
            "PExpY2Vuc2U+DQogIDxEYXRhPg0KICAgIDxMaWNlbnNlZFRvPkFzcG9zZSBTY290bGFuZCB" +
            "UZWFtPC9MaWNlbnNlZFRvPg0KICAgIDxFbWFpbFRvPmJpbGx5Lmx1bmRpZUBhc3Bvc2UuY2" +
            "9tPC9FbWFpbFRvPg0KICAgIDxMaWNlbnNlVHlwZT5EZXZlbG9wZXIgT0VNPC9MaWNlbnNlV" +
            "HlwZT4NCiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1p" +
            "dGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+DQogICAgPE9yZGVySUQ+MTQ" +
            "wNDA4MDUyMzI0PC9PcmRlcklEPg0KICAgIDxVc2VySUQ+OTQyMzY8L1VzZXJJRD4NCiAgIC" +
            "A8T0VNPlRoaXMgaXMgYSByZWRpc3RyaWJ1dGFibGUgbGljZW5zZTwvT0VNPg0KICAgIDxQc" +
            "m9kdWN0cz4NCiAgICAgIDxQcm9kdWN0PkFzcG9zZS5Ub3RhbCBmb3IgLk5FVDwvUHJvZHVj" +
            "dD4NCiAgICA8L1Byb2R1Y3RzPg0KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl" +
            "0aW9uVHlwZT4NCiAgICA8U2VyaWFsTnVtYmVyPjlhNTk1NDdjLTQxZjAtNDI4Yi1iYTcyLT" +
            "djNDM2OGYxNTFkNzwvU2VyaWFsTnVtYmVyPg0KICAgIDxTdWJzY3JpcHRpb25FeHBpcnk+M" +
            "jAxNTEyMzE8L1N1YnNjcmlwdGlvbkV4cGlyeT4NCiAgICA8TGljZW5zZVZlcnNpb24+My4w" +
            "PC9MaWNlbnNlVmVyc2lvbj4NCiAgICA8TGljZW5zZUluc3RydWN0aW9ucz5odHRwOi8vd3d" +
            "3LmFzcG9zZS5jb20vY29ycG9yYXRlL3B1cmNoYXNlL2xpY2Vuc2UtaW5zdHJ1Y3Rpb25zLm" +
            "FzcHg8L0xpY2Vuc2VJbnN0cnVjdGlvbnM+DQogIDwvRGF0YT4NCiAgPFNpZ25hdHVyZT5GT" +
            "zNQSHNibGdEdDhGNTlzTVQxbDFhbXlpOXFrMlY2RThkUWtJUDdMZFRKU3hEaWJORUZ1MXpP" +
            "aW5RYnFGZkt2L3J1dHR2Y3hvUk9rYzF0VWUwRHRPNmNQMVpmNkowVmVtZ1NZOGkvTFpFQ1R" +
            "Hc3pScUpWUVJaME1vVm5CaHVQQUprNWVsaTdmaFZjRjhoV2QzRTRYUTNMemZtSkN1YWoyTk" +
            "V0ZVJpNUhyZmc9PC9TaWduYXR1cmU+DQo8L0xpY2Vuc2U+"
        Public Shared LStream As Stream = New MemoryStream(Convert.FromBase64String(LicenseHelper.License.Key))
    End Class
End Namespace

23
2015
06

国内的广告推广网站

 除了百度联盟,一直在寻找其他的广告联盟,有一下几个

 

  1. 聚效广告

    http://juxiao.mediav.com/

  2. 网易联盟

    http://union.163.com/

08
2015
06

telerik的RadGrid控件列合并的方法

 

方法1 : 采用  GridTemplateColumn 添加 HeaderTemplate

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AutoGenerateColumns="false">
  <MasterTableView>
    <Columns>
      <telerik:GridBoundColumn HeaderText="ContactName" DataField="ContactName" UniqueName="ContactName">
      </telerik:GridBoundColumn>
      <telerik:GridTemplateColumn UniqueName="TemplateColumn">
        <HeaderTemplate>
          <table id="Table1" cellspacing="1" cellpadding="1" width="300" border="1">
            <tr>
              <td colspan="2" align="center">
                <b>Address</b>
              </td>
            </tr>
            <tr>
              <td width="50%">
                <b>City</b>
              </td>
              <td width="50%">
                <b>Postal code</b>
              </td>
            </tr>
          </table>
        </HeaderTemplate>
        <ItemTemplate>
          <table id="Table2" cellspacing="1" cellpadding="1" width="300" border="1">
            <tr>
              <td width="50%">
                <%# DataBinder.Eval(Container.DataItem"City") %>
              </td>
              <td width="50%">
                <%# DataBinder.Eval(Container.DataItem"PostalCode") %>
              </td>
            </tr>
          </table>
        </ItemTemplate>
      </telerik:GridTemplateColumn>
    </Columns>
  </MasterTableView>
</telerik:RadGrid> 

30
2015
05

telerik控件RadGrid分组后无法折叠问题

 一个页面里面放了 一个 telerik 的 RadComboBox ,并且是复选模式;

        <telerik:RadComboBox ID="cbxState" AutoPostBack="true" Enabled="true" CheckedItemsTexts="DisplayAllInInput" DropDownAutoWidth="Disabled" MaxHeight="300"
                                        Localization-CheckAllString="全选" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" Width="160px" OnSelectedIndexChanged="ddlMine_SelectedIndexChanged">
       </telerik:RadComboBox>

26
2015
04

SQL Server 科学计数法问题

 

在 SQL Server中建表时候 ,如果是用 [real] 类型, 数字大时会自动转换为科学记数法显示, 如果类型为 float,或 decimal(38,2) 时不会自动转换科学计数法。