Test vị trí lập trình viên
Số trang: 7
Loại file: doc
Dung lượng: 122.00 KB
Lượt xem: 2
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Hệ thống bài thi tuyển dụng - Bài test vị trí lập trình viên
Nội dung trích xuất từ tài liệu:
Test vị trí lập trình viên Câu lạc bộ Giám đốc nhân sự - Trụ sở: CT4.1001, Đô thị Sông Đà - Mỹ Đình, Từ Liêm, Hà Nội - Điện thoại: 04. 7855518 - Fax: 04. 7855518 - Website: www.cpoclub.net - Email: contact@cpoclub.netThời gian làm bài: 90’Họ và tên ứng viên: …………………………………… Ngày sinh: ...... / ......./ ........... Điểm:Vị trí tuyển dụng: .......................................................Ngày..….tháng…..năm….…..Địa chỉ: ......................................................................Mobile ...................................Hướng dẫn thực hiện:Bạnhãytrảlờicáccâuhỏidướiđây.Bạncóthểlàmtrựctiếpvàođềvàphầnbàilàm1. Đoạn mã này có tác dụng gì? Hãy sửa lại một số đoạn lỗi. Câu lạc bộ Giám đốc nhân sự - Trụ sở: CT4.1001, Đô thị Sông Đà - Mỹ Đình, Từ Liêm, Hà Nội - Điện thoại: 04. 7855518 - Fax: 04. 7855518 - Website: www.cpoclub.net - Email: contact@cpoclub.net function getObjectList($status, $offset = 0, $limit = 100, $orderby = ){ $qry = SELECT * FROM . $this -> tableName . (!empty($status) ? WHERE . $this -> fieldPrefix . status = $status : ) . (!empty($orderby) ? ORDER BY . $orderby : ) . LIMIT $offset, $limit; $this -> sqlLib -> query($qry); return $this -> sqlLib -> getAssoc(); } // get object list with params - if you need to specify additional params, not just status, order and limit function getObjectListWithParams($params = array(), $status, $offset = 0, $limit = 100, $orderby = ){ $qry = SELECT * FROM . $this -> tableName . WHERE . join( AND , $this -> buildFieldsArray($fields)) . (!empty($status) ? AND . $this -> fieldPrefix . status = $status : ) . (!empty($orderby) ? ORDER BY . $orderby : ) . LIMIT $offset, $limit; $this -> sqlLib -> query($qry); return $this -> sqlLib -> getAssoc(); } // delete record by given id function delete($id){ $qry = DELETE FROM . $this -> tableName . WHERE . $this -> fieldPrefix . id = $id; $this -> sqlLib -> query($qry); } // change status by given id function changeStatus($id, $status){ $qry = UPDATE . $this -> tableName . SET . $this -> fieldPrefix . status = $status; $this -> sqlLib -> query($qry); } // return error list formatted as unordered list function showErrors(){ if (!empty($this -> errors[])){ $html = ; foreach ($this -> errors as $error){ $html .= $error; } $html .= ; } return $html; } // update single field by given id function updateField($id, $field, $value){ $qry = UPDATE . $this -> tableName . SET . $field . = . (SLASH ? addslashes($value) :$value) . WHERE . $this -> fieldPrefix . id = . $id . ; $this -> sqlLib -> query($qry); } // update whole record by given id and array of field names and values function updateRecord($id, $fields){ $qry = UPDATE . $this -> tableName . SET . join( AND , $this -> buildFieldsArray($fields)) . WHERE Câu lạc bộ Giám đốc nhân sự - Trụ sở: CT4.1001, Đô thị Sông Đà - Mỹ Đình, Từ Liêm, Hà Nội - Điện thoại: 04. 7855518 - Fax: 04. 7855518 - Website: www.cpoclub.net - Email: contact@cpoclub.net . $this -> tablePrefix . id = . $id . ; $this -> sqlLib -> query($qry); } // insrt new record into database function insertRecord($fields){ $qry = INSERT INTO . $this -> tableName . SET . join( AND , $this ->buildFieldsArray($fields)); $this -> sqlLib -> query($qry); } // build array of sql statement parts from fields array function buildFieldsArray($fields){ # converts array # array(field => value, field2 => value2) => array(field=value, field2=value2); foreach ($fields as $field => $value){ $tmp_values[] = $field . = . $value . ; } return $tmp_values; } // raise record priority by given id and additional params function raisePriority($id, $params = array()){ $sql = $this -> sqlLib; #build additional query parameters - if we re-order elements for some parent element $whereClause = join( AND , $this -> buildFieldsArray($params)); # select the priority of current element $qry = SELECT . $this -> fieldPrefix . priority FROM . $this -> tableName . WHERE . $this -> fieldPrefix . id = $id; $sql -> query($qry); $item = $sql -> fetchAssoc(); #select the next element for the same parent element (if specified) $qry = SELECT . $this -> fieldPrefix . id FROM . $this -> tableName . WHERE . $this -> fieldPrefix . priority = .($item[$this -> fieldPrefix . priority] - 1). . (!empty($whereClause) ? AND . $whereClause : ); $sql -> query($qry); # if we have found the element with bigger priority, change the priorities for both of the elements if ($sql -> getRows() == 1) { $item2 = $sql -> fetchAssoc(); $qry = UPDATE . $this -> tableName . SET . $this -> fieldPrefix . priority = . $this -> fieldPre ...
Nội dung trích xuất từ tài liệu:
Test vị trí lập trình viên Câu lạc bộ Giám đốc nhân sự - Trụ sở: CT4.1001, Đô thị Sông Đà - Mỹ Đình, Từ Liêm, Hà Nội - Điện thoại: 04. 7855518 - Fax: 04. 7855518 - Website: www.cpoclub.net - Email: contact@cpoclub.netThời gian làm bài: 90’Họ và tên ứng viên: …………………………………… Ngày sinh: ...... / ......./ ........... Điểm:Vị trí tuyển dụng: .......................................................Ngày..….tháng…..năm….…..Địa chỉ: ......................................................................Mobile ...................................Hướng dẫn thực hiện:Bạnhãytrảlờicáccâuhỏidướiđây.Bạncóthểlàmtrựctiếpvàođềvàphầnbàilàm1. Đoạn mã này có tác dụng gì? Hãy sửa lại một số đoạn lỗi. Câu lạc bộ Giám đốc nhân sự - Trụ sở: CT4.1001, Đô thị Sông Đà - Mỹ Đình, Từ Liêm, Hà Nội - Điện thoại: 04. 7855518 - Fax: 04. 7855518 - Website: www.cpoclub.net - Email: contact@cpoclub.net function getObjectList($status, $offset = 0, $limit = 100, $orderby = ){ $qry = SELECT * FROM . $this -> tableName . (!empty($status) ? WHERE . $this -> fieldPrefix . status = $status : ) . (!empty($orderby) ? ORDER BY . $orderby : ) . LIMIT $offset, $limit; $this -> sqlLib -> query($qry); return $this -> sqlLib -> getAssoc(); } // get object list with params - if you need to specify additional params, not just status, order and limit function getObjectListWithParams($params = array(), $status, $offset = 0, $limit = 100, $orderby = ){ $qry = SELECT * FROM . $this -> tableName . WHERE . join( AND , $this -> buildFieldsArray($fields)) . (!empty($status) ? AND . $this -> fieldPrefix . status = $status : ) . (!empty($orderby) ? ORDER BY . $orderby : ) . LIMIT $offset, $limit; $this -> sqlLib -> query($qry); return $this -> sqlLib -> getAssoc(); } // delete record by given id function delete($id){ $qry = DELETE FROM . $this -> tableName . WHERE . $this -> fieldPrefix . id = $id; $this -> sqlLib -> query($qry); } // change status by given id function changeStatus($id, $status){ $qry = UPDATE . $this -> tableName . SET . $this -> fieldPrefix . status = $status; $this -> sqlLib -> query($qry); } // return error list formatted as unordered list function showErrors(){ if (!empty($this -> errors[])){ $html = ; foreach ($this -> errors as $error){ $html .= $error; } $html .= ; } return $html; } // update single field by given id function updateField($id, $field, $value){ $qry = UPDATE . $this -> tableName . SET . $field . = . (SLASH ? addslashes($value) :$value) . WHERE . $this -> fieldPrefix . id = . $id . ; $this -> sqlLib -> query($qry); } // update whole record by given id and array of field names and values function updateRecord($id, $fields){ $qry = UPDATE . $this -> tableName . SET . join( AND , $this -> buildFieldsArray($fields)) . WHERE Câu lạc bộ Giám đốc nhân sự - Trụ sở: CT4.1001, Đô thị Sông Đà - Mỹ Đình, Từ Liêm, Hà Nội - Điện thoại: 04. 7855518 - Fax: 04. 7855518 - Website: www.cpoclub.net - Email: contact@cpoclub.net . $this -> tablePrefix . id = . $id . ; $this -> sqlLib -> query($qry); } // insrt new record into database function insertRecord($fields){ $qry = INSERT INTO . $this -> tableName . SET . join( AND , $this ->buildFieldsArray($fields)); $this -> sqlLib -> query($qry); } // build array of sql statement parts from fields array function buildFieldsArray($fields){ # converts array # array(field => value, field2 => value2) => array(field=value, field2=value2); foreach ($fields as $field => $value){ $tmp_values[] = $field . = . $value . ; } return $tmp_values; } // raise record priority by given id and additional params function raisePriority($id, $params = array()){ $sql = $this -> sqlLib; #build additional query parameters - if we re-order elements for some parent element $whereClause = join( AND , $this -> buildFieldsArray($params)); # select the priority of current element $qry = SELECT . $this -> fieldPrefix . priority FROM . $this -> tableName . WHERE . $this -> fieldPrefix . id = $id; $sql -> query($qry); $item = $sql -> fetchAssoc(); #select the next element for the same parent element (if specified) $qry = SELECT . $this -> fieldPrefix . id FROM . $this -> tableName . WHERE . $this -> fieldPrefix . priority = .($item[$this -> fieldPrefix . priority] - 1). . (!empty($whereClause) ? AND . $whereClause : ); $sql -> query($qry); # if we have found the element with bigger priority, change the priorities for both of the elements if ($sql -> getRows() == 1) { $item2 = $sql -> fetchAssoc(); $qry = UPDATE . $this -> tableName . SET . $this -> fieldPrefix . priority = . $this -> fieldPre ...
Tìm kiếm theo từ khóa liên quan:
kinh doanh tiếp thị quản trị kinh doanh quản trị nhân sự phỏng vấn ứng viênGợi ý tài liệu liên quan:
-
Giáo trình Quản trị học: Phần 1 - PGS. TS. Trần Anh Tài
137 trang 819 12 0 -
45 trang 489 3 0
-
99 trang 411 0 0
-
Những mẹo mực để trở thành người bán hàng xuất sắc
6 trang 355 0 0 -
Báo cáo Phân tích thiết kế hệ thống - Quản lý khách sạn
26 trang 339 0 0 -
98 trang 330 0 0
-
115 trang 321 0 0
-
146 trang 321 0 0
-
Chương 2 : Các công việc chuẩn bị
30 trang 314 0 0 -
Tổ chức event cho teen - chưa nhiều ý tưởng bứt phá
3 trang 294 0 0 -
Bài giảng Quản trị nhân lực - Chương 2 Hoạch định nguồn nhân lực
29 trang 249 5 0 -
87 trang 248 0 0
-
96 trang 244 3 0
-
Hướng dẫn thực tập tốt nghiệp dành cho sinh viên đại học Ngành quản trị kinh doanh
20 trang 235 0 0 -
Bài giảng Nguyên lý Quản trị học - Chương 2 Các lý thuyết quản trị
31 trang 234 0 0 -
BÀI THU HOẠCH NHÓM MÔN QUẢN TRỊ NGUỒN NHÂN LỰC
18 trang 221 0 0 -
171 trang 216 0 0
-
Tiểu luận quản trị học - Đề tài: 'Guanxi-Nghệ thuật tạo dựng quan hệ kinh doanh'
22 trang 209 0 0 -
Bài thuyết trình nhóm: Giới thiệu cơ cấu tổ chức công ty lữ hành Saigontourist
7 trang 203 0 0 -
Đề án: Phân tích quy trình quản trị nhân sự
62 trang 201 0 0