공무원 영어 어휘 기출 [2015년 경찰 1차]

 

play.google.com/store/apps/details?id=com.jwlee.quiz_voca

 

공무원영어 기출어휘 - Google Play 앱

공무원 영어 어휘 기출문제 모음입니다. 경찰공무원, 국가직공무원, 지방직공무원, 서울시공무원 기출문제를 담았습니다.

play.google.com

 

1. 다음 문장에서 obscure와 의미가 가장 가까운 것은?
[문장] The dean’s remarks made the point more obscure.
① precise ② impending
❸ unclear ④ compact

 

[해석] 학장의 발언은 요점을 더 모호하게 만들었습니다.

[어휘] obscure 모호한 unclear 불확실한 dean 학과장 remark 발언 precise 정확한 impending 절박한 compact 작은 

2. 다음 문장에서 dismayed와 의미가 가장 가까운 것은?
[문장] The prime minister was thoroughly dismayed by the lack of public support for his new project.
① dilapidated ② disseminated
③ distorted ❹ disappointed

 

[해석] 그 총리는 자신의 새 프로젝트에 대한 대중의 지지 부족에 완전히 실망했다.

[어휘] dismay 실망시키다 disappointed 실망한 prime minister 총리, 수상 thoroughly 아주 lack 결여, 부족 public support 대중 원조 dilapidated 낡은 disseminated 산재하는 distorted 왜곡된 

3. 다음 문장에서 go through와 의미가 가장 가까운 것은?
[문장] Remember to go through the pockets before you put those trousers in the washing machine
❶ search ② experience
③ study ④ use
[해석] 그 바지를 세탁기에 넣기 전에 주머니를 뒤지는 것을 기억하라.

[어휘] go through 살펴보다, 조사하다, 겪다 search 조사하다 trousers 바지 washing machine 세탁기  

4. 다음 대화에서 빈칸에 들어갈 말로 가장 적절한 것은?  
A: So what do you think about this car?

B: I don't know. (             ) I think I need something bigger.

A: No problem. Just think about it. 


① I'll go for it.
❷ I'm of two minds about it.
③ I can't afford buying this car.
④ This car is second to none. 

 

[해석]

A: 이 차에 대해 어떻게 생각하세요?

B: 모르겠습니다. (마음을 정하지 못하겠네요). 더 큰 것이 필요한 것 같아요.

A: 괜찮습니다. 생각해보세요

 

① 한 번 해 보겠습니다.

② 마음을 정하지 못하겠네요.

③ 전 이 차를 살 여력이 없습니다.

④ 이 차는 어느 차에도 뒤지지 않습니다.

[어휘] of two minds 마음을 정하지 못하는 go for it 해보다 can't afford ~할 여력이 없다 second to none 어느 것에도 뒤지지 않


6. 다음 문장에서 빈칸에 들어갈 말로 가장 적절한 것은?
A journalist pointed out that the country has progressed from oppression to (         ), creating a constitution and holding national elections. 
① colonization
② dictatorship
❸ sovereignty
④ autocracy 
[해석] 한 언론인은 그 나라가 헌법을 만들고 선거를 실시하면서 탄압에서 주권국으로 발전했다고 지적했다. 

[어휘] sovereignty 주권 journalist 기자 point out 지적하다 progress 발전하다, 진보하다 oppression 탄압, 억압 constitution 헌법, 국가 구조 hold election 선거를 실시하다 colonization 식민지화 dictatorship 독재 정권 autocracy 독재 정치 

8. 다음 문장에서 빈칸에 각각 들어갈 말로 가장 올바르게 짝지어진 것은?
Drivers are advised to ( ㉠ ) their driver's license on time as they may be required to retake the written and driving tests past the ( ㉡ ) date.
① ㉠ issue       ㉡ production
❷ ㉠ renew     ㉡ expiration
③ ㉠ revoke    ㉡ termination
④ ㉠ suspend  ㉡ manufacture
[해석] 운전 면허증은 만료일 이후에 필기 및 운전 시험을 다시 치러야 할 수 있으므로 제 시간에 운전 면허증을 갱신하는 것이 좋습니다.

[어휘] renew 갱신하다 expiration date 만료일 advise 충고하다 driver's license 운전 면허증 on time 제때에 be required to ~하라는 요구를 받다 written test 필기시험 driving test 운전면허 시험 past 지나서 issue 발행하다 revoke 취소하다 termination 종료 suspend 중단하다

9. 다음 문장에서 impetuous와 의미가 가장 가까운 것은?
[힌트] impetuous
[문장] He is a man of impetuous temperament.
❶ impulsive ② lazy
③ stubborn ④ competitive
[해석] 그는 성급한 기질을 가진 사람입니다.

[어휘] impetuous 성급한, 충동적인 temperament 기질 impulsive 충동적인 stubborn 고집 센 competitive 경쟁심이 강한 

10. 다음 두 문장의 빈칸에 공통으로 들어갈 말로 가장 적절한 것은?
The investigators say that they cannot rule (    ) the possibility of arson. \nWe sent (    ) the wedding invitations last month.
① up ② over
❸ out ④ in
[해석] 수사관들은 방화 가능성도 배제할 수 없다는 입장이다.\n우리는 지난달에 청첩장을 보냈다.
[어휘] rule out 배제하다, 제외하다 send out (청첩장 등을) 보내다 investigator 수사관 possibility 가능성 arson 방화(죄) invitation 초대 

 

play.google.com/store/apps/details?id=com.jwlee.quiz_voca

 

공무원영어 기출어휘 - Google Play 앱

공무원 영어 어휘 기출문제 모음입니다. 경찰공무원, 국가직공무원, 지방직공무원, 서울시공무원 기출문제를 담았습니다.

play.google.com

 

using System.Runtime.InteropServices;

 

[DllImport("user32.DLL",EntryPoint = "ReleaseCapture")]

private extern static void ReleaseCapture();

[DllImport("user32.DLL",EntryPoint="SendMessage")]

private extern static void SendMessage(System.IntPtr hwnd, int wmsg, int wparam, int lparam);

 

 

private void ... MoseDown ...

 

ReleaseCapture();

SendMessage(this.Handle, 0x112,0xf012,0);

TextBox 출력 라인에 제한을 두자 ( C#/.Net 4.0 ) 

  

문제상황

TextBox에 원격 장비로 부터 수신되는( COM포트 및 TCP 소켓을 통해) 모든 메시지를 출력해 주는 로그창이 있었다.  아주 많은 로그들이 창에 뿌려지고, 상황에 따라서 하루종일 이 로그메시지를 뿌리고 있을 수 있는 상황이었다. ( 물론 거의 그럴일은 없지만.. ) 메모리가 워낙 넉넉하고 가상메모리를 사용하기 때문에 OutOfMemoryException 예외가 발생할일이야 있겟나 싶어서 별다른 처리를 해주지 않았는데 고객으로 부터 요구사항이 왔다.  

 

"TextBox에 문자열 출력 중에 OutOfMemoryExeption 예외가 발생할 수 있으니, 출력 라인을 제한하고 제한 라인 수를 초과할 경우에는 오래된 라인부터 삭제하도록 해주세요." 

 

요구사항을 들었을 때는 뭐 어려울 게 있겠나 싶어서 알겠다고 그렇게 하겠다고 햇는데 구현을 위해 검토를 조금 해보니 그 당시 내가 가진 지식으로는 해결하기가 만만치 않았다.

결론적으로 내가 작성한 코드이다. 내가 격었던 이슈들 및 해결 방법을 아래에 정리한다.

 

해결 코드

    ..........

    using System.Runtime.InteropServices;

  

    public partial class SbcTransferMessageView : Form    {        [DllImport("user32.dll")]        public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);        private const int WM_SETREDRAW = 11;

 

        .............

 

        private void _Print(string message)        {            const int nLimitPrintLines = 1000;

 

            SendMessage(this.Handle, WM_SETREDRAW, false, 0);

 

            try            {                tbView.AppendText(message);

 

                if (tbView.Lines.Length >nLimitPrintLines)                {                    LinkedList<string> tempLines = new LinkedList<string>(tbView.Lines);

 

                    while ((tempLines.Count - nLimitPrintLines) >0)                    {                        tempLines.RemoveFirst();                    }

 

                    tbView.Lines = tempLines.ToArray();

 

SendMessage(this.Handle, WM_SETREDRAW, true, 0);

 

                    tbView.Select(tbView.Text.Length, 0);                    tbView.ScrollToCaret();                }

            }            finally            {                SendMessage(this.Handle, WM_SETREDRAW, true, 0);            }

        }

 

    ................

 

이슈 1 - TextBox에 출력문자열 추가 시 자동 스크롤 다운되도록 하는 방법.

 

1. TextBox.AppendText() 함수를 이용하면 자동으로 스크롤 다운되는 기능이 제공된다. 

 

2. TextBox.Text = str; 와 같이 직접 문자열을 치환하려는 경우  

 

TextBox.Select( TextBox.Text.Length, 0 ); 

TextBox.ScrollToCaret(); 

 

와 같이 하면 치환한 텍스트의 끝으로 스크롤 다운 수행한다.  

 

이슈 2 - 자동 스크롤 다운 기능 구현 시 스크롤이 깜빡거리는 문제 해결방법.  

 

결론이야 아래의 Windows API 하나를 이용하면 되는데 찾기가 어렸엇던 부분이다. 

WM_SETREDRAW 메시지는 윈도우가 일시적으로 화면 Update를 활성화/비활성화 할 수 있는 기능을 제공한다. 자세한 설명은 MSDN을 참조..

 

[DllImport("user32.dll")]public static extern int SendMessage(IntPtr hWnd, Int32 wMsg, bool wParam, Int32 lParam);

 

소스코드를 보면 SendMessage(this.Handle, WM_SETREDRAW, true, 0) 코드가 어디에 삽입되었는가가 중요하다. 잘 보면  스크롤한 후에 그리기를 활성화 해주는 것이 아니라 문자열을 치환해 준후 그리기를 활성화 해 준다. 만약 스크롤을 수행한 후 그리기를 활성화 하면 아예 아무런 문자열이 TextBox에 출력되지 않는다. 아래와 같이 하면 문자열 치환 동작과 스크롤 다운 동작이 한번에 그려짐으로 깜빡임이 제거 된다

 

tbView.Lines = tempLines.ToArray();

 

SendMessage(this.Handle, WM_SETREDRAW, true, 0);

 

tbView.Select(tbView.Text.Length, 0);tbView.ScrollToCaret();

 

이슈 3 - TextBox에 출력되는 문자열에서 앞에 라인을 잘라는주는 방법.  

  

방법은 위의 소스코드를 보면 어렵지 않게 알 수 있을 거다. 몇 가지 코멘트를 달면 아래 줄이 중요했던 것 같다.

 

처음에는 TextBox.Lines 프로퍼티를 직접 수정해서 앞에 줄을 삭제해주려했는데 TextBox.Lines는 읽기 전용으로 되어 있어서 수정이 안되었다.

 

그래서 아래와 같이 수정을 위해 LinkedList를 별도로 생성해 주었다. 이렇게 하면 O(n) ( n = TextBox.Lines.Length ) 연산이 필요하지만 어쩔 수 없는 것 같다.

 

LinkedList<string> tempLines = new LinkedList<string>(tbView.Lines); 

 

그리고 아래와 같이 필요한 라인만큼 제거를 해주는데 여기서 중요한 점은 LinkedList를 사용했다는 것이다. 일반 List 제너릭 클래스를 사용하면 내부적으로 배열을 사용하기 때문에 요소 삭제시 또 다시 O(n)의 연산을 필요로 한다. 반면 LinkedList를 사용하면 O(1)의 연산으로 삭제 연산이 처리가능하다.

 

tempLines.RemoveFirst();

 

 

use this library

compile 'devs.mulham.horizontalcalendar:horizontalcalendar:1.1.7'

and this in xml

<devs.mulham.horizontalcalendar.HorizontalCalendarView 
android:id="@+id/calendarView" 
android:layout_width="match_parent" 
android:layout_height="wrap_content" 
android:background="#FAFAFA" 
app:selectedDateBackground="#00ffffff" 
app:selectorColor="#c62828" 
app:textColorNormal="#bababa" 
app:textColorSelected="@color/blue_color" 
app:textSizeDayName="20sp" 
app:textSizeDayNumber="20sp" />

 

and here Java

 

private HorizontalCalendar horizontalCalendar;

      Calendar endDate = Calendar.getInstance();
           endDate.add(Calendar.MONTH, 1);
           Calendar startDate = Calendar.getInstance();
           startDate.add(Calendar.MONTH, -1);

           horizontalCalendar = new HorizontalCalendar.Builder(root, R.id.calendarView)
                   .startDate(startDate.getTime())
                   .endDate(endDate.getTime())
                   .datesNumberOnScreen(5)
                   .dayNameFormat("EEE")
                   .dayNumberFormat("dd")
                   .monthFormat("MMM")
                   .textSize(14f, 24f, 14f)
                   .showDayName(true)
                   .showMonthName(true)

                   .build();

           horizontalCalendar.setCalendarListener(new HorizontalCalendarListener() {
               @Override
               public void onDateSelected(Date date, int position) {
//                Toast.makeText(getContext(), DateFormat.getDateInstance().format(date) + " is selected!", Toast.LENGTH_SHORT).show();
               }

           });

 

+ Recent posts