2013년 10월 16일 수요일

파일 포맷이 안 맞아서 효과음 재생이 안 될 때-(cocos2d-iphone)

파일 포맷이 안 맞아서 효과음 재생이 안 될 경우 터미널에서 아래와 같이 해당 파일의 포맷을 바꿔주면 된다.

방법:
1. 터미널을 싱행시킨다.
2. 터미널에 cd를 입력하고 효과음 파일이 들어있는 폴더를 터미널로 끌어다 놓고 enter.
3. afconvert -v -f WAVE -d LEI16 eff_sound.wav eff_sound.wav를 입력하고 enter.

끝!!!

실행이 안되던 "eff_sound.wav"를 실행이 되는 "eft_sound.wav"로 convert해준 것이다.

2013년 10월 15일 화요일

The model backing the 'DbConnection' context has changed since the database was created. Consider using Code First Migrations to update the database

Server Error in '/' Application.

The model backing the 'DbConnection' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).


해결방법
위와 같은 에러메세지가 출력되면 Global.asax.cs의 Application_Start()에 다음 코드를 추가하면 된다.

Database.SetInitializer<YourDbConnection>(null);

 
protected void Application_Start()
{
    AreaRegistration.RegisterAllAreas();

    // Use LocalDB for Entity Framework by default
    Database.DefaultConnectionFactory = new SqlConnectionFactory(@"Data Source=(localdb)\v11.0; Integrated Security=True; MultipleActiveResultSets=True");
    Database.SetInitializer<NihConnection>(null);
    RegisterGlobalFilters(GlobalFilters.Filters);
    RegisterRoutes(RouteTable.Routes);
}

2013년 10월 13일 일요일

ASP.NET MVC 5에서 VIEW 추가하는 방법(VS2013)




1. 아래 그림에서와 같이 Controller폴더에서 Right Click > Add > Scoffold...한다.















2. 팝업에서 MVC5 View를 선택하고 Add버튼을 클릭















3. View이름과 유형, 참조 모델... 등 정보를 입력하고 Add버튼을 클릭하면 View가 추가된다.