Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[問題] 外國高級工程師的面試題

1 view
Skip to first unread message

Zukisa

unread,
Nov 16, 2009, 6:08:49 PM11/16/09
to

�o�̦��@���~�ꤽ�q�����Ťu�{�v�����D

�����D���S���H�i�H���o�X��


1. Explain in detail what is wrong with the following code-block
and provide a correct implementation:
�����H�U�{���X�����~�A�ô��ѥ��T���g�k

private string GetString()
{
string value = string.Empty;

for (int i = 0; i < 85000; i++)
value += i.ToString();

return value;
}


2. What is the significance of the value 85000 in the code-block above?
(hint: 85,000 bytes and Memory Allocation/Garbage Collection)
�W�D���� 85000 ������S�O���N�q?
(����: 85,000 bytes and Memory Allocation/Garbage Collection )


3. You have the following ASP.NET code-behind class:
�A���H�U�� ASP.NET �{���X
public partial class Page1 : Page
{
private string _value;

public Page1()
{
if (DateTime.Now.Ticks % 10 == 0)
_value = "Test";
}

~Page1()
{
if(_value.Equals("Test"))
_value = string.Empty;
}
}
You have found events in the Application event log indicating
that the ASP.NET worker process is crashing.
You determine the problem to be that in some circumstances,
accessing _value throws a NullReferenceException.
Why does this crash the ASP.NET worker process instead of showing an error
to the end-user?
�A�o�{ Application event log ���� ASP.NET �� process �|�X�{��~�C
�A�o�{���D�X�b�Y�DZ��p�U accessing _value throws a NullReferenceException�C
������o��ASP.NET �{���b�X��ɷ| crash �Ӥ��O�V�Τ���ܿ�~�T��?


4. You have identified that your ASP.NET worker process is consuming
large amounts of memory and is not releasing it.
How would you identify whether it is a native memory leak or
an issue with managed code? If you identified the issue as a problem
with managed code, what steps would you take to further isolate the issue?
(�o�D�u�����D���½�K)


5. Provide a comparison of XML and JSON including the pros and
cons of each and provide ideal uses for both.
���X XML �P JSON �����A�]�A��誺�u���I�C��C


6. Discuss some common rendering issues with Internet Explorer
(version of your choice) and provide some workarounds.
Internet Explorer (���󪩥�) �����ǧe�{�W�����D�A�ô��X�n�p��ѨM�C


7. Provide a comparison of the box model in Internet Explorer 5.5
and Internet Explorer 7.0
���X Internet Explorer 5.5 �P Internet Explorer 7.0 ���� box model �����C


8. As an ASP.NET developer, how to you see Silverlight 2.0 fitting
into the development of web applications?
�@���@�� ASPNET ���u�{�v�A�A���b�����n��}�o���ϥ� Silverlight 2.0
������ݪk�C


9. Explain why using CSS image replacement techniques (image sprites)
has better perceived performance than using individual images.
����������� CSS �Ϥ�����޳N (image sprites) �|��γ�W���Ϥ��n���ĪG�C


10. You have the following Go.gif image.
The full image dimensions are 75x40px
�A���@�� Go.gif �Ϥ��ɡC���㪺�Ϥ�j�p�� 75x40px

http://www.badongo.com/pic/7762055


The HTML for this button is
�o�ӫ��s�� HTML �O

<a id="lnkGo" href="#">Go</a>

a. Provide a CSS-only implementation of the button with a hover state
(the dark blue is the hover state)
���Ѥ@�ӳo�ӫ��s�� CSS-only implementation �P hover state
(���ӬO���ƹ���W�h�|�ܦ��`�Ŧ⪺?)

b. Provide an implementation that uses CSS for the initial state
but jQuery for the hover state
���Ѥ@�Өϥ� CSS �b�̪쪺���A�A��O�� jQuery �b hover state


11. You visited an eCommerce website, and when navigating to
a Cannon SD1000 camera, you noticed the URL was
http://www.mystore.com/ViewProduct.aspx?productId=10
�A�h�F�@�ӹq�l�ӰȪ������A��A�� Cannon SD1000 �۾��������ɡA
�o�{���}�O http://www.mystore.com/ViewProduct.aspx?productId=10


You have been asked to consult on SEO best practices.
What recommendations would you make to the site developer with regards
to his URL��s?
�A�{�b�O�t�d���o�Ӥ��q���Ըߤu�@�A�A�n����ij�o�Ӻ������u�{�v��i�L�����}?


12. You visited a website that has a menu composed of images.
You noticed that on mouse over of each image, the image flickers.
What would you recommend to the webmaster to prevent the flickering?
�A�h�F�@�Ӧ��ܦh�Ϥ�զ���menu�������C
��A��ƹ���W�h���ɭԡA�C�ӹϮ׳��|�{�{�C
�A�n����ij�������u�{�O�w��o�Ӱ���i?


13. You are managing a website that displays a (hidden)
layer on top of a number of SELECT elements.
Some users are complaining that the dropdown list is appearing on top of
the layer. Why does this occur and how would you fix it?
�A�t�d�޲z�@�Ӻ����C�o�Ӻ����b�@�� SELECT elements ���W���@�� (���ê�) �h�C
�@�ǥΤ���U�ԬO���X�{�b�o�Ӽh���W�C������|�o�ͳo�ӱ��p? �n�p��ץ�?

14. You have an unordered list with 10 elements.
The list has an ID of ��myList��. Using jQuery, how would you:
�A���@�ӨS�ƧǹL�� 10 �Ӫ��󪺦C��C�o�ӦC�? ID �O ��myList��
�C�ϥ� jQuery, �A�n���

a. Change the fore color of all even list items to red
���ܩҦ��?��ƪ�������C�⬰����
b. Indent the 5th item when the mouse hovers over it
��ƹ���W���ɭԡA Indent (�N�O�e���Ů�?) �Ĥ��Ӫ���


15. Explain some key differences between
using an ASP.NET UpdatePanel versus using either PageMethods or
web services to retrieve and populate data.
�����ϥ� ASP.NET UpdatePanel �Ψϥ� PageMethods �� web services ��������ܼƾڪ��D�n�ϧO


16. Discuss a new features of ASP.NET 3.5 Service Pack 1.
ASP.NET 3.5 Service Pack 1 �������Ƿs���\��


17. Discuss in detail a technique, as it relates to web development,
that you frequently use and feel would be beneficial
to share to a new development team.
�����A�b�����}�o����`�ϥΡA�Bı�o�����ɵ��}�o�ζ�����Ȫ��޳N

--
�� �o�H��: �����~�{(ptt.cc)
�� From: 72.53.68.197

DigiCam

unread,
Nov 17, 2009, 10:27:55 AM11/17/09
to

: �� �ޭz�mzuki326 (Zukisa)�n���ʨ��G
: : �o�̦��@���~�ꤽ�q�����Ťu�{�v�����D

: : �����D���S���H�i�H���o�X��
: : 1. Explain in detail what is wrong with the following code-block
: : and provide a correct implementation:
: : �����H�U�{���X�����~�A�ô��ѥ��T���g�k
: : private string GetString()
: : {
: : string value = string.Empty;
: : for (int i = 0; i < 85000; i++)
: : value += i.ToString();
: : return value;
: : }
: �]��String �b�y���]�p�W�q�`���O immutable ���A�ҥHString + operator
: �C���ާ@���o���ͷs��String�~��A�ӤW�����{���̨C��for loop���ͥX�Ӫ�
: �sString���F���U���ΥH�~�S����L�γ~�C�o�O�@�إi�Ȫ����O�C
: �ڷQ�쪺�Ѫk�O��new char[85000] �A��Ʀr�A�M��y�������@�w����k�i�H
: ������String�C

�A�u�n���ͤ@�� string object, �ΥL�Ӱ� num->str ���ഫ, �M�� append
to result string �Y�i�קK�L�h�� temp string �e�ΰO����.

���L�o���D�ݱo���n, ���O�̪�ı���g�k. �����? (wrong) ��ı�o.
���n��? (bad) �O�����[�I�O�S��.
�IJv���n��? ���@�w, �n�� instantiate string object �� cost ��
�A��@ num->str �� cost, ���o���n����:
num->str �]�|���� temp string, append to existing string, free temp string.
�o���n�� string library �p���@.

So no exact answer. �O�n�ҥӽ��D��?


--
�� �o�H��: �����~�{(ptt.cc)

�� From: 220.133.198.77
[1;31m�� [33mdcam [m [33m:��,�o�O.Net�����D. �ڧ�L�Q��C++���w,Sorry [m 220.133.198.77 11/17 23:27
[1;31m�� [33mdcam [m [33m:.Net�S��s. [m 220.133.198.77 11/17 23:27

0 new messages