기본 콘텐츠로 건너뛰기

3월, 2018의 게시물 표시

[linux] ubuntu 16.04 메뉴, 런처 없어짐.. (hide menu, luncha...)

우분투 사용을 하다가 보면 가끔 필요 없는 프로그램 을 삭제 해야 할 때 가 있다. ex) sudo apt-get remove --purge XXXXXXX 삭제를 하고 제부팅을 하면.. 하하하하하하~~!!! 메뉴 어디갔나요?;;;;ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 멘탈이 나갈거같네요..\ 우선 아는데로 쳐보기로 합니다.. sudo apt-get install ubuntu-desktop sudo apt-get install unity-control-center sudo apt-get install unity-control-center-signon sudo apt-get install gnome-control-center-unity sudo reboot 여기서 해결이 되나요??';  저는 안되서 구글링을... Enter the following commands:- Ctrl+Alt+F1 login there with username and password WARNING! THE FOLLOWING COMMAND WILL TERMINATE YOUR ACTIVE SESSION! try: sudo service lightdm restart If restarting lightdm doesn't fix the problem, install aptitude and then install unity : sudo apt-get install aptitude sudo apt-get update && sudo aptitude -f install && sudo aptitude dist-upgrade sudo aptitude install unity Read the outputs carefully. If you do have broken dependencies, aptitude will give you the "solution" of NOT installing u

Django join 기초

장고 INNER JOIN 을 거는 법!!! 아래의 테이블 모델을 살펴보자. class Question (models.Model): question_text = models.CharField( max_length = 200 ) pub_date = models.DateTimeField( 'dat e pub lished' ) class Choice (models.Model): question = models.ForeignKey(Question , on_delete =models.CASCADE , related_name = 'choices' ) choice_text = models.CharField( max_length = 200 ) votes = models.IntegerField( default = 0 ) - Question 과 Choice 라는 2개의 모델 (테이블) 을 만들었다 - Choice 에 question 이라는 ForeignKey가 걸린 것이 보일것이다.  이것은 Choice 모델의 테이블에 "question_id" 라는 필드를 만들게 되고, 모델 설계 상,  Question : Choice = 1 : N  의 구조를 낳게 된다. - related_name 이 choices 인 것에 주목하자.  이것은 Question model 입장에서 Choice model 을 어떤식으로 명명할지에 대한 값이다. =========================================================================================== 조인은 데이터를 SELECT 할때, 기준이되는 모델에 따라 거는 방향이 다른데 아래와같이 2가지 종류가 있다. 1. Many-to-one : Choice 모델을 기준으로 Question 데이터를 불러올 경우. 요건 참 쉽