技術面試過程

     

將序列分成若干塊的輔助類 ChunkHelper

/// <summary>/// ChunkHelper 協助將序列分成若干塊。/// /// 如果 totalItemCount 是 11,chunkSize 是 5,則:/// chunk[0] 0, 1, 2, 3, 4/// chunk[1] 5, 6, 7, 8, 9/// chunk[2] 10 /// </summary> public class ChunkHelper {/// <summary>//////

linq 擴充,在查詢中使用字串運算式對結果進行排序

支援 info.A.B.C 這樣的排序運算式 /// <summary>/// 在 linq 查詢中使用字串運算式進行排序/// </summary> public static class OrderByStringExpressionExtensions {public static IOrderedQueryable<T> OrderBy<T>(this IQueryable<T> source, string

Entity framework WhereInExtension

摘自 http://www.cnblogs.com/ejiyuan/archive/2009/07/20/1527224.html public static class WhereInExtension {private static Expression<Func<TElement, bool>> BuildWhereInExpression<TElement, TValue>(Expression<Func<TElement,

工具 + 生產力類 PageLoader,以get和post方法讀取網頁, 支援代理和cookie

using System;using System.Text;using System.IO;using System.Linq;using System.Net;/// <summary>/// 工具 + 生產力類。這個類支援以get和post方法讀取網頁, 支援代理和cookie/// </summary>public class PageLoader{ public string _proxy = null; public string Proxy {

SQL順序列找出斷號

 select id from infoid-----------123567810111215(11 行受影響)方法一:select (select max(id)+1 from Info where id<a.id) as beginId,(id-1) as endIdfrom Info awherea.id>(select max(id)+1 from Info where id<a.id)beginId     endId----------- -----------4

加密和解密.net配置節

public static class ProtectConfigFileUtil{/// <summary>/// 加密配置節樣本,加密 ConnectionStrings 和 AppSettings/// </summary> [Obsolete("這個方法只是樣本")]public static void ProtectConnectionStringsAndAppSettings(HttpContext context) {

刪除sql資料庫中所有使用者表

use my_databasego--刪除外鍵約束DECLARE c1 cursor forselect 'alter table ['+ object_name(parent_obj) + '] drop constraint ['+name+']; 'from sysobjectswhere xtype = 'F'open c1declare @c1 varchar(8000)fetch next from c1 into

NHibernate陷阱:many-to-one關聯中的ghost對象

文章目錄 問題原因解決 問題NHibernate的many-to-one關聯是支援多態的(理應),然而一不留神,代碼就掉進了陷阱。考慮這個類圖,OrderLine 有一個Product屬性,同時,Product有兩個子類。這個關聯的映射: <many-to-one Name="Product" class="Product" column="ProductId" /> 接下來,要為 Food

nhibernate配置代碼

可以在 Medium Trust Level 下啟動並執行配置聲明配置節 <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" requirePermission="false"/>配置 <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">&

縮圖產生代碼:ThumbnailGenerator

// 代碼來自 http://blog.csdn.net/ojekleen/archive/2008/08/01/2754255.aspx // 有修改 public class ThumbnailGenerator { /// <summary> /// 從源映像產生縮圖 /// </summary> /// <param name="source"></param>

加密解密字串

/// <summary>/// 基於 ProtectedData 實現的加密解密字串,可以跨windows使用者使用,但是不能跨電腦使用/// </summary> public static class EncryptHelper {public static string Encrypt(string stringToEncrypt) {byte[] toEncrypt =

Linq 擴充:MinOrDefault,MaxOrDefault

namespace ExtensionMethods{using System;using System.Collections.Generic;using System.Linq;public static class IEnumerableExtensions {/// <summary>/// Invokes a transform function on each element of a sequence and returns the minimum Double

圖片自動跳轉

<script language =javascript > var curIndex=0; //時間間隔 單位毫秒 var timeInterval=1000; var arr=new

NHibernate vs Entity framework

文章目錄 nh勝出的地方ef勝出的地方 nh勝出的地方linq文法很舒服,但是hql更強大,由於沒有編譯時間檢查,甚至可以在父物件使用子物件的屬性對於select n+1問題,nh的批量抓取是個不錯的辦法nh有二級緩衝nh提供版本管理ef提供了一個設計器,有了這個設計器,ef在很多實際場合變成了關係資料的附庸,失去了ORM的本性ef勝出的地方ef構造.net對象的速度比nh快ef是MS的,背後的人力財力不是nh能比的ef在medium

表示一天中的某個時間點的 Time 結構

/// <summary>/// Time 結構表示一天中的某個時間點,精確到秒。與 DateTime 不同,Time 結構不包含日期部分。/// </summary> [Serializable]public struct Time : ISerializable, IXmlSerializable {private int _hour;private int _minute;private int _second;/// <summary>//

建立有序的guid

public static class API { /// <summary> /// 建立有序的 guid。 /// </summary> /// <returns></returns> public static Guid NewSequentialGuid() { Guid result;

Sharepoint頁面裡添加.netManaged 程式碼

在做Sharepoint門戶網站定製時候,可以利用VS整合開發工具編寫自訂功能的WebPart或利用VS在可視化環境下開發UserControl然後利用QuickPart使用者控制項封裝器來將UserControl封裝為WebPart,以這種方式來對Sharepoint門戶網站的內容進行靈活定製。也可以利Sharepoint Designer 2007對Sharepoint

[未解決]jQuery中autocomplete的source格式問題

文檔中寫的是 http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_dataoptions可是我這麼用var a = new Array();#(..).autocomplete(a);報錯 this.source is not a

SQL查詢遍曆資料方法一 [ 暫存資料表 + While迴圈]

以下以SQL Server 2000中的NorthWind資料庫中的Customers表為例,用 暫存資料表 + While迴圈 的方法, 對Customers表中的CompanyName列進行遍曆create table #temp(  id int identity(1,1),  customer nvarchar(50))declare @customer nvarchar(50)declare @n        intdeclare @rows     intselect

總頁數: 61357 1 .... 9805 9806 9807 9808 9809 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.