Bài đăng

Nổi bật

Một số kỹ năng cơ bản cần biết cho người mới học để có thể lập trình 1 website

     Bạn là người mới tập tành bước vào lập trình 1 website mà không biết phải học thế nào, bắt đầu từ đâu hoặc học khóa nào.      Bây giờ trên mạng rất nhiều chỗ dạy học, nhưng nếu bạn muốn tự học thì tôi thấy vẫn được mà không cần phải đi học :)        Không dài dòng, thẳng vào luôn   Học html cơ bản : cái này là khung chính để làm web, hiện ra cho người dùng thấy web mình như thế nào.  Tham khảo tại đây: https://www.w3schools.com/html/default.asp  Trang này mình thường hay sử dụng nhất từ thời đi học tới nay   Css cơ bản : dùng để bóp, uốn, thay đổi định dạng html ở bước 1   Màu mè website, thay đổi vị trí các box ...  Tham khảo tại đây: https://www.w3schools.com/css/default.asp Và cuối cùng là học 1 món code trên server là PHP, ASP NET, PYTHON, ..... Và tại https://www.w3schools.com/ nó cũng có phần hướng dẫn cơ bản luôn. Bạn nào cần hỏi gì thi cứ comment hoặc email

Hướng dẫn cơ bản tạo file ảnh Docker sql server , attach database

Run cmd Pull base image from MS: $docker pull microsoft/mssql-server-windows Cd to folder contain db files (.mdf, ldf), ex: App_Data folder, should be copy DB file to others folder to easy using it Create Dockerfile(file with no extension) in DB folder with content # using vNext image FROM microsoft/mssql-server-windows # create directory within SQL container for database files RUN powershell -Command (mkdir C:\\SQLServer) #copy the database files from host to container COPY docker_test.mdf C:\\SQLServer COPY docker_test_log.ldf C:\\SQLServer # set environment variables ENV sa_password=sa!123 ENV ACCEPT_EULA=Y ENV attach_dbs="[{'dbName':'docker_test','dbFiles':['C:\\SQLServer\\docker_test.mdf','C:\\SQLServer\\docker_test_log.ldf']}]" $docker build -t demo-db . at db folder to build sqldb image $docker run -d -p 1433:1433 --name demo-db-container demo-db to run a containers of...

Hướng dẫn cơ bản dùng ReactJs server-side rendering với MVC 4&5

ReactJs Server-Side Rendering MVC 4&5 hay nói dễ hiểu hơn là dùng ReactJs để load dữ liệu từ server tức html được load cùng 1 lần lúc khởi tạo chứ không phải từ javascript sau khi trang tải xong. Các bước thực hiện như sau: Mở file App_Start\ReactConfig.cs (ASP.NET MVC 4 or 5) hoặc Startup.cs (for ASP.NET Core) để khởi tạo file code cho component của mình: namespace MyHelloApp {    public static class ReactConfig    {        public static void Configure()        {            ReactSiteConfiguration.Configuration = new ReactSiteConfiguration()                .AddScript("~/Scripts/Hello.jsx");        }    } } Dòng này sẽ báo cho server biết là chúng ta sẽ load file js này từ server. Nếu bạn có n...

Tạo docker file cho Node JS web app

Mở WINDOW => Di chuyển tới folder chứa code của ứng dụng web Tạo Dockerfile với nội dung: FROM node:4-onbuild # replace this with your application's default port EXPOSE 1337 Thêm trong package.json: "scripts": {    "start": "node server.js"  }       server.js: đây là file để bắt đầu chạy web theo IP       Dùng lệnh Docker tạo Image và Container, lấy IP của Container và chạy web (xem tại đây: https://tuannguyen-profile.blogspot.com/2017/11/cac-lenh-thuong-dung-cho-docker-nen-biet.html)

Các lệnh thường dùng cho Docker nên biết

Chạy app bởi docker: $ docker run Kiểm tra phiên bản Docker: $ docker --version Remove image: docker rmi <IMAGE-ID/IMAGE-NAME> Remove container: docker rm -f <CONTAINER-ID/CONTAINER-NAME> Run Dockerfile: docker build -t <IMAGE-NAME> Run container: docker run -d -p … docker run -d -p 1433:1433 --name demo-db-container demo-db docker run -d -p 8000:80 --name demo-web-container demo-web Run powershell inside container: docker exec -it <CONTAINER-ID> powershell Tag/push image to docker hub: docker tag …, docker push ...

Hướng dẫn cơ bản tạo Docker chứa ASP net web app không có Database

Create web app Public web app to a folder Using cmd or powershell to move to public folder At this folder: Create Dockerfile (file with no extension) with content: # The `FROM` instruction specifies the base image. You are # extending the `microsoft/aspnet` image. FROM microsoft/aspnet # Next, this Dockerfile creates a directory for your application RUN md C:\mvcwebappdb # configure the new site in IIS. RUN powershell -NoProfile -Command \    Import-module IISAdministration; \    New-IISSite -Name "ASPNET" -PhysicalPath C:\mvcwebappdb -BindingInformation "*:8000:" # This instruction tells the container to listen on port 8001. EXPOSE 8000 # The final instruction copies the site you published earlier into the container. COPY . C:\mvcwebappdb $ docker build -t mvcwebappdb . $ docker run -d -p 8000:8000 --name mvcwebappdb-container  mvcwebappdb $ docker inspect -f "{{ .NetworkSettings.Networks.nat.IPA...