• 一次外企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=”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 +"
     b="+b+"
     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.英语单词还是要积累积累。
     
    与君共勉!
     
     
     
     
  • 相关阅读:
    如何在SQLite中创建自增字段?
    Windows XP平台下编译boost[1.47及以上]
    智能指针的向下转型
    采用Boost::filesystem操作文件
    CodeSmith访问数据库
    std::string的一些操作
    PDF加入内嵌字体
    悟空和唐僧的对话
    收获和教训的一天配置ds1401
    vxworks的一个changlog
  • 原文地址:https://www.cnblogs.com/stoneniqiu/p/3341757.html
Copyright © 2020-2023  润新知