<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.7.4">Jekyll</generator><link href="https://awesomeyifan.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://awesomeyifan.github.io/" rel="alternate" type="text/html" /><updated>2019-02-15T03:07:17+00:00</updated><id>https://awesomeyifan.github.io/feed.xml</id><title type="html">Home</title><subtitle>To learn and share</subtitle><author><name>Yifan Li</name></author><entry><title type="html">Frond-end design</title><link href="https://awesomeyifan.github.io/jekyll/update/Server-problem/" rel="alternate" type="text/html" title="Frond-end design" /><published>2019-02-13T02:58:47+00:00</published><updated>2019-02-13T02:58:47+00:00</updated><id>https://awesomeyifan.github.io/jekyll/update/Server%20problem</id><content type="html" xml:base="https://awesomeyifan.github.io/jekyll/update/Server-problem/">&lt;p&gt;Recently I have been learning front-end design and implementation using javascript packages such as [G6] and [D3]. When I tried to run a very simple project that reads and displays a local json file, I encountered a bug, basically indicating that the internet cannot access local files. I googled and found two possible ways to solve this problem.&lt;/p&gt;

&lt;p&gt;The first solution is to make the folder containing the files a server, which can be easily done with python:&lt;/p&gt;

&lt;p&gt;Open a terminal in the foler-&amp;gt;python -m SimpleHTTPServer or python3 -m http.server&lt;/p&gt;

&lt;p&gt;Done.&lt;/p&gt;

&lt;p&gt;The above solution, although seems easy, suffers from several shortcomings. For instance, we can only import local .js files but not files from the Internet. Therefore, the second solution is to upload the code onto a server. I’m trying to figure out this method and will share what I learn in the next several days.
[G6]: https://antv.alipay.com/zh-cn/g6/2.x/index.html
[D3]: https://d3js.org&lt;/p&gt;</content><author><name>Yifan Li</name></author><summary type="html">Recently I have been learning front-end design and implementation using javascript packages such as G6 and D3. When I tried to run a very simple project that reads and displays a local json file, I encountered a bug, basically indicating that the internet cannot access local files. I googled and found two possible ways to solve this problem.</summary></entry><entry><title type="html">First project</title><link href="https://awesomeyifan.github.io/jekyll/update/First-project/" rel="alternate" type="text/html" title="First project" /><published>2019-02-12T02:58:47+00:00</published><updated>2019-02-12T02:58:47+00:00</updated><id>https://awesomeyifan.github.io/jekyll/update/First%20project</id><content type="html" xml:base="https://awesomeyifan.github.io/jekyll/update/First-project/">&lt;p&gt;I build this webpage to frequently share what I learned - I basically know nothing so there is a lot of stuff to learn.&lt;/p&gt;

&lt;p&gt;I learned about how to build Github webpage from this &lt;a href=&quot;https://www.taniarascia.com/make-a-static-website-with-jekyll/&quot;&gt;tutorial&lt;/a&gt;.&lt;/p&gt;</content><author><name>Yifan Li</name></author><summary type="html">I build this webpage to frequently share what I learned - I basically know nothing so there is a lot of stuff to learn.</summary></entry><entry><title type="html">Introduction</title><link href="https://awesomeyifan.github.io/jekyll/update/welcome-to-jekyll/" rel="alternate" type="text/html" title="Introduction" /><published>2019-02-12T02:58:47+00:00</published><updated>2019-02-12T02:58:47+00:00</updated><id>https://awesomeyifan.github.io/jekyll/update/welcome-to-jekyll</id><content type="html" xml:base="https://awesomeyifan.github.io/jekyll/update/welcome-to-jekyll/">&lt;p&gt;You’ll find this post in your &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run &lt;code class=&quot;highlighter-rouge&quot;&gt;jekyll serve&lt;/code&gt;, which launches a web server and auto-regenerates your site when a file is updated.&lt;/p&gt;

&lt;p&gt;To add new posts, simply add a file in the &lt;code class=&quot;highlighter-rouge&quot;&gt;_posts&lt;/code&gt; directory that follows the convention &lt;code class=&quot;highlighter-rouge&quot;&gt;YYYY-MM-DD-name-of-post.ext&lt;/code&gt; and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.&lt;/p&gt;

&lt;p&gt;Jekyll also offers powerful support for code snippets:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;Hi, &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'Tom'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints 'Hi, Tom' to STDOUT.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Check out the &lt;a href=&quot;https://jekyllrb.com/docs/home&quot;&gt;Jekyll docs&lt;/a&gt; for more info on how to get the most out of Jekyll. File all bugs/feature requests at &lt;a href=&quot;https://github.com/jekyll/jekyll&quot;&gt;Jekyll’s GitHub repo&lt;/a&gt;. If you have questions, you can ask them on &lt;a href=&quot;https://talk.jekyllrb.com/&quot;&gt;Jekyll Talk&lt;/a&gt;.&lt;/p&gt;</content><author><name>Yifan Li</name></author><summary type="html">You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.</summary></entry></feed>