sokaoti.com
北京同城必应科技有限公司5月招聘面试题78道2020522

When you meet a group of people, it is better to remember __

A. all their names B. a couple of names first

C. just their last names D. as many names as possible


正确答案:B


关于group by 以下语句正确的是( )

A.SELECT store_name FROM Store_Information GROUP BY store_name

B. SELECT SUM(sales) FROM Store_Information GROUP BY sales

C.SELECT store_name, price SUM(sales) FROM Store_Information GROUP BY store_name,price

D.SELECT store_name, SUM(sales) FROM Store_Information GROUP BY store_name


正确答案:D,C,B 


What are the components of Chinese names?

A、Given name and middle names

B、Family name

C、Family name and given name

D、Last name and surname


参考答案:C


Your network consists of a single Active Directory domain.The domain contains more than 300 group objects. The group objects are divided between several regional organizational units (OUs).You need to create a list of all groups that have names that begin with the word Sales.Which command should you use? ()

A. Dsget group

B. Dsquery group

C. Netdom query

D. Net group


参考答案:B


阅读下列函数说明和C++代码,将应填入(n)处的字句写在对应栏内。

[说明]

在一些大型系统中,大多数的功能在初始化时要花费很多时间,如果在启动的时候,所有功能(包括不用的功能)都要全面初始化的话,会导致应用软件要花很多时间才能启动。因此常将程序设计成到了实际要使用某种功能的阶段才初始化该功能。

以下示例展示了Proxy(代理)模式,PrinterProxy类执行一些比较“轻”的方法,需要真正执行“重”的方法时才初始化Print类。图5-1显示了各个类间的关系。

[图5-1]

[C++代码]

class Printable{

public:

virtual void setPrinterName(string name)=0;

virtual string getprinterName()=0;

virtual void print(string name)=0;

};

class Printer:public Printable{

private:

string name;

public:

Printer(string name){

cout<<"正在产生Printer的对象实例"<<endl;

this->name=name;

}

void setPrinterName(string name){

this->name=name;

}

string getPrinterName(){

return name;

}

void print(string msg){

cout<<"======="<<name<<"==========="<<endl;

cout<<msg<<endl;

}

};

class printerproxy :public (1) {

private:

String name;

Printer *real;

public:

PrinterProxy(string name){

(2)=NULL;

this->name=name;

}

void setPrinterName(string name){

if((3))real->setPrinterName(name);

this->name=name;

}

string getPrinterName(){

return name;

}

void print(string msg){

(4);

real->print(msg);

}

void realize(){

if(real==NULL)real=(5);

}

};

(1)


正确答案:Printable
Printable


北京同城必应科技有限公司5月招聘面试题面试题面试官常问到的一些题目整理如下:问题 Q1:列表的扁平化和降维?比如有一个二维列表,降成普通的一维的。如:groups = huahua, xiaojian, musen, yuze, keyou得到结果 huahua, xiaojian, musen, yuze, keyou可用的回答 : 方法一:最简单的方式可以通过 for 循环的方式一一提取: names = for group in groups: for name in group: names.append(name) print(names) 方法二:但是在面试的时候可能会加一些限制,比如让你用一行代码实现 这个时候就需要对 python 基础有进一步的理解了,比如说使用 sum 函数: names = sum(groups, ) 方法三:通过列表推导式也可以方便的解决: a = e for group in groups for e in group 问题 Q2:什么是python模块?Python中有哪些常用的内置模块?可用的回答 :Python模块是包含Python代码的.py文件。此代码可以是函数类或变量。一些常用的内置模块包括:sys、math、os、re、random、time,datatime、json等问题 Q3:什么是猴子补丁?可用的回答 :在运行时动态修改类和模块问题 Q4: scrapy分为几个组成部分?分别有什么作用?可用的回答 : 分为5个部分; 1. Spiders(爬虫类) 2. Scrapy Engine(引擎) 3. Scheduler(调度器) 4. Downloader(下载器) 5. Item Pipeline(处理管道) 具体来说: Spiders:开发者自定义的一个类,用来解析网页并抓取指定url返回的内容。 Scrapy Engine:控制整个系统的数据处理流程,并进行事务处理的触发。 Scheduler:接收Engine发出的requests,并将这些requests放入到处理列队中,以便之后engine需要时再提供。 Download:抓取网页信息提供给engine,进而转发至Spiders。 Item Pipeline:负责处理Spiders类提取之后的数据。 比如清理HTML数据、验证爬取的数据(检查item包含某些字段)、查重(并丢弃)、将爬取结果保存到数据库中 问题 Q5:描述一下scrapy框架的运行机制?可用的回答 : 从start_urls里面获取第一批url发送请求,请求由请求引擎给调度器入请求对列,获取完毕后, 调度器将请求对列交给下载器去获取请求对应的响应资源,并将响应交给自己编写的解析方法做提取处理,如 果提取出需要的数据,则交给管道处理,如果提取出url,则继续执行之前的步骤,直到多列里没有请求,程序结束。 问题 Q6:列举面向对象中带双下划线的魔术方法可用的回答 : _doc_ 表示类的描述信息 _module_ 表示当前操作的对象在哪个模块 _class_ 表示当前操作的对象的类是什么 _init_ 构造方法,通过类创建对象时,自动触发执行 _new_负责创建一个类的对象 _del_ 析构方法,当对象在内存中被释放时,自动触发执行 _call_ 对象后面加括号,触发执行 _dict_ 类或对象中的所有成员 _str_如果一个类中定义了_str_方法,那么在打印 对象 时,默认输出该方法的返回 问题 Q7:如何在Python中内存管理?可用的回答 :Python内存由Python私有堆空间管理。 所有Python对象和数据结构都位于私有堆中。 程序员无权访问此私有堆,解释器负责处理此私有堆。 Python对象的Python堆空间分配由Python内存管理器完成。核心API提供了一些程序员编写代码的工具。 Python还有一个内置的垃圾收集器,它可以回收所有未使用的内存并释放内存并使其可用于堆空间。问题 Q8:什么又是yield from呢?可用的回答 :简单地说,yield from generator 。实际上就是返回另外一个生成器。问题 Q9:cookie 和session 的区别?可用的回答 : 1、cookie数据存放在客户的浏览器上,session数据放在服务器上。 2、cookie不是很安全,别人可以分析存放在本地的COOKIE并进行COOKIE欺骗考虑到安全应当使用session。 3、session会在一定时间内保存在服务器上。当访问增多,会比较占用服务器的性能考虑到减轻服务器性能方面,应当使用COOKIE。 4、单个cookie保存的数据不能超过4K,很多浏览器都限制一个站点最多保存20个cookie。 5、建议: 将登陆信息等重要信息存放为SESSION 其他信息如果需要保留,可以放在COOKIE中 问题 Q10:什么又是yield from呢?可用的回答 :简单地说,yield from generator 。实际上就是返回另外一个生成器。算法题面试官常问到的一些算法题目整理如下(大概率会机考):算题题 A1:最大的子数组题目描述如下:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: -2,1,-3,4,-1,2,1,-5,4,Output: 6Explanation: 4,-1,2,1 has the largest sum = 6.Follow up:If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle.思路:O(n)这个与https:/

有如下程序:

#include<iostream>

using flamespace std;

class Name{

char name[20];

public:

Name(){

strcpy(name,“”); cout<<‘?’;

}

Name(char*fname){

strcpy(name,fname); cout<<‘?’;

}

};

int main(){

Name names[3]={Name(”张三”),Name(”李四”)};

return 0;

}

运行此程序输出符号?的个数是

A.0

B.1

C.2

D.3


正确答案:D
解析:定义了3个Name的对象,前2个定义带参数,执行第二个构造函数输出“?”,第三个定义没带参数,执行第一个构造函数也输出“?”;一共输出3个“?”,故选D)。


b.b.若需得到每种产品的名称和该产品的总库存量,则对应的查询语句为: SELECT name, SUM (quantity) FROMP, I WHERE(27)

A.P. productID=I.productID;

B.P.productID=I.productID ORDER BY name;

C.P.productID=I.productID GROUP BY name;

D.P.productID=I.productID GROUP BY name, quantity;


正确答案:C


现有两张数据表(MySQL数据库)如下:

x_pt_info x_user_info

字段 类型 长度 小数位 字段 类型 长度 小数位

user_id int 11 user_id int 11

pt_group int 11 user_name varchar 20

pt_number decimal 10 2 user_work int 1

描述一下这个SQL语句的作用:

SELECT b.user_id as user_id,b.user_name as user_name,round(sum(a.pt_number),2) as ptnum from x_pt_info a,x_user_info b where

a.user_id=b.user_id and a.pt_group=1 and b.user_work=2 group by a.user_id order by ptnum desc

另外,就你的经验,你觉得该语句是否有改进的余地,如有,请阐述。


正确答案:
 


Which two statements regarding firewall user authentication client groups are true?() (Choose two.)

A. A client group is a list of clients associated with a group.

B. A client group is a list of groups associated with a client.

C. Client groups are referenced in security policy in the same manner in which individual clients are referenced.

D. Client groups are used to simplify configuration by enabling firewall user authentication without security policy.


参考答案:B, C


下面哪一个是错误的?

A.使用len(列表名)测量元素的个数names_list=["zhangsan","lisi","wangwu"]print(len(names_list))

B.使用列表名[下标]获取列表的某个元素,例如:names_list=["zhangsan","lisi","wangwu"]print(names_list[2])

C.向列表中添加新元素有三个方法:append、extend、insert,例如:names_list=["zhangsan","lisi","wangwu"]names_list.append("zhaoliu")names_list.extend(["zhaoliu","liqi"])names_list.insert(1,"zhaoliu")print(names_list)

D.已有列表nums=[11,22,33,44,55],使用while循环遍历列表nums=[11,22,33,44,55]i=0 whilei

print(nums[i])i+=1


正确答案:D

更多 “北京同城必应科技有限公司5月招聘面试题78道2020522” 相关考题
考题 Which two are the uses of the ASM metadata backup and restore (AMBR) feature?()A、 It can be used to back up all data on ASM disks.B、 It can be used to recover the damaged ASM disk group along with the data.C、 It can be used to gather information about a preexisting ASM disk group with disk paths,disk name,failure groups,attributes templates,and alias directory structure.D、 It can be used to re-create the ASM disk group with its attributes.正确答案:C,D

考题 You are the network administrator for TestKing.com. All user accounts and groups in the domain are in the container named Users. Company naming conventions require that names of global groups begin with G_ and names of domain local groups begin with DL_. A domain local group named HRServices does not meet the requirements. The HRServices group has one global group member named G_HRUsers. The HRServices group is assigned to Allow - Full Control permission for a shared folder named HRFiles. The shard folder is located on a file server. You need to rename the HRServices group to meet the naming convention requirements. In addition, you need to ensure that user access to the HRFiles shared folder is not disrupted while you perform the procedure. What are two possible ways to achieve this goal? ()(Each correct answer presents a cplete solution. Choose two.)A、Open Active Directory Users and Computers, and then delete the existing HRServices domain local group. Create a new domain local group named DL_HRServices. Add the G_HRUsers group to the DL_HRServices group. Assign the DL_HRServices group the Allow - Full Control permission for the HRFiles shared folder.B、Open the Active Directory Users and Computers, and then change the name of the HRservices group to DL_HRServices.C、Run the following command: dsadd group CN=DL_HRServices,CN=Users,DC=testking.com,DC=com - member CN=G_HRUsers,CN=Users,DC=testking,DC=comD、Run the following command: dsmove CN=HRServices,CN=Users,DC=testking,DC=com -newname DL_HRServices正确答案:B,D

考题 阅读以下说明和Java代码,将应填入(n)处的字句写在对应栏内。[说明]在一些大型系统中,大多数的功能在初始化时要花费很多时间,如果在启动的时候,所有功能(连不用的功能)都要全面初始化的话,会连带影响到应用软件要花很多时间才能启动。因此常将程序设计成到了实际要使用某种功能的阶段才初始化该功能。以下示例展示了Proxy(代理)模式,PrinterProxy类执行一些比较“轻”的方法——设置名称和取得名称,需要真正执行“重”的方法——真正打印——时才初始Print类。图6-1显示了各个类间的关系。[图6-1][Java代码]//Printable.JavapubliC (1) Printable{public abstract void setPrinterName(String name);public abstract String getprinterName();public abstract void print(String string);}//Printer.Javapublic class Printer implements Printable{private String name;public Printer(){System.out.println("正在产生Printer的对象实例");}public Printer(String name){this.name=name;heavyJob("正在产生Printer的对象实例("+name+")");public void setPrinterName(String name){this.name=name;public String getPrinterName(){return name;public void print(String string){System.out.println("===" +name+" ====");System.out.println(string);}}//PrinterProxy.Javapublic class PrinterProxy (2) Printable{private String name;private Printer real;public PrinterProxy(){}public PrinterProxy(String name){this.name=name;}public gynchronized void setPrinterName(String name){if( (3) ){real.setPrinterName(name);}this.name=name;}public String getprinterName(){return name;}public void print(String string){(4);real.print(string);}private synchronized void realize(){//产生真正的Printer对象if(real==null){real=(5);}}}(1)正确答案:interfaceinterface

考题 多选题Which of the following statements are true when creating NETBIOS names? ()ANETBIOS names can only use alphanumeric characters.BYou can use a ’.’ in a NETBIOS name.CYou can use an ’_’ (underscore) in a NETBIOS name.DNETBIOS names must be UPPERCASEENETBIOS names can be a maximum of 32 characters正确答案:D,A解析:暂无解析

考题 单选题Examine the structure of the EMP_DEPT_VU view: Column Name Type Remarks EMPLOYEE_ID NUMBER From the EMPLOYEES table EMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES table SALARY NUMBER From the EMPLOYEES table DEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()A SELECT * FROM emp_dept_vu;B SELECT department_id, SUM(salary) FROM emp_dept_vu GROUP BY department _ id;C SELECT department_id, job_id, AVG(salary) FROM emp_dept_vu GROUP BY department _ id, job_id;D SELECT job_id, SUM(salary) FROM emp_dept_vu WHERE department_id IN (10,20) GROUP BY job_id HAVING SUM (salary) > 20000E None of the statements produce an error; all are valid.正确答案:C解析:暂无解析

考题 You are a system administrator at Company. The network includes 100 Windows 2000 Professional computers. A user named Peter wants to share a local printing device directly connected to his computer. Peter needs to share this device among three groups:  Engineering, Accounting, and Operations. Peter wants to delegate printer administration to one print administrator from each group. Each print administrator must be able to delete print jobs generated by their own group on the print device. They should not be able to delete print jobs from other groups. You want to configure Peter’s client computer to support these requirements.  What should you do? ()A、 Create a single shared printer to be used by all three groups.Allow each print administrator Manage Documents permission. B、 Create a separate shared printer for each group. For each shared printer, allow the respective      print administrator Manage Documents permission. C、 Create a single shared printer to be used by all three groups. Add the print administrator’s user      account from each group to the Power Users group on Peter’s client computer. D、 Create a separate shared printer for each group. Add the print administrator’s user account  from each group to the Power Users group on Peter’s client computer. 正确答案:B

考题 You need to display the last names of those employees who have the letter "A" as the second character in their names. Which SQL statement displays the required results? ()A、SELECT last_name FROM EMP WHERE last_ name LIKE '_A%';B、SELECT last_name FROM EMP WHERE last name ='*A%'C、SELECT last_name FROM EMP WHERE last name ='_A%';D、SELECT last_name FROM EMP WHERE last name LIKE '*A%'正确答案:A

考题 Which of the following statements are true when creating NETBIOS names? ()A、 NETBIOS names can only use alphanumeric characters.B、 You can use a ’.’ in a NETBIOS name.C、 You can use an ’_’ (underscore) in a NETBIOS name.D、 NETBIOS names must be UPPERCASEE、 NETBIOS names can be a maximum of 32 characters正确答案:B,C

考题 判断题HAVING后面的条件中可以有聚集函数,比如SUM(),AVG()等,WHERE后面的条件中也可以有聚集函数。A 对B 错正确答案:错解析:暂无解析

考题 Your network consists of a single Active Directory domain. The domain contains more than 300 group objects. The group objects are divided between several regional organizational units (OUs). You need to create a list of all groups that have names that begin with the word Sales. Which command should you use? ()A、Dsget groupB、Dsquery groupC、Netdom queryD、Net group正确答案:B