一次外企QQ面試


     無憂上掛了簡歷,讓個外企的hr約好面試,今天剛面完,整理出來給大家看看。難度不是很大,基本就是Asp.net Mvc 用到的東西,沒有問數據庫方面的。

       

Part I – Frontend 
1. Try to simplify the following CSS(Cascading Style Sheet) as short as possible. (簡化一下)
background-color: #000000;
background-image: url(./img.png);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: right top;
margin-left: 10px;
margin-right: 10px;
margin-top: 5px;
margin-bottom: 5px;

---> background:##000000 url(./img.png) no-repeat fixed right top;margin:5px 10px; 

2. Try to complete the CSS code below to ensure the div is aligned center horizontally.  (讓div 居中)
  
<div style=”width:100px; float:left;” class=”exam”></div>
.exam
{
}

--> .exam{pozistion:relative;left:50%;top:50%} 

3. The return value of the “foo()” below is ____________
function foo(){
var a = 1;
function fun1(){
fun2();
var a = 2;
}
function fun2(){
a = 3;
}
fun1();
return a;
}
---> 3  一瞬間還是有點懵,定下來一看考察的是必包,回答了個3,問為什么是3,和閉包有關系嗎? 因為想了回,被問是不是拿去執行了,天地良心真沒有,反正fun1中 var a=2是無效的。
4.Try to write out the javascript to disable all the <button> elements on the current HTML page.(jQuery is welcome)
 開始寫了個 
$("button").disable();//以為有現成的,好久沒做前端的 真記不清了

  被問有這個方法嗎? 我就又寫了$("button").attr("disabled","disabled");       失效當然還有很多方法。

5.Is there any Internet site whose frontend is implemented(實施) by you ? please list them. (看你現成的作品,很汗,公司內部的看不了,有域名的就一個很簡單的,24號那天才用ftp傳了個單頁上去,這里不好意思拿出來了。這個題的教訓就是 做web的怎么能沒有自己的個人網站呢? 你是想干嘛!)
 
Part2  ASP.NET MVC Framework 
5. There are different sub-types of ActionResult in MVC,please try to list them 
   ViewResult表示HTML的頁面內容

  EmptyResult表示空白的頁面內容

  RedirectResult表示定位到另外一個URL

  JsonResult表示可以運用到AJAX程序中JSON結果

  JavaScriptResult表示一個JavaScript對象

  ContentResult表示一個文本內容

  FileContentResult表示一個可以下載的、二進制內容的文件

  FilePathResult表示一個可以下載的、指定路徑的文件

  FileStreamResult表示一個可以下載的、流式的文件

 當時只回答了四個常用的 Json Content  View(partview)  

6.which ways can be used to  pass the variable "a" to the "Index"  View .
  當時回答了 ViewData,ViewBag,Session Cookie ,然后他補充還有 TempData ,Model  額,當時有點汗,怎么把viewmodel忘了。
7.What's the difference between Html.RenderPartial and Html.RenderAction  
8.What's the difference between <%= %> and <%: %>  MVC2中的符號,表示沒用過。
9.How does MVC support asynchronous Action?
 
Part 3 .Net 
10. What is the output result of executing the "Main" methold below ?
 static void Main(string[] args)
        {
            try
            {
                new Obj1();
                using (new Obj1())
                {
                    throw new Exception();
                }
            }
            catch
            {

            }
            Console.Read();
        }

        public class Obj1:IDisposable
        {
            static Obj1()
            {
                Console.WriteLine("1");
            }

            public void Dispose()
            {
                Console.WriteLine("2");
            }
        }

 回答了“12”  問為什么,說第一次New的時候輸出1 using結束輸出“2”   結果確實是“12” 不知道解釋的對不對。

11.How to optimize the following code?

string b="a ="+ a +"\n b="+b+"\n c= "+c ;

 不怕丑的說,當時真沒看懂optimize這個單詞,僵持了一會,不知道要干嘛,瞧瞧有道了下,才想起用StringBuilder .... 汗。

12. What is the result when serializing the following "arry" variable to Json ?please write out .

  public class Obj1
        {
            public int Id { get; set; }
            public string Name { get; set; }
        }

        private Obj1[] arry = new Obj1[]
        {
            new Obj1(){Id=4,Name = "Bob"},
            new Obj1(){Id=2,Name = "Leo"}
        };

就是換成Json -->[{"ID":4,"Name":"Bob"},{"ID":2,"Name":"Leo"}] 

13 What are extension methods ?  什么是.Net的擴展方法。 當時一片空白。不知道指的什么,當然自己是用過 Lamada linq。 完全沒和概念聯系起來。- -!
14.Do you know Ioc (Inversion of control ) Or DI(Dependency Injection)? which party libraries did you use(know) for that 
    依賴注入或者控制翻轉,前端時間看面相切面編程學習過,讓我解釋下,我也說的含糊,PostSharp 企業庫 都有用到。
15.which ORM framworks have you used ?  entityfamework
16. which source-version-control system do you use?  git
17.which verison of C#(.net) do you use?     4.0 4.5
18 which agile(敏捷) software development method do you experience?    null
 

好的, 非常感謝你抽出時間來面試。所有面試題已經結束了。基本的評價是:
basic skill in frontend(HTML/CSS) development.
Don't have enough project experience
know ASP.NET MVC
basic experience in .NET,but don't have full understanding
我們會擇優錄取。
hr可能會在接下來的1-2周內聯系你。 雙向選擇嘛
--------------------------------------------------------------我是分割線---------------------------------------------------------
結束后,淡淡的憂桑,總結了下。
1.個人網站是很有必要的。
2.學習東西不能浮於表面,知其然不知其所以然,回頭再好好看書,認真理解。
3.英語單詞還是要積累積累。
 
與君共勉!
 
 
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM