#include "pch.h"
#include "MainPage.xaml.h"
//추가한 include, 프로젝트 전체에서 여러번 사용하면 pch.h에 넣으면 된다.
#include <sstream>

using namespace DaumExample;

using namespace Platform;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation;

//추가한 namespace
using namespace Windows::Storage::Streams;
using namespace Windows::Data::Json;
using namespace Windows::Web::Http;
using namespace concurrency;
using namespace std;

// 빈 페이지 항목 템플릿은 http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 에 문서화되어 있습니다.

MainPage::MainPage()
{
	InitializeComponent();
	wostringstream fragment;
//https://developers.daum.net/ 에서 발급한 키값으로 변경하면 됩니다.
	wstring key = L"";
	fragment << "&apikey=" << key << "&q=" << L"서울 강북구 삼양로173길 7 농협장학관";
	HttpClient^ http = ref new HttpClient();

	auto p = http->GetAsync(ref new Uri("https://apis.daum.net/local/geo/addr2coord?output=json" + ref new String(fragment.str().c_str())));
	create_task(p).then([=](HttpResponseMessage^ httpMessage) {
		String^ message = httpMessage->Content->ToString();
		JsonValue^ val = JsonValue::Parse(message);
		auto channel = val->GetObject()->GetNamedObject("channel");
		auto item = channel->GetObject()->GetNamedArray("item");
		auto latitude = item->GetObjectAt(0)->GetNamedNumber("lat");
		auto longitude = item->GetObjectAt(0)->GetNamedNumber("lng");
	});
}
.

소고기 이력조회는 관계 법령 및 개인정보 취급방침에 따라 사용자 개인정보 보호에 최선을 다합니다. 

 

개인정보의 수집 및 이용목적

개인정보를 수집하지 않습니다.

 

개인정보의 보유 및 이용기간

개인정보를 이용하지 않습니다.

 

개인정보 수집방법

개인정보를 보유하지 않습니다.

 

개인정보의 파기 절차 및 방법

개인정보를 수집, 이용, 보유하지 않습니다.

 

개인정보 공유 및 제3자 제공

개인정보를 공유 및 제3자에게 제공하지 않습니다.

 

서비스의 제공을 위해 별도로 타사와 개인정보를 공유하거나 제공할 상황이 발생할 경우, 소고기 이력조회 '정보통신망 이용촉진 및 정보보호 등에 관한 법률'및 '소고기 이력조회  개인정보 취급방침'에 따라 사용자에게 사전에 고지하거나 동의를 받습니다.

 

연락처

최봉용: exe91@naver.com

산학협력 프로젝트로 만들게 되었다. 재작년에는 예제를 변형해서 만들었다. 그래서인지 디자인이 볼품없었다. 지금 것도 좋지만은 않지만 깔끔해지고 필요기능에 맞게 재작성되었다. RS-485 modbus통신을 하는 프로그램이다. ui는 qml로 작성되었고 로직은 c++에서 처리한다.

 

개발환경:visual studio 2013, Qt 5.4.0 for Windows 32-bit (VS 2013, 705 MB)

c++

 

 

 

대시보드 화면

여기서 실시간으로 상황을 확인할 수 있다.

 

 

log화면

처음화면에서 데이터 전송결과를 확인할 수 있지만 순간적인 기록이라 나중에 확인할 수 있게 만들었다.

 

 

세팅화면

시리얼통신 기본설정과 보낼 데이터, 로그/네트워크, 그래픽을 변경할 수 있다.

 

 

누출이 일어날 때 대시보드 화면이다.

 

 

 

저번 한국암호포럼에서 주최한 LEA 구현 경진대회를 준비하면서 블록암호를 복호화, 암호화하기 위해서는 rotate left, rotate right 필요하였다. 


그래서 열심히 찾다가

어떤분이 rotate letf를 구현해놓으셨다.

http://www.herongyang.com/Java/Bit-String-Left-Rotation-All-Bits-in-Byte-Array.html


In many applications, information must be stored and operated as bit strings. Unfortunately, Java does not provide any built-in data types or classes to support bit strings. There are several third party BitString classes that you can use to store and manage your bit strings.

대충 요약해보면 자바에서 기본적으로 제공하는 bit처리하는 클래스가 없어서 구현하였다고 한다.


setbit는 bit를 각자리에 bit를 set해주고 getbit 각자리에 bit를 구하는 것이다.

rotateleft까지 있는데 rotate right는 없어서 setbit, getbit를 통해 구현하였다.


rotateRight

 private byte[] rotateRight(byte[] in, int len, int step) {

        int numOfBytes = (len-1)/8 + 1;

        byte[] out = new byte[numOfBytes];

        int check;

        int st = step;

        for (int i=0; i<len; i++) {

            check = i - step;

            if(check < 0)

            {

                check = len - st;

                --st;

            }

            int val = getBit(in, (check)%len);

            setBit(out,i,val);

        }

        return out;

    }

카툰팩토리

 

MSP(Microsoft Student Patner)활동을 하면서 처음으로 만든 앱이다. 부족한 건 많지만 정말 많은 애정을 갖고 만든앱이다. 완성을 할 수 있을까라는 생각도 많이 가졌지만 완성을 했다. 이런 앱이 탄생하기 까지 같이 프로젝트를 함께한 기획자(+디자이너?), 개발자의 도움이 컷다.

 

스토어 주소: http://apps.microsoft.com/windows/ko-kr/app/dadd4f0f-a95c-4f16-a26f-5cb837d10eb7

 

개발환경: visual studio 2012

c# + c++(direct 2d)

 

How to add wartermark text/image to a bitmap in Windows Store app?이라는 샘플을 바탕으로 제작하였습니다.  

  

In Windows Store app, you can't use GDI/GDI+ graphics API any more. This sample will show you how to draw watermark text or image to a bitmap in D2D. The sample contains two projects: one is a C++ Windows Runtime Component which wraps D2D/DWrite/WIC API and exposes some drawing functions and helper functions; the other one is the Client app which consumes the WinRT Component to finish the real work.

 

윈도우 스토어앱에서 GDI/GDI+를 못써서 대신 c++ 컴포넌트를 사용하였다. 즉 ui부분의 c#으로 처리하고 이미지 처리 기능은 c++컨포넌트를 불러들어서 사용한다.

 

주소: http://code.msdn.microsoft.com/How-to-add-wartermark-f6313fad

 

1 스크린샷

 

마우스나 터치로 이미지나 말풍선의 위치를 지정할 수 있습니다.

 

2 스크린샷

 

4가지의 이펙트 효과를 줄 수있습니다.

 

3 스크린샷

 

4가지 이미지로 4컷 만화를 만들 수 있습니다.

+ Recent posts