<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>It on 村边的池塘</title>
    <link>https://jerrywang1981.github.io/tags/it/</link>
    <description>Recent content in It on 村边的池塘</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Mon, 10 Apr 2023 14:34:26 +0800</lastBuildDate>
    <atom:link href="https://jerrywang1981.github.io/tags/it/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Ctrl P to search files in fzf.vim</title>
      <link>https://jerrywang1981.github.io/post/vim/fzf-vim/</link>
      <pubDate>Mon, 10 Apr 2023 14:34:26 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/vim/fzf-vim/</guid>
      <description>configure ctrl + p to search files if in git repo, then call :GFiles, otherwise call :Files function &amp;lt;SID&amp;gt;CtrlP() let l:j1 = system(&amp;#34;git -C &amp;#34; . getcwd() . &amp;#34; rev-parse --is-inside-work-tree&amp;#34;) let l:j2 = system(&amp;#34;git -C &amp;#34; . getcwd() . &amp;#34; rev-parse --is-bare-repository&amp;#34;) if l:j1 !~ &amp;#34;true&amp;#34; &amp;amp;&amp;amp; l:j2 !~ &amp;#34;true&amp;#34; :Files else :GFiles endif endfunction nnoremap &amp;lt;silent&amp;gt; &amp;lt;C-p&amp;gt; :call &amp;lt;SID&amp;gt;CtrlP()&amp;lt;CR&amp;gt; nnoremap &amp;lt;silent&amp;gt; &amp;lt;leader&amp;gt;fb :Buffers&amp;lt;CR&amp;gt; nnoremap &amp;lt;silent&amp;gt; &amp;lt;leader&amp;gt;fh :History&amp;lt;CR&amp;gt; nnoremap &amp;lt;silent&amp;gt; &amp;lt;leader&amp;gt;fs :Rg&amp;lt;CR&amp;gt; nnoremap &amp;lt;silent&amp;gt; &amp;lt;leader&amp;gt;fS :Rg &amp;lt;c-r&amp;gt;&amp;lt;c-w&amp;gt;&amp;lt;CR&amp;gt; </description>
    </item>
    <item>
      <title>413 Request Entity Too Large</title>
      <link>https://jerrywang1981.github.io/post/k8s/413-Request-Entity-Too-Large/</link>
      <pubDate>Tue, 04 Apr 2023 16:34:00 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/k8s/413-Request-Entity-Too-Large/</guid>
      <description>Error message 413 request entity too large How to fix Nginx increase client_max_body_size&#xA;Kubenetes Ingress increase proxy-body-size&#xA;reference -&amp;gt; https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/</description>
    </item>
    <item>
      <title>Axios Error Request Body Larger Than MaxBodyLength Limit</title>
      <link>https://jerrywang1981.github.io/post/node/axios-error-Request-body-larger-than-maxBodyLength-limit/</link>
      <pubDate>Tue, 28 Mar 2023 18:52:12 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/node/axios-error-Request-body-larger-than-maxBodyLength-limit/</guid>
      <description>Axios error Request Body Larger Than MaxBodyLength Limit&#xA;solution config axios maxContentLength/maxBodyLength to a large number or Infinity&#xA;const options = { url, //method: &amp;#39;post&amp;#39;, //... maxContentLength: Infinity, maxBodyLength: Infinity, }; </description>
    </item>
    <item>
      <title>如何处理有难度的场景</title>
      <link>https://jerrywang1981.github.io/post/other/address-difficult-situation/</link>
      <pubDate>Mon, 27 Feb 2023 11:16:14 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/other/address-difficult-situation/</guid>
      <description>概述 工作中经常会遇到各种各样的困难，或者是艰难场景，如果处理不好，会对同事，工作，项目造成影响。 常见的一些类型 目标冲突 一个人给出的目标与另一个人共享的目标相冲突, 比如员工的个人职业规划和安排的工作目标有冲突。 角色冲突 当某人要执行一项不属于他们通常的角色或职责的任务时，或者当他们被</description>
    </item>
    <item>
      <title>Cacheable SSL Page Found</title>
      <link>https://jerrywang1981.github.io/post/security/Cacheable-SSL-Page-Found/</link>
      <pubDate>Mon, 27 Feb 2023 09:27:53 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/security/Cacheable-SSL-Page-Found/</guid>
      <description>Issue Cacheable SSL Page Found&#xA;Risk It is possible to gather sensitive information about the web application such as usernames, passwords, machine name and/or sensitive file locations&#xA;Cause Sensitive information might have been cached by your browser&#xA;Fix Prevent caching of SSL pages by adding &amp;ldquo;Cache-Control: no-store&amp;rdquo; and &amp;ldquo;Pragma: no-cache&amp;rdquo; headers to their responses.&#xA;Possible solution you can also change the HTTP method from GET to POST if it is NOT a page but a rest API.</description>
    </item>
    <item>
      <title>Cookie With Insecure or Improper or Missing SameSite Attribute</title>
      <link>https://jerrywang1981.github.io/post/security/Cookie-with-Insecure-or-Improper-or-Missing-SameSite-attribute/</link>
      <pubDate>Mon, 27 Feb 2023 09:15:23 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/security/Cookie-with-Insecure-or-Improper-or-Missing-SameSite-attribute/</guid>
      <description>Issue Cookie with Insecure or Improper or Missing SameSite attribute&#xA;Risk Prevent cookie information leakage by restricting cookies to first-party or same-site context, Attacks can extend to Cross-Site- Request-Forgery (CSRF) attacks if there are no additional protections in place (such as Anti-CSRF tokens).&#xA;Cause Sensitive Cookie with Improper or Insecure or Missing SameSite Attribute&#xA;Fix Review possible solutions for configuring SameSite Cookie attribute to recommended values&#xA;for K8s, you may edit the ingress configuration, set samesite value&#xA;nginx.ingress.kubernetes.io/session-cookie-samesite: &amp;#34;Strict&amp;#34; </description>
    </item>
    <item>
      <title>Blind Sql Injection</title>
      <link>https://jerrywang1981.github.io/post/node/blind-sql-injection/</link>
      <pubDate>Wed, 16 Nov 2022 09:29:06 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/node/blind-sql-injection/</guid>
      <description>Security Risk: It is possible to view, modify or delete database entries and tables&#xA;Cause: Sanitation of hazardous characters was not performed correctly on user input&#xA;Fix: Review possible solutions for hazardous character injection&#xA;Reasoning: The test result seems to indicate a vulnerability because it shows that values can be appended to parameter values, indicating that they were embedded in an SQL query. In this test, three (or sometimes four) requests are sent. The last is logically equal to the original, and the next-to-last is different. Any others are for control purposes. A comparison of the last two responses with the first (the last is similar to it, and the next-to-last is different) indicates that the application is vulnerable.&#xA;How to fix https://sequelize.org/v5/manual/raw-queries.html&#xA;make sure to &amp;lsquo;replace&amp;rsquo;/&amp;lsquo;bind&amp;rsquo;</description>
    </item>
    <item>
      <title>Golang Oauth2 Github</title>
      <link>https://jerrywang1981.github.io/post/go/golang-oauth2-github/</link>
      <pubDate>Fri, 09 Apr 2021 20:40:45 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/golang-oauth2-github/</guid>
      <description>Github Oauth2 首先，在github上申请一个Oauth App, 获取client id / secret 需要这些信息，下边的代码是放在环境变量中 AUTH_URL = os.Getenv(&amp;#34;AUTH_URL&amp;#34;) // github authorization url TOKEN_URL = os.Getenv(&amp;#34;TOKEN_URL&amp;#34;) // github token url CLIENT_ID = os.Getenv(&amp;#34;CLIENT_ID&amp;#34;) // client id CLIENT_SECRET = os.Getenv(&amp;#34;CLIENT_SECRET&amp;#34;) // client secret REDIRECT_URL = os.Getenv(&amp;#34;REDIRECT_URL&amp;#34;) // the redirect url 在包的初始化代码中，初始化 var ( oauth2Config *oauth2.Config ) init() { oauth2Config = &amp;amp;oauth2.Config{ ClientID: CLIENT_ID, ClientSecret: CLIENT_SECRET, RedirectURL: REDIRECT_URL, // Discovery returns the OAuth2 endpoints. Endpoint: oauth2.Endpoint{ AuthURL: AUTH_URL, TokenURL: TOKEN_URL, AuthStyle: oauth2.AuthStyleInHeader, }, Scopes: []string{&amp;#34;openid&amp;#34;, &amp;#34;email&amp;#34;, &amp;#34;site_admin&amp;#34;, &amp;#34;repo&amp;#34;, &amp;#34;admin:org&amp;#34;, &amp;#34;user&amp;#34;}, } Login</description>
    </item>
    <item>
      <title>Terminate Golang App</title>
      <link>https://jerrywang1981.github.io/post/go/terminate-golang-app/</link>
      <pubDate>Sat, 06 Feb 2021 16:10:08 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/terminate-golang-app/</guid>
      <description>channel to terminate 在 main.go中, 创建一个channel接收os.Signal sigChan := make(chan os.Signal, 1) // ctrl+c-&amp;gt;SIGINT, kill -9 -&amp;gt; SIGKILL signal.Notify(sigChan, syscall.SIGINT, syscall.SIGKILL) 在main.go快结束的位置，加上 &amp;lt;-sigChan log.Info(&amp;#34;exit&amp;#34;) 如果用户有发送kill -9 或者ctrl+c， 会接收到这个信号。</description>
    </item>
    <item>
      <title>Golang Cron Jobs</title>
      <link>https://jerrywang1981.github.io/post/go/golang-cron-jobs/</link>
      <pubDate>Sat, 06 Feb 2021 16:06:53 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/golang-cron-jobs/</guid>
      <description>cron in golang 在golang中，有个包github.com/robfig/cron/v3可以实现linux中类似的cron功能，使用也比较简单。 官方文档中比较详细，这里只是简单记录一下。 c := cron.New() schlTime := &amp;#34;0 2 * * ?&amp;#34; // send reminder for org members c.AddFunc(schlTime, func() { log.Info(&amp;#34;Send reminder for org member expiration job started&amp;#34;) defer func() { log.Info(&amp;#34;Send reminder for org member expiration job finished&amp;#34;) }() log.Info(&amp;#34;started to remind expired org members&amp;#34;) err = task.RemindExpiredOrgMember(14) if err !=</description>
    </item>
    <item>
      <title>Gin Jwt Middleware</title>
      <link>https://jerrywang1981.github.io/post/go/gin-jwt-middleware/</link>
      <pubDate>Sat, 06 Feb 2021 14:56:43 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/gin-jwt-middleware/</guid>
      <description>JWT in golang golang中的jwt包一般是使用 github.com/dgrijalva/jwt-go, 而且godoc中已经有些example，这里只是记录一下使用 jwt.StandardClaims的情况。 func parseToken(tokenString string) (*jwt.StandardClaims, error) { token, err := jwt.ParseWithClaims(tokenString, &amp;amp;jwt.StandardClaims{}, func(t *jwt.Token) (interface{}, error) { return jwtKey, nil }) if err != nil { log.Errorf(&amp;#34;error: %v&amp;#34;, err) return nil, fmt.Errorf(&amp;#34;failed to parse the token string: %s&amp;#34;, tokenString) } log.Printf(&amp;#34;claims: %v&amp;#34;, token.Claims) if claims, ok := token.Claims.(*jwt.StandardClaims); ok &amp;amp;&amp;amp; token.Valid { return claims, nil } else { return nil, errors.Wrap(fmt.Errorf(&amp;#34;failed to valiate the token&amp;#34;), &amp;#34;failed&amp;#34;) } }</description>
    </item>
    <item>
      <title>Liberty Profile Tls V1 Gaps</title>
      <link>https://jerrywang1981.github.io/post/java/liberty-profile-tls-v1-gaps/</link>
      <pubDate>Thu, 12 Nov 2020 19:31:52 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/java/liberty-profile-tls-v1-gaps/</guid>
      <description>Gap - TLS version 1.0/1.1 detected 如果在做security scan的时候，有这两个gap,需要修改两个地方 liberty profile server.xml add sslProtocol=&amp;quot;TLSv1.2&amp;quot; to ssl &amp;lt;ssl id=&amp;#34;defaultSSLConfig&amp;#34; sslProtocol=&amp;#34;TLSv1.2&amp;#34; keyStoreRef=&amp;#34;defaultKeyStore&amp;#34; securityLevel=&amp;#34;CUSTOM&amp;#34; enabledCiphers=&amp;#34;TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA256 &amp;#34;/&amp;gt; server.env add JVM_ARGS=-Dhttps.protocols=TLSv1.2</description>
    </item>
    <item>
      <title>React for Beginners</title>
      <link>https://jerrywang1981.github.io/post/react/react-for-beginners/</link>
      <pubDate>Fri, 25 Sep 2020 07:56:47 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/react/react-for-beginners/</guid>
      <description>Prerequesite node javascript html css es6 code editor create-react-app npm install -g create-react-app create-react-app app-name React component state class component里面管理状态使用state class Counter extends Component { state = { counter: 10, title: &amp;#34;this is demo&amp;#34;, products: [ { id: 1, name: &amp;#34;ok&amp;#34;, }, { id: 2, name: &amp;#34;bad&amp;#34;, }, ], }; // ..... other } render jsx expression attributes list/array conditional rendering handle events binding event handlers updating state event arguments passing data to component passing children debug react app props vs state raising and handle events multiple component in sync lifting state up functional component destructure arguments lifecycle hooks</description>
    </item>
    <item>
      <title>添加第三方jar到Spring Boot application</title>
      <link>https://jerrywang1981.github.io/post/java/add-third-party-jar-to-spring-boot/</link>
      <pubDate>Fri, 11 Sep 2020 15:55:30 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/java/add-third-party-jar-to-spring-boot/</guid>
      <description>背景 有时候需要添加第三方的jar包到spring boot工程中，因为不能从maven repository直接下载，所以需要包含在代码库中。 一般需要在 src/main 目录下，可以建个新目录 lib, 然后把jar文件放到这个目录下，也就是 src/main/lib下. 然后在pom.xml中需要添加 group</description>
    </item>
    <item>
      <title>Postgres 备份与恢复</title>
      <link>https://jerrywang1981.github.io/post/db/postgres-backup-and-restore/</link>
      <pubDate>Fri, 11 Sep 2020 15:14:50 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/db/postgres-backup-and-restore/</guid>
      <description>背景 有时候我们需要备份 schema或者包括数据，然后恢复到另外一个postgres db中。 备份 可以使用 pg_dump 来备份，或者加上 &amp;ndash;schema-only 只备份schema. pg_dump --file &amp;#34;/root/repo/uat-copy.tar&amp;#34; --host &amp;#34;db host name&amp;#34; --port &amp;#34;23123&amp;#34; --username &amp;#34;admin&amp;#34; --password --verbose --format=t --blobs --schema-only &amp;#34;compose&amp;#34; 恢复 同样的，可以使用pg_restore来恢复 pg_restore --host &amp;#34;hostname here&amp;#34; --port &amp;#34;31090&amp;#34; --username &amp;#34;usernamehere&amp;#34; --password --dbname &amp;#34;ibmclouddb&amp;#34; --verbose &amp;#34;/root/repo/uat-copy.tar&amp;#34; 不管备份还是恢复，都会要求输入密</description>
    </item>
    <item>
      <title>Auto Login Server Without Password</title>
      <link>https://jerrywang1981.github.io/post/linux/auto-login-server-without-password/</link>
      <pubDate>Fri, 11 Sep 2020 10:38:33 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/linux/auto-login-server-without-password/</guid>
      <description>配置方法，做个小记录 server 上要配置允许 用户电脑 在 .ssh/config 文件中 Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa Host xxx HostName xx.xx.xx.xx User jerry 把pub key传到server ssh-copy-id -i ~/.ssh/id_rsa.pub xx@xx.xx.xx.x 可以了</description>
    </item>
    <item>
      <title>Vue File Download From Spring Boot</title>
      <link>https://jerrywang1981.github.io/post/vue/file-download-from-spring-boot/</link>
      <pubDate>Thu, 10 Sep 2020 07:52:49 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/vue/file-download-from-spring-boot/</guid>
      <description>File download 如果spring boot的写法是我在另外一个文章, 返回的response其实是一个Blob, 这一点要记住 this.axios.get(url, { responseType: &amp;#39;blob&amp;#39;, timeout: 0 }).then(response =&amp;gt; { // response is Blob &amp;lt;------- const url = window.URL.createObjectURL(response) const a = document.createElement(&amp;#39;a&amp;#39;) a.style.display = &amp;#39;none&amp;#39; a.href = url a.setAttribute(&amp;#39;download&amp;#39;,&amp;#39;file.xlsx&amp;#39;) document.body.appendChild(a) a.click() document.body.removeChild(a); window.URL.revokeObjectURL(url); });</description>
    </item>
    <item>
      <title>Spring Boot File Download</title>
      <link>https://jerrywang1981.github.io/post/java/spring-boot-file-download/</link>
      <pubDate>Thu, 10 Sep 2020 07:52:13 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/java/spring-boot-file-download/</guid>
      <description>spring boot application 提供下载的代码，可以返回一个Resource @RestController @RequiredArgsConstructor @RequestMapping(&amp;#34;/api&amp;#34;) public class ReportController { @GetMapping(value = &amp;#34;/filedownload&amp;#34;) public ResponseEntity&amp;lt;InputStreamResource&amp;gt; downloadFile(HttpServletRequest request) { // ....................... // ....................... // ....................... ByteArrayInputStream stream = xxxxxx;// get the stream return ResponseEntity.ok().contentType(MediaType.APPLICATION_OCTET_STREAM) .header(HttpHeaders.CONTENT_DISPOSITION, &amp;#34;attachment; filename=file.xlsx&amp;#34;) .body(new InputStreamResource(stream)); } }</description>
    </item>
    <item>
      <title>Azure AD SAML SSO with Node Application</title>
      <link>https://jerrywang1981.github.io/post/other/azure-saml-sso-node-app/</link>
      <pubDate>Thu, 27 Aug 2020 22:05:59 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/other/azure-saml-sso-node-app/</guid>
      <description>Azure AD saml sso 代码 主要是参考文档 安装 passport-saml npm install passport-saml use passport passport.use(new SamlStrategy( { path: &amp;#39;/account/auth/blueid/callback&amp;#39;, // 这个是callback需要稍后实现 entryPoint: &amp;#39;&amp;#39;, // 这个是azure AD的一个配置, saml-based sso login url issuer: &amp;#39;cobeedev&amp;#39;, // basic saml configuration -&amp;gt; Identifier (Entity ID) cert: &amp;#39;&amp;#39;, // refer later signatureAlgorithm: &amp;#39;sha256&amp;#39; }, async function(profile, done) { // in this function, you can process profile to get necessary information console.log(profile); // lazy require const usersManagement = require(&amp;#39;../../controllers/users/usersManagement&amp;#39;); const ssoUser = jsonUtil.profile2User(profile); let dbUser = await usersManagement.getUserByAzureMail(ssoUser.email); // if user was not found in db // process the scenario if (!dbUser) { await usersManagement.processAzureSSOUser(ssoUser); dbUser = await usersManagement.getUserByAzureMail(ssoUser.email); }</description>
    </item>
    <item>
      <title>Port Forwarding - Mac</title>
      <link>https://jerrywang1981.github.io/post/other/port-forwarding/</link>
      <pubDate>Thu, 27 Aug 2020 21:27:22 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/other/port-forwarding/</guid>
      <description>Mac下端口转发 有时候要在本地起https,需要把443端口转发到8080或者其他的3000端口 ###设置转发 echo &amp;#34;rdr pass inet proto tcp from any to any port 443 -&amp;gt; 127.0.0.1 port 9443&amp;#34; | sudo pfctl -ef - 取消转发 sudo pfctl -s nat sudo pfctl -F all -f /etc/pf.conf</description>
    </item>
    <item>
      <title>Golang 中的零值</title>
      <link>https://jerrywang1981.github.io/post/go/zero-value-in-golang/</link>
      <pubDate>Tue, 18 Aug 2020 09:09:46 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/zero-value-in-golang/</guid>
      <description>zero value (零值) 在golang中，零值会在很多地方隐式的用到，所以把零值列出来。 0 所有的integer类型 (int32/int64/&amp;hellip;) 0.0 所有的float类型 (float32/float64/&amp;hellip;) false boolean类型 &amp;quot;&amp;quot; string类型， 这点要特别注意，从java过来的开发人员容易认为 nil是把 string和nil比较， 应该 str == &amp;quot;&amp;quot; ,不是 str == nil nil interface, slices,</description>
    </item>
    <item>
      <title>Golang Panic 的时候通过defer更新返回值</title>
      <link>https://jerrywang1981.github.io/post/go/golang-panic-recover-defer-update-return/</link>
      <pubDate>Mon, 17 Aug 2020 20:53:08 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/golang-panic-recover-defer-update-return/</guid>
      <description>在panic的函数中更新返回值 在golang中我们知道可以用defer, panic, recover来处理一些情况，比如，一般panic的话，如果在函数中没有处理，就会向上继续抛出 有时候，我们希望在出错的情况下，能够返回一个值。这个时候，defer就会比较好的处理这种情况。 func test() (r int) { defer func() { if</description>
    </item>
    <item>
      <title>Watson Assistant Easy Tool</title>
      <link>https://jerrywang1981.github.io/post/go/watson-assistant-easy-tool/</link>
      <pubDate>Sat, 15 Aug 2020 18:41:04 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/watson-assistant-easy-tool/</guid>
      <description>Watson assistant 根据官方文档，已经提供了sdk, 自己的这个package只是使用 官方的sdk基础上，做了小小的封闭。代码托管在github上 watson 目前只有一个assitant package,提供方法来开始一个session并且发送message从而得到结果。 使用方法也比较简单，NewSessio</description>
    </item>
    <item>
      <title>Multiple Angular Material Table Sort</title>
      <link>https://jerrywang1981.github.io/post/angular/multiple-angular-material-table-sort/</link>
      <pubDate>Tue, 04 Aug 2020 15:44:13 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/angular/multiple-angular-material-table-sort/</guid>
      <description>问题 在一个component里面，如果有多个mat-table matSort,怎么使用ViewChild 方案 使用ViewChild的时候，需要使用id @ViewChild(&amp;#39;sort1&amp;#39;) sort1: MatSort; 在页面中，需要 &amp;lt;mat-table #table [dataSource]=&amp;#34;dataSource&amp;#34; #sort1=&amp;#34;matSort&amp;#34; matSort&amp;gt;</description>
    </item>
    <item>
      <title>Angular Material Table Paginator ngIf</title>
      <link>https://jerrywang1981.github.io/post/angular/angular-material-table-paginator-ngif/</link>
      <pubDate>Tue, 04 Aug 2020 15:26:25 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/angular/angular-material-table-paginator-ngif/</guid>
      <description>问题 一般来说，按angular material的官方文档, 在afterViewInit里面 可以把paginator或者sort和dataSource绑定在一起。但是如果这个table是在ngIf里面，也就是要在条件满足的情况下。这个时候的 @ViewChild(MatPaginator) paginator: MatPaginator; 可能就不好用了。因为还没有渲染，对应</description>
    </item>
    <item>
      <title>Go Download From Private Repo in Docker</title>
      <link>https://jerrywang1981.github.io/post/go/go-download-from-private-repo-in-docker/</link>
      <pubDate>Fri, 24 Jul 2020 08:33:43 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/go-download-from-private-repo-in-docker/</guid>
      <description>问题 有时候开发的go project会用到一些私有仓库，或者自己搭的。比如用到了github.ibm.com里面的代码，如果在go.mod里面设置的 是github.ibm.com的网址的话，会发现build docker image的时候，提示access rights的问题。 方法 在你的Docke</description>
    </item>
    <item>
      <title>Go Gorm 操作数据库</title>
      <link>https://jerrywang1981.github.io/post/go/go-gorm/</link>
      <pubDate>Thu, 23 Jul 2020 08:25:59 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/go-gorm/</guid>
      <description>Go/Gorm 操作 Postgres 虽然go提供了database/sql包来操作数据库，但是如果有个ORM的包，可以直接操作model来操作数据库，就像node里面的sequelize,是不是 也是挺好的。Gorm就实现了这个功能，这个包目前是github上star数最多的go orm包，包括中文资料，对小伙</description>
    </item>
    <item>
      <title>Multiple Line in Mat Tooltip</title>
      <link>https://jerrywang1981.github.io/post/angular/multiple-line-in-mat-tooltip/</link>
      <pubDate>Wed, 24 Jun 2020 08:26:03 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/angular/multiple-line-in-mat-tooltip/</guid>
      <description>angular material matTooltip 如果想多行显示，可以把tooltip的内容用空格分开，同时样式 ::ng-deep .mat-tooltip { white-space: pre-line !important; }</description>
    </item>
    <item>
      <title>18 Matplotlib Demo</title>
      <link>https://jerrywang1981.github.io/post/python/18-matplotlib-demo/</link>
      <pubDate>Tue, 09 Jun 2020 09:08:07 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/18-matplotlib-demo/</guid>
      <description>the code in jupyter notebook matplot_demo</description>
    </item>
    <item>
      <title>17 Pandas Demo</title>
      <link>https://jerrywang1981.github.io/post/python/17-pandas-demo-2/</link>
      <pubDate>Tue, 09 Jun 2020 09:05:34 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/17-pandas-demo-2/</guid>
      <description>the code in jupyter notebook pandas_demo.ipynb</description>
    </item>
    <item>
      <title>Hugo Theme 背景图形鼠标跟随效果</title>
      <link>https://jerrywang1981.github.io/post/javascript/hugo-template-background-with-shapes/</link>
      <pubDate>Wed, 03 Jun 2020 21:30:06 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/javascript/hugo-template-background-with-shapes/</guid>
      <description>就是现在网页的背景效果，是从网上抄的 需要把文件放到个js里面，然后在foolter里面引用。 代码如下, 本质是个IIFE !function () { function n(n, e, t) { return n.getAttribute(e) || t } function e(n) { return document.getElementsByTagName(n) } function t() { var t = e(&amp;#34;script&amp;#34;), o = t.length, i = t[o - 1]; return { l: o, z: n(i, &amp;#34;zIndex&amp;#34;, -1), o: n(i, &amp;#34;opacity&amp;#34;, .5), c: n(i, &amp;#34;color&amp;#34;, &amp;#34;0,0,0&amp;#34;), n: n(i, &amp;#34;count&amp;#34;, 99) } } function o() { a = m.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, c = m.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight } function i() {</description>
    </item>
    <item>
      <title>16 Pandas Demo part 1</title>
      <link>https://jerrywang1981.github.io/post/python/16-pandas-demo-1/</link>
      <pubDate>Wed, 03 Jun 2020 16:30:03 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/16-pandas-demo-1/</guid>
      <description>the code in jupyter notebook refer to file pandas_demo.ipynb</description>
    </item>
    <item>
      <title>15 Numpy Demo</title>
      <link>https://jerrywang1981.github.io/post/python/15-numpy-demo/</link>
      <pubDate>Wed, 03 Jun 2020 16:28:51 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/15-numpy-demo/</guid>
      <description>the code in jupyter notebook the file numpy_demo.ipynb</description>
    </item>
    <item>
      <title>14 Anaconda</title>
      <link>https://jerrywang1981.github.io/post/python/14-anaconda/</link>
      <pubDate>Wed, 03 Jun 2020 16:27:28 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/14-anaconda/</guid>
      <description>How to install new package conda install xxx list env conda env list activate one env conda activate xx deactivate env conda deactivate </description>
    </item>
    <item>
      <title>13 Python Context Manager</title>
      <link>https://jerrywang1981.github.io/post/python/13-python-context-manager/</link>
      <pubDate>Sun, 31 May 2020 13:58:44 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/13-python-context-manager/</guid>
      <description>python context manager use contextlib/yield @contextmanager def send_mail_context(): &amp;#39;&amp;#39;&amp;#39;context manager with send_mail_context() &amp;#39;&amp;#39;&amp;#39; try: # 1 doing work BEFORE the code goes into with block print(&amp;#39;before yield&amp;#39;) server = smtplib.SMTP(SMTP_SERVERS[0], 25) # 2 yield back to with/caller yield server except Exception as e: print(e) finally: # 4. doing cleanup work server.quit() print(&amp;#39;in finally&amp;#39;) use class __enter__, __exit__ # 2 implement contextmanager with class class SMTPCT(object): &amp;#39;&amp;#39;&amp;#39; 1. override __enter__ __exit__ 2. in __enter__, return value &amp;#39;&amp;#39;&amp;#39; def __init__(self): self.smtp_server = None def __enter__(self): # 1 doing work BEFORE the code goes into with block print(&amp;#39;in enter&amp;#39;) self.smtp_server = smtplib.SMTP(SMTP_SERVERS[0], 25) # 2 return back to with/caller return self.smtp_server def __exit__(self, type, value, traceback): # 4. doing cleanup work print(&amp;#39;in exit&amp;#39;) self.smtp_server.quit() </description>
    </item>
    <item>
      <title>12 Python Smtp</title>
      <link>https://jerrywang1981.github.io/post/python/12-python-smtp/</link>
      <pubDate>Sun, 31 May 2020 13:52:03 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/12-python-smtp/</guid>
      <description>how to send mail in python #!/usr/bin/env python3 # -*- coding: utf-8 -*- # smtplib -&amp;gt; https://docs.python.org/3/library/smtplib.html import smtplib # contextlib -&amp;gt; https://docs.python.org/3/library/contextlib.html from contextlib import contextmanager # email -&amp;gt; https://docs.python.org/3/library/email.examples.html#email-examples from email import encoders from email.header import Header from email.mime.text import MIMEText from email.utils import parseaddr, formataddr SMTP_SERVERS = [&amp;#39;your smtp servers&amp;#39;] def _format_addr(s): &amp;#39;&amp;#39;&amp;#39; format the address &amp;#39;&amp;#39;&amp;#39; name, addr = parseaddr(s) return formataddr((Header(name, &amp;#39;utf-8&amp;#39;).encode(), addr)) def generate_mail(from_addr, to_addr, cc_addr, subject, body, mime_type=&amp;#39;plain&amp;#39;): &amp;#39;&amp;#39;&amp;#39;plain/text text/html &amp;#39;&amp;#39;&amp;#39; msg = MIMEText(body, mime_type, &amp;#39;utf-8&amp;#39;) msg[&amp;#39;From&amp;#39;] = _format_addr(from_addr) msg[&amp;#39;To&amp;#39;] = &amp;#34;,&amp;#34;.join([_format_addr(x) for x in to_addr]) msg[&amp;#39;Cc&amp;#39;] = &amp;#34;,&amp;#34;.join([_format_addr(x) for x in cc_addr]) msg[&amp;#39;Subject&amp;#39;] = Header(subject, &amp;#39;utf-8&amp;#39;).encode() return msg def send_mail(from_addr, to_addr, cc_addr, subject, body, mime_type=&amp;#39;plain&amp;#39;): server = smtplib.SMTP(SMTP_SERVERS[0], 25) server.set_debuglevel(1) msg = generate_mail(from_addr, to_addr, cc_addr, subject, body, mime_type) server.sendmail(from_addr, to_addr + cc_addr, msg.as_string()) server.quit() # 1. to implement context manager, use decorator @contextmanager # and yield @contextmanager def send_mail_context(): &amp;#39;&amp;#39;&amp;#39;context manager with send_mail_context() &amp;#39;&amp;#39;&amp;#39; try: # 1 doing work BEFORE the code goes into with block print(&amp;#39;before yield&amp;#39;) server = smtplib.</description>
    </item>
    <item>
      <title>11 Python Mro</title>
      <link>https://jerrywang1981.github.io/post/python/11-python-mro/</link>
      <pubDate>Sun, 31 May 2020 13:50:50 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/11-python-mro/</guid>
      <description>method resolution order #!/usr/bin/env python3 # -*- coding: utf-8 -*- # method resolution order # mro class A(object): def hello(self): print(&amp;#39;class A says hello&amp;#39;) class B(A): pass class C(A): # class variable BP_URL = &amp;#39;https://xxxxx&amp;#39; def __init__(self): self.name = &amp;#39;ok&amp;#39; @staticmethod def print_hello(name, age): &amp;#39;&amp;#39;&amp;#39; staticmethod cannot access any class or self variabel/method &amp;#39;&amp;#39;&amp;#39; pass @classmethod def say(cls): &amp;#39;&amp;#39;&amp;#39;class method can access class level variable/method &amp;#39;&amp;#39;&amp;#39; print(cls.BP_URL) def hello(self): print(&amp;#39;class C says hello&amp;#39;) class D(C, B): pass if __name__ == &amp;#39;__main__&amp;#39;: d = D() d.hello() # to print the mro of one class print(d.__class__.__mro__) </description>
    </item>
    <item>
      <title>10 Dunder Methods</title>
      <link>https://jerrywang1981.github.io/post/python/10-dunder-methods/</link>
      <pubDate>Sun, 31 May 2020 13:49:16 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/10-dunder-methods/</guid>
      <description>dunder methods #!/usr/bin/env python3 # -*- coding: utf-8 -*- # double underscore variable/function # dunder class A(object): def __init__(self, number): self.number = number def __eq__(self, value): &amp;#39;&amp;#39;&amp;#39; a == b &amp;#39;&amp;#39;&amp;#39; return super().__eq__(value) def __ge__(self, value): &amp;#39;&amp;#39;&amp;#39; a &amp;gt;= b &amp;#39;&amp;#39;&amp;#39; return super().__ge__(value) def __gt__(self, value): &amp;#39;&amp;#39;&amp;#39; a &amp;gt; b &amp;#39;&amp;#39;&amp;#39; return super().__gt__(value) def __le__(self, value): &amp;#39;&amp;#39;&amp;#39; a &amp;lt; b &amp;#39;&amp;#39;&amp;#39; return super().__le__(value) def __ne__(self, value): &amp;#39;&amp;#39;&amp;#39; a != b &amp;#39;&amp;#39;&amp;#39; return super().__ne__(value) def __str__(self): &amp;#39;&amp;#39;&amp;#39;print(a) &amp;#39;&amp;#39;&amp;#39; return super().__str__() def __repr__(self): return super().__repr__() def __len__(self): &amp;#39;&amp;#39;&amp;#39; len(a) &amp;#39;&amp;#39;&amp;#39; return self.number * 10 def __lt__(self, other): &amp;#39;&amp;#39;&amp;#39;less than a &amp;lt; b &amp;#39;&amp;#39;&amp;#39; return self.number &amp;lt; other.number def __getattribute__(self, name): &amp;#39;&amp;#39;&amp;#39; print(a[the_key]) &amp;#39;&amp;#39;&amp;#39; return super().__getattribute__(name) def __setattr__(self, name, value): &amp;#39;&amp;#39;&amp;#39; a[the_key] = 5 &amp;#39;&amp;#39;&amp;#39; return super().__setattr__(name, value) def __delattr__(self, name): &amp;#39;&amp;#39;&amp;#39; delete a[&amp;#39;the_key&amp;#39;] &amp;#39;&amp;#39;&amp;#39; return super().__delattr__(name) if __name__ == &amp;#39;__main__&amp;#39;: &amp;#39;&amp;#39;&amp;#39; &amp;#39;&amp;#39;&amp;#39; # a = A(5) # b = A(6) # print(a &amp;lt; b) # print(len(a)) # a[&amp;#39;b&amp;#39;] = 10 # c = a[&amp;#39;c&amp;#39;] pass </description>
    </item>
    <item>
      <title>Darknet Too Many or Too Few Labels</title>
      <link>https://jerrywang1981.github.io/post/ml/darknet-too-many-or-too-few-labels/</link>
      <pubDate>Wed, 27 May 2020 10:27:04 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/ml/darknet-too-many-or-too-few-labels/</guid>
      <description>Too many or too few labels 如果在使用darknet过程中，遇到这个错误，很可能你的labels文件里面的label定义的有问题 label之间要不包含 label 名字不要出现在train/test的路径中 所以如果定义一个label是a, 很可能就不行，train里面包含a，所以还是定义的稍微长点。</description>
    </item>
    <item>
      <title>09 Python Decorators</title>
      <link>https://jerrywang1981.github.io/post/python/09-python-decorators/</link>
      <pubDate>Wed, 27 May 2020 10:17:38 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/09-python-decorators/</guid>
      <description>无参装饰器 #1. decorator without arguments def log_time_always(func): @wraps(func) def wrapped(*args, **kwargs): #1. get current time t1 = datetime.now() #2. run the function func(*args, **kwargs) #3. get current time t2 = datetime.now() print(f&amp;#39;in {func.__name__}, it took {t2-t1}&amp;#39;) return wrapped 带参数的装饰器 #2. decorator with arguments, flag is True or False def log_time(flag): def wrapper(func): @wraps(func) def wrapped(*args, **kwargs): # if flag is true, we need to log the time if flag: #1. get current time t1 = datetime.now() #2. run the function func(*args, **kwargs) #3. get current time t2 = datetime.now() print(f&amp;#39;in {func.__name__}, it took {t2-t1}&amp;#39;) else: func(*args, **kwargs) return wrapped return wrapper 本质 装饰器需要能够处理一个函数 无参 @decorator_1 def f(): pass 等同于 def f(): pass f =</description>
    </item>
    <item>
      <title>08 Python Virtual Environment</title>
      <link>https://jerrywang1981.github.io/post/python/08-python-virtual-environment/</link>
      <pubDate>Tue, 19 May 2020 21:00:00 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/08-python-virtual-environment/</guid>
      <description>Details refer to offical document&#xA;Virtual environment To create new virtual environment usually in folder venv&#xA;python -m venv yourfoldername enter virtual environment source venv/bin/activate exit virtual environment deactivate Pip usage install package pip install packagename list installed packages pip list save installed packages to requirements.txt pip freeze &amp;gt; requirements.txt install packages from requirements.txt pip install -r requirements.txt </description>
    </item>
    <item>
      <title>Sequelize Bulk Create to return with primary key in Postgre</title>
      <link>https://jerrywang1981.github.io/post/node/sequelize-bulk-create-postgre/</link>
      <pubDate>Tue, 19 May 2020 20:00:37 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/node/sequelize-bulk-create-postgre/</guid>
      <description>Sequelize data model 在使用 bulkCreate的时候，如果想在返回的数据中包括生成的id, 需要加上option, { returning: true } return CertificationEndUsers.bulkCreate(usersToInsert, { returning: true }); 另外 postgresql中table name包含双引号和不包含的，竟然是不一样的两个table &amp;#34;users&amp;#34; users 比如这是两个table</description>
    </item>
    <item>
      <title>07 Python 函数</title>
      <link>https://jerrywang1981.github.io/post/python/07-python-function/</link>
      <pubDate>Sat, 16 May 2020 09:17:08 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/07-python-function/</guid>
      <description>函数 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # def func, snake case # return value # no args, no return def add_two_number(): print(&amp;#39;a&amp;#39;) # 1 arg def add_two_number_1(x): return x + 5 # return value # return multiple value def two_number_2(x, y): c = x + y d = x - y return c, d # args def add_number(x, y, *args): print(f&amp;#39;x = {x}&amp;#39;) print(f&amp;#39;y = {y}&amp;#39;) print(f&amp;#39;args = {args} &amp;#39;) # kwargs # def add_number_1(x, y, *args, **kwargs): print(f&amp;#39;x = {x}&amp;#39;) print(f&amp;#39;y = {y}&amp;#39;) # f-string f&amp;#39;this is string, {x}&amp;#39; print(f&amp;#39;args = {args} &amp;#39;) print(f&amp;#39;kwargs = {kwargs} &amp;#39;) # wrong # def add_number_2(**kwargs, *args, x, y) # pass # default def add_number_3(x, y, c=10, d = True): print(c) if __name__ == &amp;#39;__main__&amp;#39;: # add_two_number() # print(add_two_number_1(6)) # print(two_number_2(10, 5)) # add_number(1,2, 3, 4, 5, 6) # add_number_1(1,2,3,4,5,</description>
    </item>
    <item>
      <title>06 Python 控制，循环</title>
      <link>https://jerrywang1981.github.io/post/python/06-condition-loop/</link>
      <pubDate>Sat, 16 May 2020 09:14:28 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/06-condition-loop/</guid>
      <description>条件控制 #!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == &amp;#39;__main__&amp;#39;: a = 5 if a &amp;gt; 0: print(&amp;#39;a &amp;gt; 0&amp;#39;) else: print(&amp;#39;a &amp;lt; 0&amp;#39;) if a &amp;gt; 0: pass elif a &amp;lt; 5: pass elif a &amp;lt; 10: pass else: pass if a &amp;gt; 0: if a &amp;lt; 5: print(a) else: print(&amp;#39;a &amp;gt; 5&amp;#39;) 循环控制 #!/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == &amp;#39;__main__&amp;#39;: # while condition a = 5 while a &amp;gt; 0: # print(a) a = a -1 # for in for i in range(10): print(i) # break the loop print(&amp;#39;------------------&amp;#39;) for i in range(10): print(i) else: # print(&amp;#39;done&amp;#39;) # continue the loop print(&amp;#39;------------------&amp;#39;) for i in range(10): if i == 5: continue print(i) count = 0 while count &amp;lt; 5: print (count, &amp;#34; 小于 5&amp;#34;) count</description>
    </item>
    <item>
      <title>Angular Javascript Heap Out of Memory</title>
      <link>https://jerrywang1981.github.io/post/node/angular-javascript-heap-out-of-memory/</link>
      <pubDate>Thu, 14 May 2020 21:20:50 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/node/angular-javascript-heap-out-of-memory/</guid>
      <description>如果启动angular的时候有报 Javascript heap out of memory错误，可以试着修改 node_modules/.bin/ng 加上 --max_old_space_size #!/usr/bin/env node --max_old_space_size=4096 &amp;#39;use strict&amp;#39;;</description>
    </item>
    <item>
      <title>Golang 导出 csv 乱码的问题</title>
      <link>https://jerrywang1981.github.io/post/go/golang-export-csv/</link>
      <pubDate>Tue, 12 May 2020 22:26:51 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/golang-export-csv/</guid>
      <description>问题提出 golang最近导出csv的时候，如果用excel打开，会有乱码。在网上查到了解决方案，记录一下。 解决方案 f, err := os.Create(&amp;#34;data.csv&amp;#34;) if err != nil { panic(err) } defer f.Close() f.WriteString(&amp;#34;\xEF\xBB\xBF&amp;#34;) // 写入UTF-8 BOM，避免使用Microsoft Excel打开乱码 writer := csv.NewWriter(f) writer.Write([]string{&amp;#34;col 1&amp;#34;, &amp;#34;col 2&amp;#34;, &amp;#34;col 3&amp;#34;}) writer.Flush()</description>
    </item>
    <item>
      <title>转换Pdf成图片</title>
      <link>https://jerrywang1981.github.io/post/go/convert-pdf-to-images/</link>
      <pubDate>Mon, 11 May 2020 21:51:52 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/convert-pdf-to-images/</guid>
      <description>背景 在做文字检测和文字识别的时候，有时候客户提供的是pdf格式的文件，而不是jpg/png格式，这时候就需要把pdf里面多个页面 保存成图片。 代码库pdf2image 实现 Python 参考readme docker 参考readme golang 参考readme 也可以 直接下载可执行文件直接执行 -&amp;gt; https://github.com/jerrywang1981/pdf2images/blob/master/pdf2image</description>
    </item>
    <item>
      <title>Golang 中通过gRPC调用Python实现的功能</title>
      <link>https://jerrywang1981.github.io/post/go/python-go-rpc/</link>
      <pubDate>Mon, 04 May 2020 00:11:12 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/python-go-rpc/</guid>
      <description>背景 有时候，我们在python中实现了一个功能，这功能如果用golang重新写呢，会比较麻烦，如果要在golang中调用python中的功能。 方式有很多，主要就是两个程序如果沟通的问题，那方式就各种各样了，可以通过http协议，json/xml等格式，或者tcp, 当然还有个 选择就</description>
    </item>
    <item>
      <title>Class Object Method</title>
      <link>https://jerrywang1981.github.io/post/python/class-object-method/</link>
      <pubDate>Sat, 02 May 2020 21:59:33 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/class-object-method/</guid>
      <description>对象中通过类或者实例的方法调用方式的不同 如果通过类中取得的方法，需要传入实例 class A(object): def test(self, *args): print(*args) if __name__ == &amp;#39;__main__&amp;#39;: a = A() a.test(7, 8, 9) # method from class object m1 = A.test m1(a, 7, 8, 9, 10) # method from instance object m2 = a.test m2(7, 8, 9, 10) 也就是说, 实例方法的第一个参数是实例本身，如果写decorator的时候，要特别注意 比如print_args这个decor</description>
    </item>
    <item>
      <title>Db2 Backup Tool</title>
      <link>https://jerrywang1981.github.io/post/go/db2-backup-tool/</link>
      <pubDate>Sat, 25 Apr 2020 20:28:35 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/db2-backup-tool/</guid>
      <description>为什么要做这个小工具 有时候，我们可能要把数据库一些表的数据导出，然后load到另外一个数据库，虽然有很多的工具可以选择， 但是可能用的不太顺手。所以就想，是不是能够自动生成export.sql文件。基本上来说，就是通过table，查询到 表结构，把所有的列选择出来，export到de</description>
    </item>
    <item>
      <title>05 Python Dictionary</title>
      <link>https://jerrywang1981.github.io/post/python/05-Python-Dictionary/</link>
      <pubDate>Sat, 25 Apr 2020 18:35:30 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/05-Python-Dictionary/</guid>
      <description>Dictionary ###创建方式 a = dict() a = {} a = {&amp;#39;a&amp;#39;: 1, &amp;#39;b&amp;#39;: 2} a = dict(a=1,b=2) a = [(&amp;#39;a&amp;#39;, 1), (&amp;#39;b&amp;#39;, 2)] b = dict(a) a = zip(&amp;#39;abc&amp;#39;, [1,2,3]) a = { x:x*2 for x in range(10) } a = dict.fromkeys(range(3), &amp;#39;y&amp;#39;)</description>
    </item>
    <item>
      <title>04 Python Tuple</title>
      <link>https://jerrywang1981.github.io/post/python/04-python-tuple/</link>
      <pubDate>Fri, 24 Apr 2020 21:54:58 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/04-python-tuple/</guid>
      <description>Tuple Python 的元组与列表类似，不同之处在于元组的元素不能修改。 不可变 空元组, 一个元素元组 元组运算 元组在参数中的应用 创建tuple的方式</description>
    </item>
    <item>
      <title>03 Python List</title>
      <link>https://jerrywang1981.github.io/post/python/03-python-list/</link>
      <pubDate>Fri, 24 Apr 2020 21:05:59 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/03-python-list/</guid>
      <description>列表 序列是Python中最基本的数据结构。序列中的每个元素都分配一个数字 - 它的位置，或索引，第一个索引是0，第二个索引是1，依此类推 索引访问 长度 空或者False 创建列表的方式 a = [] a = [1,2,3] a = list() a = list(&amp;#39;abcdefg&amp;#39;) a = list(range(10)) a = [ x for x in range(20) ] append In [17]: a=[1,2,3] In [18]: a.append(4) In [19]: a Out[19]: [1, 2, 3, 4] In [20]: extend In [21]: a Out[21]: [1, 2, 3, 4] In [22]: a.extend([5,6])</description>
    </item>
    <item>
      <title>02 Python Variable</title>
      <link>https://jerrywang1981.github.io/post/python/02-python-variable/</link>
      <pubDate>Thu, 23 Apr 2020 14:23:52 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/02-python-variable/</guid>
      <description>变量 命名 变量名必须是大小写英文、数字和_的组合，且不能用数字开头 允许的变量名：a, a1, B_5, ____5, _C 静态语言，动态语言 大小写敏感 Dunder 规范 snake_case e.g. a_b, total_count 变量 函数名 模块 包 CamelCase e.g. Person, TeamMember 类名 常量 一般用大写, PI=3.14</description>
    </item>
    <item>
      <title>01 Python Data Type</title>
      <link>https://jerrywang1981.github.io/post/python/01-python-data-type/</link>
      <pubDate>Thu, 23 Apr 2020 13:51:39 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/01-python-data-type/</guid>
      <description>基本数据类型 整数 int 十进制： -1, 0, 1000, -8000, 88 八进制：0o10, 0o27 十六进制：0x10, 0xff 数学运算 + - * / // % 浮点数 float 比如：1.23, 2.6e3 字符串 str 字符串是以单引号&amp;rsquo;或双引号&amp;quot;括起来的任意文本 如果字符串内部包含&amp;rsquo;,&amp;quot;, 可以用转义字符\来标识 转义 \ 不转义</description>
    </item>
    <item>
      <title>02 原型模式</title>
      <link>https://jerrywang1981.github.io/post/go/02-prototype/</link>
      <pubDate>Sun, 12 Apr 2020 13:22:43 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/02-prototype/</guid>
      <description>原型模式 参考文章 原型模式 package prototype_pattern type Person struct { Name string Age int } type Cloner interface { Clone() interface{} } func (s *Person) Clone() interface{} { var n Person n.Name = s.Name n.Age = s.Age return n }</description>
    </item>
    <item>
      <title>01 单例模式</title>
      <link>https://jerrywang1981.github.io/post/go/01-singleton/</link>
      <pubDate>Sun, 12 Apr 2020 12:26:51 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/go/01-singleton/</guid>
      <description>单例模式 从网上找的 单例模式 golang实现 参考的文章Go语言中的单例模式 代码： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 package example import ( &amp;#34;sync&amp;#34; ) // the singleton struct/object type singleton struct{} var instance *singleton var once sync.Once func GetSingleInstance() *singleton { once.Do(func() { instance = &amp;amp;singleton{} }) return instance }</description>
    </item>
    <item>
      <title>SSL TLS Diffie Hellman Modulus 1024 Bits</title>
      <link>https://jerrywang1981.github.io/post/java/SSL-TLS-Diffie-Hellman-Modulus-1024-Bits/</link>
      <pubDate>Sat, 11 Apr 2020 21:17:25 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/java/SSL-TLS-Diffie-Hellman-Modulus-1024-Bits/</guid>
      <description>Liberty Profile 这个要修复，可能要修改两个地方。 server.xml 加入 1 2 3 &amp;lt;ssl id=&amp;#34;defaultSSLConfig&amp;#34; keyStoreRef=&amp;#34;defaultKeyStore&amp;#34; securityLevel=&amp;#34;CUSTOM&amp;#34; enabledCiphers=&amp;#34;TLS_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA256 &amp;#34;/&amp;gt; jvm.options加入 -Djdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize &amp;lt;768</description>
    </item>
    <item>
      <title>Python Nest</title>
      <link>https://jerrywang1981.github.io/post/python/python-nest/</link>
      <pubDate>Sat, 11 Apr 2020 21:15:14 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/python/python-nest/</guid>
      <description>背景 最近有做一个nestjs的项目，用的nestjs实现的微服务，如果所有的功能都用node/nestjs写，那倒也没有什么问题了。可是有一个功能是需要用到机器学习，代码是用python写的，需要用python实现一个微服务，供nest app来调用，同时，python代码也需要调</description>
    </item>
    <item>
      <title>Vim Online Video</title>
      <link>https://jerrywang1981.github.io/post/vim/vim-online-video/</link>
      <pubDate>Sat, 11 Apr 2020 21:09:42 +0800</pubDate>
      <guid>https://jerrywang1981.github.io/post/vim/vim-online-video/</guid>
      <description>在网上发现了vim一个系列视频，是Practical Vim的作者录制的，内容很值得学习。 vim video</description>
    </item>
  </channel>
</rss>
