2017년 12월 19일 화요일

Xamarin 수업에서 사용하는 Visual Studio for mac이 업데이트 되면서 안드로이드 에뮬레이터의 속도가 빨라졌습니다.

기존 버전하고 다르게 Xamarin.Forms 2.5로 업데이트 되면서 에뮬의 속도도 많이 빨라졌습니다.
실제 디바이스가 있으면 좋겠지만 없어도 어느정도 테스트가 가능하게 좋아졌네요.

xCode 9.2의 경우도 다중으로 시뮬레이터를 실행할 수 있어서 아래와 같이 아이폰X과 아이폰8을 같이 비교할 수 있습니다.


2017년 12월 16일 토요일

Connect 2017 영상에 스캇 구슬리가 나오네요. 오랜만입니다.

https://channel9.msdn.com/Events/Connect/2017/K100

Xamarin과 Azure를 소개하고 있습니다.


자마린의 아버지 미겔 데 이카사
https://ko.wikipedia.org/wiki/%EB%AF%B8%EA%B2%94_%EB%8D%B0_%EC%9D%B4%EC%B9%B4%EC%82%AC


미겔 데 이카사 인터뷰 영상
https://www.youtube.com/watch?v=UuXIqeencdE

Xamarin Forms 2.5에서 추가된 아이폰 X관련 내용들입니다.

안전 영역에 대한 내용이 추가되면서 코드도 변경되었습니다.^^
아래의 주소에 자세한 내용들이 정리되어 있습니다.

https://blog.xamarin.com/making-ios-11-even-easier-xamarin-forms/


2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
using Xamarin.Forms;
namespace iPhoneX
{
public partial class ItemsPage : ContentPage
{
public ItemsPage()
{
InitializeComponent();
On<Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);
}
}
}

2017년 12월 4일 월요일

파이썬의 유명한 웹 프레임워크인 django가 2.0으로 업데이트 되었습니다.

지금 테스트 중인데 아래의 블로그에 특징이 잘 정리되어 있습니다.

http://raccoonyy.github.io/django-2-0-release-note-summary/


비주얼스튜디오코드로 편집하는 화면입니다.



모바일에 대한 지원이 강화되었습니다. 작은 화면에서 관리 페이지 보기 입니다.


교재에 업데이트될 스크립트 입니다. 버전이 올라갔지만 변경된 부분은 약간입니다.
(장고를 설치)
pip install django

(폴더를 하나 생성하고 그 폴더로 이동한다)
cd \
mkdir c:\django
cd c:\django

(웹폴더를 생성)
django-admin startproject mysite

(웹서버 기동)
python manage.py runserver

(polls앱 생성)
python manage.py startapp polls

(웹서버 기동)
python manage.py runserver

(데이터베이스 동기화)
python manage.py migrate

(polls앱 동기화 추가)
python manage.py makemigrations polls

(SQL구문 보기)
python manage.py sqlmigrate polls 0001

(동기화)
python manage.py migrate

(쉘환경에서 API연습하기)
python manage.py shell
import django
django.setup()
from polls.models import Question, Choice
from django.utils import timezone
q = Question(question_text="What?", pub_date=timezone.now())
q.save()

Question.objects.all()
quit()

(모델에 약간의 코드를 추가한 후에 다시 쉘 환경에 접속)
python manage.py shell

from polls.models import Question, Choice
Question.objects.all()

q = Question.objects.get(pk=1)
q.choice_set.all()
q.choice_set.create(choice_text='Not much', votes=0)
q.choice_set.create(choice_text='The sky', votes=0)
c = q.choice_set.create(choice_text='Just hacking', votes=0)
c.question
c = q.choice_set.filter(choice_text__startswith='Just hacking')
c.delete()
q.choice_set.all()
quit()

(views.py를 아래와 같이 작성한다.)
from django.shortcuts import render
from django.http import HttpResponse
from .models import Question
from django.template import loader

# Create your views here.
def index(request):
    latest_question_list = Question.objects.order_by('-pub_date')[:5]
    template = loader.get_template('polls/index.html')
    context = {
        'latest_question_list':latest_question_list,
    }
    return HttpResponse(template.render(context, request))

def detail(request, question_id):
    return HttpResponse("상세 보기 %s" % question_id)

def results(request, question_id):
    return HttpResponse("결과 보기 %s" % question_id)

def vote(request, question_id):
    return HttpResponse("투표 하기 %s" % question_id)


(polls폴더에 templates폴더를 만들고 다시 여기에 polls를 만들고 index.html파일을 생성한다.
c:\django/mysite/polls/templates/polls/indexhtml이 전체 경로임)
{% if latest_question_list %}
<ul>
{% for question in latest_question_list %}
    <li><a href="/polls/{{ question.id }}/">{{ question.question_text }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}



요즘 많이 들리는 RAG에 대한 멋진 정리가 있어서 공유합니다. ㅎㅎ

 작년에는 ChatGPT가 크게 유행을 했는데 올해는 Gen AI, LLM, 랭체인등이 유행하고 있습니다. ㅎㅎ  RAG라는 단어도 상당히 많이 들리고 있습니다. 멋진 정리의 링크입니다.  https://brunch.co.kr/@ywkim36/146?...