Tutorial Site
https://wiki.chongtin.com/
2024-03-29T14:50:15+00:00Tutorial Site
https://wiki.chongtin.com/
https://wiki.chongtin.com/ttps://wiki.chongtin.com/lib/tpl/bootstrap3/images/favicon.icotext/html2023-02-13T15:11:16+00:00chongtin (chongtin@undisclosed.example.com)useful_commands - created
https://wiki.chongtin.com/useful_commands?do=revisions&rev=1676272276
to be written...text/html2023-02-13T15:09:20+00:00chongtin (chongtin@undisclosed.example.com)Programming - *
https://wiki.chongtin.com/start?do=revisions&rev=1676272160
Why creating this site? Mostly for myself because I forget stuff all the time, and computer science is just too much stuff need to be remembered. I think it would be good to have a place to write down some notes in case I need to do something again and forgot. Feel free to look around, and see if the ads above and below has the content you are interested in (Well, you knowtext/html2021-10-07T12:06:09+00:00chongtin (chongtin@undisclosed.example.com)Basic Websocket
https://wiki.chongtin.com/springboot/basic_websocket?do=revisions&rev=1633579569
Basic Websocket
This is going to build a STOMP based websocket on server site.
* Add dependency to POM.XML
* Add a EnableWebSocketMessageBroker configuration
* Add a controller to handle the web socket package.
Add dependency to POM.XML
Add the following in POM.XMLtext/html2021-09-29T17:17:32+00:00chongtin (chongtin@undisclosed.example.com)Redux
https://wiki.chongtin.com/reject/redux?do=revisions&rev=1632907052
Redux
* Install redux, react-redux, and update the react-dom
* Create a reducer for storing the state, and handle the dispatched task
* Create the store in index.js, and provide it to the app by <Provider...></Provider>
* Using redux in your component:text/html2021-09-24T11:44:12+00:00chongtin (chongtin@undisclosed.example.com)Check Remote Server Cert with Openssl - created
https://wiki.chongtin.com/tslcert/check_remote_server_cert_with_openssl?do=revisions&rev=1632455052
Check Remote Server Cert with Openssl
Assume the server IP is 111.111.111.111, and we are interested in its port 443.
echo | openssl s_client -showcerts -connect 111.111.111.111:443 2>/dev/null | openssl x509 -inform pem -noout -texttext/html2021-07-22T16:30:10+00:00chongtin (chongtin@undisclosed.example.com)Levenshtein Distance
https://wiki.chongtin.com/java/levenshtein_distance?do=revisions&rev=1626942610
Levenshtein Distance
Levenshtein Distance is a method to check the similarity of wo string. If the string is very similar, we will get a small value for the distance. If the two strings are completely off, we get the value of max string lenth as the distance.text/html2021-05-25T15:41:58+00:00chongtin (chongtin@undisclosed.example.com)Adding Customized Properties in Application.properties file - created
https://wiki.chongtin.com/springboot/adding_customized_properties_in_application.properties_file?do=revisions&rev=1621928518
Adding Customized Properties in Application.properties file
* In application.properties files, add your own properties such as
mypropertis.version=dev
in the empty space. Here we use mypropertis as prefix, you can use whatever you want.
* To read such value, create a class as a @Componenttext/html2021-05-13T09:31:09+00:00chongtin (chongtin@undisclosed.example.com)Using puppeteer to Capture Screenshot of a Website
https://wiki.chongtin.com/nodejs/using_puppeteer_to_capture_screenshot_of_a_website?do=revisions&rev=1620869469
Using puppeteer to Capture Screenshot of a Website
puppeteer is a tools created by Google to control the chrome/Chromium browser by script. It is useful for automatic testing website, or use it to control a headless browser. To use puppeteer to capture screenshot of a site, do:text/html2021-05-11T15:14:08+00:00chongtin (chongtin@undisclosed.example.com)Adding crt to Java cacerts - [Adding jks to Java cacerts]
https://wiki.chongtin.com/adding_crt_to_java_cacerts?do=revisions&rev=1620717248
Adding crt to Java cacerts
Adding crt file allows Java to access your self-signed ssl site without doing something like Insecurity HTTPS Connection.
Assume the location of your Java JDK is in C:\Program Files\Java\jdk1.8.0_131\. The following steps add the crt to Java key store:text/html2020-10-27T09:31:15+00:00chongtin (chongtin@undisclosed.example.com)reject:react-grid.png
https://wiki.chongtin.com/?image=reject%3Areact-grid.png&ns=reject&rev=1603762275&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/reject/react-grid.png?w=500&h=138&t=1603762275&tok=c775fa" alt="reject:react-grid.png" />text/html2020-07-29T17:44:32+00:00chongtin (chongtin@undisclosed.example.com)java:jna.png - created
https://wiki.chongtin.com/?image=java%3Ajna.png&ns=java&rev=1596015872&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/java/jna.png?w=500&h=400&t=1596015872&tok=df61e5" alt="java:jna.png" />text/html2020-07-21T10:06:20+00:00chongtin (chongtin@undisclosed.example.com)reject:react_com_life_cycle.png - created
https://wiki.chongtin.com/?image=reject%3Areact_com_life_cycle.png&ns=reject&rev=1595297180&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/reject/react_com_life_cycle.png?w=500&h=376&t=1595297180&tok=297c6b" alt="reject:react_com_life_cycle.png" />text/html2020-07-13T17:02:21+00:00chongtin (chongtin@undisclosed.example.com)reject:react_css.png - created
https://wiki.chongtin.com/?image=reject%3Areact_css.png&ns=reject&rev=1594630941&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/reject/react_css.png?w=251&h=341&t=1594630941&tok=4ede1f" alt="reject:react_css.png" />text/html2020-07-13T16:03:24+00:00chongtin (chongtin@undisclosed.example.com)reject:react_list.png - created
https://wiki.chongtin.com/?image=reject%3Areact_list.png&ns=reject&rev=1594627404&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/reject/react_list.png?w=196&h=294&t=1594627404&tok=966f58" alt="reject:react_list.png" />text/html2020-05-21T10:55:57+00:00chongtin (chongtin@undisclosed.example.com)springboot:sping_init.png - created
https://wiki.chongtin.com/?image=springboot%3Asping_init.png&ns=springboot&rev=1590029757&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/springboot/sping_init.png?w=500&h=377&t=1590029757&tok=7cd633" alt="springboot:sping_init.png" />text/html2020-01-07T08:53:00+00:00chongtin (chongtin@undisclosed.example.com)reject:react_exe1.png - created
https://wiki.chongtin.com/?image=reject%3Areact_exe1.png&ns=reject&rev=1578358380&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/reject/react_exe1.png?w=499&h=295&t=1578358380&tok=f2f930" alt="reject:react_exe1.png" />text/html2019-11-19T17:56:00+00:00chongtin (chongtin@undisclosed.example.com)ng:ng_emitter.png - created
https://wiki.chongtin.com/?image=ng%3Ang_emitter.png&ns=ng&rev=1574157360&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/ng/ng_emitter.png?w=405&h=123&t=1574157360&tok=291f84" alt="ng:ng_emitter.png" />text/html2019-11-19T16:07:50+00:00chongtin (chongtin@undisclosed.example.com)ng:ng_service.png - created
https://wiki.chongtin.com/?image=ng%3Ang_service.png&ns=ng&rev=1574150870&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/ng/ng_service.png?w=411&h=129&t=1574150870&tok=1a9c96" alt="ng:ng_service.png" />text/html2019-11-18T17:19:44+00:00chongtin (chongtin@undisclosed.example.com)ng:ngfor.png - created
https://wiki.chongtin.com/?image=ng%3Angfor.png&ns=ng&rev=1574068784&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/ng/ngfor.png?w=419&h=219&t=1574068784&tok=8ca1f1" alt="ng:ngfor.png" />text/html2019-11-18T16:58:04+00:00chongtin (chongtin@undisclosed.example.com)ng:ngclass.png - created
https://wiki.chongtin.com/?image=ng%3Angclass.png&ns=ng&rev=1574067484&tab_details=history&do=media
<img src="https://wiki.chongtin.com/_media/ng/ngclass.png?w=411&h=111&t=1574067484&tok=cc4db6" alt="ng:ngclass.png" />