Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 11, 2015

Lỗi Tiếng Việt khi thêm dữ liệu trong SQLServer - Wrong encoding when insert utf8 string into SQLServer

UPDATE t SET t.city_name = 'Long Hoàng Giang' FROM user t WHERE t.city_name = 'Long Hoang Giang'; Then when you select the result will like this 'Long Ho?ng Giang'. Solution: Add N character before string which you want to insert or update This bellow is correct query: UPDATE t SET t.city_name = N'Nghệ An' FROM branch_atm_trans t WHERE t.city_name = N'Nghệ an';

[Maven] How to generate java project from maven archetype

Search maven archetype from this maven reposiroty: https://maven-repository.com/ Create new bat file generate_maven_project.cmd. Then paste this code: @echo off echo -------------- PROJECT ------------------------ set /p "groupId=Enter your project package: " set /p "artifactId=Enter project artifactId: " set /p "version=Enter project version: " echo -------------- ARCHETYPE ------------------------ set /p "archetypeGroupId=Enter archetypeGroupId: " set /p "archetypeArtifactId=Enter archetypeArtifactId: " set /p "archetypeVersion=Enter archetypeVersion: " echo Start generate project .... pushd "%~dp0" mvn archetype:generate -DinteractiveMode=false -DgroupId=%groupId% -DartifactId=%artifactId% -Dversion=%version% -DarchetypeGroupId=%archetypeGroupId% -DarchetypeArtifactId=%archetypeArtifactId% -DarchetypeVersion=%archetypeVersion% pause Now run file generate_maven_project.cmd by double click in this file.