-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.json
1 lines (1 loc) · 99.6 KB
/
content.json
1
{"pages":[{"title":"","text":"Perhaps an IT Enthusiast le Blog de Léonore le Blog de Léonore is a French name, although my proficiency in the language is limited. I chose it to add more features to the website. The majority of the content on the website will be written in English, with some written in Chinese as well. Since Léonore /leonɔ:r/ is a French name, it should be pronounced with the French accent /r/, the uvular consonant. Of course, you can absolutely use the American pronunciation /'li:ənɔ:/. The top-level domain .top was chosen simply because it is inexpensive. Perhaps it will be changed to .com, .net or .org in the future. I didn’t intentionally search for a particular French name. Instead, I combined random letters and added French syllables to create a unique name. Interestingly, even in English-speaking countries, Leonore is relatively rare and few people use it. Furthermore, it is a feminine name and while it may be less popular among girls, it is quite distinctive. Now that the name has been chosen, I believe it’s best to stick with it. I created this website solely based on my personal interests, with the intention of sharing techniques and knowledge that I have learned from the internet or through my research. Although there are some areas of the website that are still in the early stages of development, I am committed to improving and refining the content over time. The goal of this website is to share something awesome that will add a bit of enjoyment to your life. By subscribing to le Blog de Léonore, you can receive alerts when new content is posted. Additionally, you can leave comments in the designated section, where providing a nickname and an Email address is requiredto protect your privacy and verify that the commenter is a real person. Your Email address will not be displayed publicly. Comments should be respectful and relevant to the topic at hand, and should not include spam or promotional content. Let’s work together to make le Blog de Léonore even better. Updated on 2023-03-31I invested a considerable amount of money (approximately $10 per year) to change my domain name. After the expiration of the previous domain, leonore.top, I decided not to renew it. After carefully searching and considering various designations, I realized that it was just a self-amusing joke, and in the end, I decided to return to using my own name. In fact, I knew that I would eventually change my domain name, but I didn’t anticipate doing it so soon. Initially, I hoped to switch to a “.com,” “.net,” or “.org” domain (“Perhaps it will be changed to .com, .net or .org in the future.”). Ideally, I wanted a domain name with “xxm” or “xiao,” but after searching around, I found that either they were too expensive or already registered. I also considered “xxm.red,” which was my initial choice and one I quite liked (“good quality at a low price”), but I decided against it because most people wouldn’t consider “.red” as a top-level domain. As a backup plan, I considered adding a longer name. Considering my budget of less than <$20/y. There were various options available, such as xmxiao, xiaoxm, xmshaw, and so on, most of which were priced between $10-20. After searching for a while, I suddenly realized that dropping one letter would still result in a similar price range, so I ultimately chose xxiao as my final choice. Perhaps due to the uniqueness of my name, it was indeed challenging to find a suitable domain name based on the pinyin. However, the double x can also be seen as a distinctive feature. Of the three popular generic top-level domains, only .org was left. Ultimately, this choice involved various compromises. Although .com is the most popular, I felt that the “commercial” connotation was too heavy. The original definition of le Blog de Léonore was more of a public platform for recording and sharing, so “.net” should have been the most suitable and desirable choice for me, but it had already been taken. After studying other blog or personal website domain names, besides “.com” being the most common, the number of “.org” and “.net” domains was roughly similar. The popularity of “.net” might be due to its association with internet service providers (e.g., Speedtest). I also found several websites using “.org,” such as the widely used Science, Telegram, Wikipedia, Linux, the United Nations UN, Archive, Mozilla, and others, which explicitly chose “.org” as their primary domain. Although they are international organizations, they provided some consolation to me. Therefore, I ultimately chose “.org” combined with “xxiao.” Although it may not be the best choice, and I’m not sure if I will feel the urge to change it again in the future, I hope it can last for a while and have a meaningful symbolism that convinces myself. :) Google Trends of .com, .org and .net<Worldwide, Past 12 months, All categories, Web Search > Compared breakdown by region 由Google Trends支持,中国大陆网络环境下可能难以加载导致无法显示。 trends.embed.renderExploreWidget(\"GEO_MAP\", {\"comparisonItem\":[{\"keyword\":\".com\",\"geo\":\"\",\"time\":\"today 12-m\"},{\"keyword\":\".org\",\"geo\":\"\",\"time\":\"today 12-m\"},{\"keyword\":\".net\",\"geo\":\"\",\"time\":\"today 12-m\"}],\"category\":0,\"property\":\"\"}, {\"exploreQuery\":\"q=.com,.org,.net&hl=en&date=today 12-m,today 12-m,today 12-m\",\"guestPath\":\"https://trends.google.com:443/trends/embed/\"}); Recently played on Spotify","link":"/about/"}],"posts":[{"title":"Web3.0 with AI","text":"# < Generated by ChatGPT > # Google Bard approved my access early this morning, so now I have collected ChatGPT, New Bing, and Bard. In addition to Google and Microsoft, I also submitted my access for Adobe Firefly and GitHub Copilot X, and I am currently waiting for good news about my access request. Additionally, there are derivative tools available, including ChatPDF, Midjourney, PandaGPT, Humata, ChatDOC and a host of other AI-powered tools. This article is also available in 简体中文, Français. Following some preliminary testing, I have some thoughts on the next era of the Web. about Bard We’re expanding access to Bard in US + UK with more countries ahead, it’s an early experiment that lets you collaborate with generative AI. Hope Bard sparks more creativity and curiosity, and will get better with feedback. Sign up: http://bard.google.com @sundarpichai CEO, Google and Alphabet. https://twitter.com/sundarpichai/status/1638180697352593408 Google released an experimental version of Bard two days ago, and I applied with several of my commonly used Google accounts. Approximately 25 hours later, I was successfully accepted. It is evident that Google is eager to avoid falling too far behind in the new round of AI competition. Therefore, they hastily took an experimental project out of the repository, dusted it off, and set it on track. Although I only experienced it for a few minutes, it had some novelty in interaction compared to ChatGPT. However, in terms of content, it is not as good as ChatGPT and does not answer some questions as well. Sign up for BardRegistering for Bard is much faster than for ChatGPT and New Bing. On March 21st, 2023, at 10:08 pm (GMT+8), Pichai launched Bard’s test version on Twitter. Currently, it is only available in the US and the UK. Of course, it’s easy to switch to the US or UK using a proxy node, as Bard’s IP review is not strict. On the morning of the 22nd, I saw someone on Telegram talking about Bard, so I applied for the waitlist. Soon after, on the morning of the 23rd, I received an email from Google Bard. Bard experienceBard is similar to ChatGPT and New Bing in that it uses AI chat to provide solutions to your questions. When chatting with Bard, it offers three versions of answers for each question as a reference, and its response time is relatively fast. It can generate text blocks in less than 10 seconds. Bard may be good at completing simple questions or creative ideas, but it seems not as competent when it comes to asking professional questions or seeking solutions to uncommon problems. In addition, Bard is only accessible through US+UK IP addresses, and the open beta version is only available in English. It is hoped that Bard will soon expand its accessibility and release internal versions to support more languages. Comparison of ChatGPT, New Bing, and BardAfter experiencing ChatGPT, New Bing, and Bard, let’s take a brief look at the differences between them in terms of user experience. ChatGPT is the driving force behind this AI wave. In terms of experience, OpenAI has sufficient technical support for this technological innovation, even causing Google to face it with a red alert. RegistrationFrom the registration perspective, ChatGPT is the most difficult and the only one that requires payment (in mainland China). If you don’t have a ChatGPT account yet, you can refer to the previous blog post. New Bing registration is relatively easy, but it requires a waiting period, although there is also an immediate access option (by registering a new Microsoft account with a Japanese IP address and applying for the New Bing Waitlist, you can get immediate access). Applying for Bard is the easiest, as it only requires accessing the Bard website with a US or UK IP address. If you apply for the Waitlist early enough, you can usually get access after 24 hours. User experienceUndoubtedly, ChatGPT is the best in terms of usage, including its ability to answer various types of questions and the lack of IP restrictions once logged in. However, in the network environment of mainland China, ChatGPT may require occasional re-login, making the overall user experience less convenient. New Bing is an encapsulated GPT-4, with the support of the network, and the experience is better in real-time information collection on the network. However, I feel that the answers are more concise than ChatGPT, and too dependent on the network, and the answers feel less profound (just my personal opinion:)). There is still IP restriction, but only for mainland China. Bard is only available for US+UK IPs, which is more troublesome. For my own use of Clash proxy, I have to switch nodes to use Bard. In terms of answering questions, Bard may be slightly behind New Bing, let alone ChatGPT. It is evident that Google launched it a bit hastily. Several Technology CompaniesIn fact, for those top technology companies on the West Coast (Apple, Microsoft, Alphabet, Amazon, and Meta), I appreciate Google more (I have only developed Android programs). As a company established from the early days of the Internet, Google’s concept of using technology to bring change to humanity is stronger than other companies (or it may be that Google’s main business of advertising can be blocked by uBlock Origin for me). I also appreciate other companies, but as a poor person, I always feel that I have to pay for using their products (Joke). Except for Amazon, I have used the mainstream products of these companies. Microsoft was the earliest one I used because it accepted government censorship in mainland China. Then came Google, Facebook, and so on. Looking back, besides GitHub, Google Search, and YouTube, there seems to be nothing that is essential or disruptive. Due to my late exposure and understanding of computers and networks, these products were all on my waiting list for joining. Now, these AI tools are emerging like mushrooms after rain, and I am also jumping between various waitlists, hoping to catch a glimpse of the Web3.0 era. Web3.0 AIActually, many AI tools have existed for quite some time, such as those used for programming, creating images and videos, and copywriting… But the release of ChatGPT has somewhat overturned the traditional attributes of AI as a tool with a specific purpose. It seems to know everything and can do anything (although there is some exaggeration). It is rumored that in the next era (such as DAO, virtual currencies, and metaverse, etc.), human existence will be disrupted (it’s hard to believe the world will evolve so rapidly). I don’t know how things will change, but just these recent AI products alone have excited me like Steve did when he showcased the new generation iPhone. To be continued…","link":"/ai-en/"},{"title":"Understanding High Order Dispersion","text":"This article contains multiple .GIF images, which may slow down the webpage loading speed. When considering the influence of high-order dispersion on pulse transmission, the attenuation $\\alpha$ and non-linear parameter $\\gamma$ in the pulse transmission equation are usually simplified as 0 for convenience. At the same time, the pulse intensity $A$ is normalized to $U$. This article is also available in 简体中文, Français. The normalized pulse satisfies in the time domain:$$\\mathrm{i}\\frac{\\partial U}{\\partial z}=\\frac{\\beta_2}{2}\\frac{\\partial^2U}{\\partial T^2}+\\mathrm{i}\\frac{\\beta_3}{6}\\frac{\\partial^3U}{\\partial T^3}+…$$In the frequency domain, it becomes:$$\\frac{\\partial U}{\\partial z}=\\mathrm{i}[\\frac{\\beta_2}{2}(\\omega-\\omega_0)^2+\\frac{\\beta_3}{6}(\\omega-\\omega_0)^3+…]\\widetilde U$$ It shows that when the optical pulse is transmitted through the optical fiber, each spectral component within its envelope undergoes a frequency-dependent phase shift. The general solution of the equation in the frequency domain is:$$\\widetilde{U}(z, \\omega)=\\widetilde{U}(0, \\omega)\\mathrm{e}^{\\mathrm{i}\\frac{\\beta_2}{2}(\\omega-\\omega_0)^2z+\\mathrm{i}\\frac{\\beta_3}{6}(\\omega-\\omega_0)^3z+…}$$ Next, taking the Gaussian pulse as an example, we will separately analyze the impact of each order of dispersion on pulse transmission. View the source code in my GitHub repository. The group velocity dispersion of a Gaussian pulseTaking $\\beta_2>0$ as an example, the phase shift of each frequency component in the pulse is the square of the difference between the component frequency and the central frequency. Third-order dispersion of a Gaussian pulse Higher-order dispersion of a Gaussian pulseFourth-order dispersion Fifth-order dispersion Sixth-order dispersion To be continue… 啁啾高斯脉冲双曲正割脉冲超高斯脉冲","link":"/dispersion-en/"},{"title":"Hexo博客迁移","text":"After graduating from my undergraduate studies, I bought a new computer and left the old one at home. I upgraded the new computer with a 1TB Samsung SSD, and most of the software and files have already been transferred to the new computer, except for my blog. I’ve been procrastinating on it for a while, but today I finally want to complete the migration work. 1、安装Git环境下载并安装git,配置环境变量 2、安装Node.js和Hexo 下载并安装node.js,配置环境变量 使用npm安装hexo ,在命令行窗口运行npm install -g hexo-cli全局安装Hexo 3、拷贝博客文件原始博客目录下有许多文件及文件夹,只要拷贝以下文件及文件夹 博客配置文件./_config.yml 主题配置文件夹./theme/ 文章及相关内容的文件夹./source/ 模板文件夹./scaffolds/ 记录博客所有的插件的文件./package.json 提交忽略哪些文件夹.gitignore 4、安装必要组件博客目录下,在命令行窗口运行npm install 5、本地测试博客目录下,在命令行窗口运行 hexo cleanhexo ghexo s 此时可在localhost:4000 本地预览博客 6、部署到Github6.1生成SSH添加到GitHub在博客文件夹中打开git bash,运行 git config --global user.name "yourname"git config --global user.email "youremail" 内容换成你自己的Github用户名和邮箱。执行一下两条指令,检查你有没有输入正确。 git config user.namegit config user.email 然后创建SSH,一路回车 ssh-keygen -t rsa -C "youremail" 这个时候它会告诉你已经生成了.ssh的文件夹。在你的电脑中找到这个文件夹。ssh,简单来讲,就是一个秘钥,其中,id_rsa是你这台电脑的私人秘钥,不能给别人看的,id_rsa.pub是公共秘钥,可以随便给别人看。把这个公钥放在GitHub上,这样当你链接GitHub自己的账户时,它就会根据公钥匹配你的私钥,当能够相互匹配时,才能够顺利的通过git上传你的文件到GitHub上。 6.2、Github上创建新SSH Key在GitHub的settings中,找到SSH and GPC keys的设置选项,点击New SSH key把id_rsa.pub里面的信息复制进去,任意填写title 7、部署到Githubhexo clean&& hexo g && hexo d","link":"/blog/"},{"title":"Hexo写作流","text":"经常在写blog时忘记一些关键步骤,需要记录一下。 新建Markdown文件在\\Blog\\source\\_posts文件夹下新建一个.md文件,文件名任意。 最好复制前一篇文章的原文件。 写head信息包括title(显示的标题)、date(创建时间)、toc(是否显示目录) tags Github VPS Hexo Icarus V2ray Clash categories Internet Technology Blog cover(封面)和thumbnail(缩略图)。 head.md---title: Hexo写作流date: 2022-07-05toc: truetags: Hexocategories: Blogcover: /gallery/covers/Hexo.pngthumbnail: /gallery/thumbnails/Hexo.png--- 写前言写一些关于这篇blog的信息,引发读者点击阅读。用<!-- more -->结束。 写正文从一级标题开始写作 例如: example.pyimport seaborn as snsa = [1, 2, 3]def example: print("这是示例代码。") _.compactUnderscore.js_.compact([0, 1, false, 2, '', 3]);=> [1, 2, 3] 常用格式小节首选 图片 音乐 视频 代码 <img src="/images/logo.png" width="50%" title="title of img" alt="alt of image"> 网易云 单曲 {% iframe https://music.163.com/outchain/player?type=2&id=2025533834&auto=0&height=66 marginwidth="0" marginheight="0" %} 歌单 {% iframe https://music.163.com/outchain/player?type=0&id=360062344&auto=0&height=100 %} YouTube {% youtube h8DLofLM7No %}{% youtube PL9hW1uS6HUfscJ9DHkOSoOX45MjXduUxo 'playlist' %} Bilibili {% iframe https://www.bilibili.com/blackboard/html5mobileplayer.html?aid=82766716&bvid=BV1FJ411V7gy&cid=147308234&page=1&high_quality=1 %} FileName.pyxxiao.org/hexoprint("使用codeblock格式化代码块") {% codeblock [lang:language] [FileName] [url] [link text] %}print("使用codeblock格式化代码块"){% endcodeblock %} .content .tabs ul { margin: 0; } .tab-content { display: none; } function onTabClick (event) { var tabTitle = $(event.currentTarget).children('span:last-child').text(); $('.article .content .tab-content').css('display', 'none'); $('.article .content .tabs li').removeClass('is-active'); $('#' + tabTitle).css('display', 'block'); $(event.currentTarget).parent().addClass('is-active'); } 公式:$$\\hat{x}_k=\\hat{x}_k^-+K_t\\left(y_k\\right)$$ 图片在文章中插入指定大小的图片。 img标签,图片下面标题为alt。 【首选】 图片示例.html<img src="/images/logo.png" width="50%" title="title" alt="alt"> 代码 使用codeblock【首选】 {% codeblock [lang:language] [title] [url] [link text] %}code snippet{% endcodeblock %} demo.py© xxiao.orgimport seaborn as snsprint("Hello")def DemoFun: a=0 print("使用codeblock格式化代码块") 使用三个反引号 [language] [title] [url] [link text] code snippet demo.pyimport osa = [1, 2, 3]def example: print("这是一个Demo。") 视频 Bilibili {% iframe https://www.bilibili.com/blackboard/html5mobileplayer.html?aid=82766716&bvid=BV1FJ411V7gy&cid=147308234&page=1&high_quality=1 %} YouTube YouTube{% youtube h8DLofLM7No %}{% youtube PL9hW1uS6HUfscJ9DHkOSoOX45MjXduUxo 'playlist' %} JISOO - ‘꽃(FLOWER)’ M/V Taylor Swift - Lavender Haze (Official Music Video) 播放列表 BLACKPINK Vimeo 在文章中插入 Vimeo 视频。 Vimeo{% vimeo video_id %} 网易云音乐单曲 歌单","link":"/hexo/"},{"title":"Clash","text":"Simply knowing and using proxies for over one year, my current choice is Clash (includes both clash for windows and clash for Android), especially since I’ve moved to “Airport”. Of course, there’s still the Shadowrocket on iOS. This Blog is based on a basic understanding of sci-sruf. If you have never learned about the sci-surf, I suggest you read Learn-Something-about-Internet and X α——Sharing awesome things about sci-surf first. the “Airport”In the past year, I was mainly working on postgraduate entrance examinations, and it was difficult to find time for other things. So I mostly use free nodes. The main advantage of free nodes is of course free, but it also sacrifices time costs, and more often the network is in poor condition. After identifying my future, I decided to take some time to turn to paying Airports. Problems that can be solved with money are not problems. The sci-surf is not a short term topic. You still need to search for the best paying Airports for yourself. I am not the kind of user who goes to Netflix a lot, but have a long-term need for technology. So the amount of traffic is not the key, it just needs to be long-term and stable. I turned to paying “Airport” a few months ago due to technical requirements and have experienced some so far. My Blog, however, does not recommend or promote anything, it is more about sharing technical things or just recording. Why “Airport”Before turned to the “Airport”, I always searched for free nodes and subscriptions. These are also, in essence, free nodes from airports. 计算机中的 Clash 代理为了日常方便的访问网站,我使用 Clash for Windows 作为日常的网络代理工具,设置为开机自启,替换状态栏图标以尽可能减少干扰。 基本或者说常用的网络访问是通过浏览器完成,而浏览器的代理一般是根据“系统设置”中的“代理服务器设置”。使用 Clash for Windows 的系统代理配合“规则模式”能完成浏览器上的各种网站的规则分流访问。 但网络活动不只发生在浏览器上,其他不遵循“系统设置”中的“代理服务器设置”的软件则无法通过 Clash for Windows 。这就需要使用 Clash for Windows 中的“ TUN ”模式。这样,就能进一步接管基本上所有的流量通过 Clash for Windows 代理的方式实现规则分流访问。 【规则分流】 Clash for Windows 会根据不同域名匹配不同代理节点进行访问,称之为规则模式。 这样,在访问国内网站时,会使用本地网络直连;访问其他地区的网站包括被墙网站会使用代理节点进行访问。 【代理节点】 对于服务器在国外的网站或者被墙的网站,国内网络直连比较慢或者直接被DNS污染导致无法访问。使用代理节点的目的就是加速或者绕过这些网站的访问限制。 代理节点是一个位于大陆地区以外的运行某种网络代理的服务器。由于位于大陆之外,不受长城防火墙限制,可以自由访问各种网站。另外,虽然位于境外,但国内与这台服务器通信不慢。这样,想要访问的内容就可以交给这个服务器,让它替我们访问,再把收到的数据返回给我们,这就实现了绕过长城防火墙的目的。 以上配置可以满足日常各种网络访问上的基本需求。 当然,要进一步追求访问速度,还得加钱(用连接更快的代理节点)。目前我使用的有两大类:自建节点和机场。 自建节点代理节点的服务器可以通过购买一些商家的VPS或者使用如 Oracle,Amazon 和 Microsoft 的免费VPS。 机场基本上使用体验和价格正相关。","link":"/clash/"},{"title":"Icarus - a Gorgeous Hexo Theme","text":"A simple, delicate, and modern theme for the static site generator Hexo. Preview | Documentation | Discuss on GitHub :cd: Installation$ npm install hexo-theme-icarus$ hexo config theme icarus Please refer to Getting Started with Icarusfor more details. :gift: FeaturesCyberpunk Theme VariantTap into the future cyber world with the newly added Cyberpunk theme variant.Inspired by Cyberpunk 2077. Extensive Plugin SupportIcarus includes plentiful search, comment, sharing and other plugins out of the box that makes yourblog feature-rich and powerful. Comment Changyan · Disqus · DisqusJS · Facebook · Gitalk · Gitment ·Isso · LiveRe · Utterance · Valine Donate Button Afdian.net · Alipay · Buy me a coffee · Patreon · Paypal · Wecat Search Algolia · Baidu · Google CSE · Insight Share AddThis · AddToAny · Baidu Share · Share.js · ShareThis Widgets Google Adsense · Archives · Categories · External Site Links ·Recent Posts · Google Feedburner · Tags · Table of Contents Analytics Baidu Statistics · Bing Webmaster · BuSuanZi Web Counter · CNZZ Statistics ·Google Analytics · Hotjar · StatCounter · Twitter Conversion Tracking Other Plugins Cookie Consent · LightGallery · Justified Gallery · KaTeX · MathJax ·Oudated Browser · Page Loading Animations Colorful Code HighlightIcarus directly import stylesheets from the highlight.js package and makes more than90 code highlight themes available to you. Atom One Light Monokai Kimbie Dark ### Flexible Theme Configuration Icarus allows you to configure your site on a per-page or per-layout basis. Responsive LayoutGive your audiences best viewing experience with Icarus’s mobile-friendly responsive layout. :hammer: DevelopmentThis project is built with Hexo Inferno.js Stylus Bulma Please refer to the documentation andcontributing guide for implementation details. :tada: ContributeIf you feel like to help us build a better Icarus, you can :black_nib: Submit a tutorial |:earth_asia: Add a translation |:triangular_flag_on_post: Report a bug |:electric_plug: Suggest a new feature :memo: LicenseThis project is licensed under the MIT License - see the LICENSE file for details.","link":"/icarus/"},{"title":"Summary of Hexo Blog Markdown Syntax","text":"I have built a personal website using Hexo and Github Pages. Here, I would like to document the commonly used blog syntax for writing. 公式:$$\\hat{x}_k=\\hat{x}_k^-+K_t\\left(y_k\\right)$$ 标签插件(Tag Plugins)常用小结公式正常使用LaTeX语法。 代码 使用codeblock {% codeblock _.compact lang:js http://underscorejs.org/#compact Underscore.js %}_.compact([0, 1, false, 2, '', 3]);=> [1, 2, 3]{% endcodeblock %} _.compact jsUnderscore.js_.compact([0, 1, false, 2, '', 3]);=> [1, 2, 3] 使用三个反引号 [language] [title] [url] [link text] code snippet 图片在文章中插入指定大小的图片。 {% img [class names] /path/to/image [width] [height] '\"title text\" \"alt text\"' %} 链接示例<a href="https://xxiao.org" target="_blank"> <img src="/images/logo.png" width="25%" title="title" alt="alt"></a> 首选:img标签 图片示例© xxiao.org<img src="/images/logo.png" width="25%" title="title" alt="alt"> 图片示例.html<img src="/images/logo.png" width="25%" title="title" alt="alt"> 其他样式 Youtube在文章中插入 Youtube 视频。 {% youtube video_id [type] [cookie] %} Examples视频 Taylor Swift - Lavender Haze (Official Music Video) 播放列表 BLACKPINK Bilibili插入Bilibili视频 网易云音乐 标签插件和 Front-matter 中的标签不同,它们是用于在文章中快速插入特定内容的插件。 虽然你可以使用任何格式书写你的文章,但是标签插件永远可用,且语法也都是一致的。 Tag plugins should not be wrapped inside Markdown syntax, e.g. []({% post_path lorem-ipsum %}) is not supported. 引用块在文章中插入引言,可包含作者、来源和标题。 别号: quote {% blockquote [author] [link] [source_link_title] %}content{% endblockquote %} content [author] [link] [source_link_title] 样例没有提供参数,则只输出普通的 blockquote {% blockquote %}Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque hendrerit lacus ut purus iaculis feugiat. Sed nec tempor elit, quis aliquam neque. Curabitur sed diam eget dolor fermentum semper at eu lorem.{% endblockquote %} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque hendrerit lacus ut purus iaculis feugiat. Sed nec tempor elit, quis aliquam neque. Curabitur sed diam eget dolor fermentum semper at eu lorem. 引用书上的句子 Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy. David LevithanWide Awake 引用 Twitter {% blockquote @DevDocs https://twitter.com/devdocs/status/356095192085962752 %}NEW: DevDocs now comes with syntax highlighting. http://devdocs.io{% endblockquote %} NEW: DevDocs now comes with syntax highlighting. http://devdocs.io @DevDocstwitter.com/devdocs/status/356095192085962752 引用网络上的文章 {% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %}Every interaction is both precious and an opportunity to delight.{% endblockquote %} Every interaction is both precious and an opportunity to delight. Seth GodinWelcome to Island Marketing 代码块在文章中插入代码。 别名: code {% codeblock [lang:language] [title] [url] [link text] %}code snippet{% endcodeblock %} demo.py© xxiao.orgimport seaborn as snsprint("Hello")def Fun: a=0 以 option:value 的格式指定额外选项,例如:line_number:false first_line:5。 示例普通的代码块 {% codeblock %}alert('Hello World!');{% endcodeblock %} alert('Hello World!'); 指定语言 {% codeblock lang:objc %}[rectangle setX: 10 y: 10 width: 20 height: 20];{% endcodeblock %} [rectangle setX: 10 y: 10 width: 20 height: 20]; 附加说明 {% codeblock Array.map %}array.map(callback[, thisArg]){% endcodeblock %} Array.maparray.map(callback[, thisArg]) 附加说明和网址 {% codeblock _.compact http://underscorejs.org/#compact Underscore.js %}_.compact([0, 1, false, 2, '', 3]);=> [1, 2, 3]{% endcodeblock %} _.compactUnderscore.js_.compact([0, 1, false, 2, '', 3]);=> [1, 2, 3] 反引号代码块另一种形式的代码块,不同的是它使用三个反引号来包裹。 [language] [title] [url] [link text] code snippet Pull Quote在文章中插入 Pull quote。 This is a Pull quote Gist在文章中嵌入 Gist。 {% gist gist_id [filename] %} {% gist 0358ce6eb43ef15f853a [filename] %} iframe在文章中插入 iframe,适用于视频、音频等。 {% iframe url [width] [height] %} YouTube视频 Bilibili视频{% iframe https://www.bilibili.com/blackboard/html5mobileplayer.html?aid=82766716&bvid=BV1FJ411V7gy&cid=147308234&page=1&high_quality=1 %} 是否自动播放(默认否):autoplay默认弹幕开关(默认开启):danmaku是否默认静音(默认否):muted一键静音按钮是否显示(默认不显示):hasMuteButton视频封面下方是都显示播放量弹幕量等信息(默认显示):hideCoverInfo是否隐藏弹幕按钮(默认不隐藏):hideDanmakuButton是否隐藏全屏按钮(默认显示):noFullScreenButton是否开始记忆播放(默认开启):fjw默认开始时间(单位秒,默认0):t是否显示高清(默认否):highQuality(无用的,因为除了参数外它还判断了网址是否来自bilibili) 网易云音乐单曲 歌单 Spotify(试听) QQ音乐(失败){% iframe https://i.y.qq.com/v8/playsong.html?songid=357531938&songtype=0 %} Image在文章中插入指定大小的图片。 {% img [class names] /path/to/image [width] [height] '"title text" "alt text"' %} ![图片](/images/1.png) {% img [a] /images/1.png [50] [50] '"这是一张图片" "无图片时的替代文字"' %} Link在文章中插入链接,并自动给外部链接添加 target="_blank" 属性。 text url [external] [title] Include Code插入 source/downloads/code 文件夹内的代码文件。source/downloads/code 不是固定的,取决于你在配置文件中 code_dir 的配置。 样例嵌入 test.js 文件全文 只嵌入第 3 行 嵌入第 5 行至第 8 行 嵌入第 5 行至文件结束 嵌入第 1 行至第 8 行 Youtube在文章中插入 Youtube 视频。 {% youtube video_id [type] [cookie] %} Examples视频 播放列表 隐私模式 禁止 YouTube cookie Vimeo在文章中插入 Vimeo 视频。 {% vimeo video_id %} 引用文章引用其他文章的链接。 Post not found: filename [title] [escape] 在使用此标签时可以忽略文章文件所在的路径或者文章的永久链接信息、如语言、日期。 例如,在文章中使用 {% post_link how-to-bake-a-cake %} 时,只需有一个名为 how-to-bake-a-cake.md 的文章文件即可。即使这个文件位于站点文件夹的 source/posts/2015-02-my-family-holiday 目录下、或者文章的永久链接是 2018/en/how-to-bake-a-cake,都没有影响。 默认链接文字是文章的标题,你也可以自定义要显示的文本。 默认对文章的标题和自定义标题里的特殊字符进行转义。可以使用escape选项,禁止对特殊字符进行转义。 链接使用文章标题 Post not found: hexo-3-8-released Hexo 3.8.0 Released 链接使用自定义文字 Post not found: hexo-3-8-released 通往文章的链接 通往文章的链接 引用资源引用文章的资源,与 资源文件夹 一起使用。 嵌入图片hexo-renderer-marked 3.1.0+ 可以(可选)自动解析图片的文章路径,参考 本节 如何启用它。 “foo.jpg” 位于 http://example.com/2020/01/02/hello/foo.jpg。 默认(无选项) <img src="/2020/01/02/hello/foo.jpg"> 自定义 class 属性 <img src="/2020/01/02/hello/foo.jpg" class="post-image"> title 和 alt 属性 <img src="/2020/01/02/hello/foo.jpg" title="lorem ipsum" alt="dolor"> Raw如果您想在文章中插入 Swig 标签,可以尝试使用 Raw 标签,以免发生解析异常。 content 文章摘要和截断在文章中使用 <!-- more -->,那么 <!-- more --> 之前的文字将会被视为摘要。首页中将只出现这部分文字,同时这部分文字也会出现在正文之中。 例如: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 首页中将只会出现 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 正文中则会出现 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 注意,摘要可能会被 Front Matter 中的 excerpt 覆盖。 Updated on 2023-07-14 Refer to https://www.imaegoo.com/2020/icarus-with-bulma/ for reference. 按钮 Info Success Warning Danger 点击展开代码 >folded<div class="buttons"> <button class="button is-info">Info</button> <button class="button is-success">Success</button> <button class="button is-warning">Warning</button> <button class="button is-danger">Danger</button></div> 光有按钮肯定是不行的,一般我们还需要给按钮增加事件,比如点击下面的按钮,可以显示一条一言(Hitokoto)。 显示一言 ↑↑↑ 试着点击“显示一言”! function showHitokoto (event) { event.target.classList.add('is-loading'); $.ajax({ type: 'GET', url: 'https://v1.hitokoto.cn/', success: function (data) { $('.hitokoto').text(data.hitokoto); event.target.classList.remove('is-loading'); } }); } 点击展开代码 >folded<button class="button is-info" onclick="showHitokoto(event)">显示一言</button><blockquote class="hitokoto">↑↑↑ 试着点击“显示一言”!</blockquote><script>function showHitokoto (event) { event.target.classList.add('is-loading'); $.ajax({ type: 'GET', url: 'https://v1.hitokoto.cn/', success: function (data) { $('.hitokoto').text(data.hitokoto); event.target.classList.remove('is-loading'); } });}</script> 进度条 点击展开代码 >folded<progress class="progress is-info" value="20" max="100"></progress><progress class="progress is-success" value="40" max="100"></progress><progress class="progress is-warning" value="60" max="100"></progress><progress class="progress is-danger" value="80" max="100"></progress><progress class="progress is-info" max="100"></progress> 标签页 Pictures Music Videos Documents Pixabay 是全球知名的图库网站及充满活力的创意社区,拥有上百万张免费正版高清照片素材,涵盖风景、人物、动态、静物等多种分类,你可以在任何地方使用 Pixabay 图库中的素材… 网易云音乐 是一款专注于发现与分享的音乐产品,依托专业音乐人、DJ、好友推荐及社交功能,为用户打造全新的音乐生活。 哔哩哔哩 是国内知名的视频弹幕网站,这里有最及时的动漫新番,最棒的ACG氛围,最有创意的Up主。大家可以在这里找到许多欢乐。 石墨文档 是全新一代云 Office 办公软件,支持多人在线协作编辑文档和表格,独有内容级安全,全过程留痕可追溯。PC 端和移动端全覆盖,随时随地远程办公。即写即存… .content .tabs ul { margin: 0; } .tab-content { display: none; } function onTabClick (event) { var tabTitle = $(event.currentTarget).children('span:last-child').text(); $('.article .content .tab-content').css('display', 'none'); $('.article .content .tabs li').removeClass('is-active'); $('#' + tabTitle).css('display', 'block'); $(event.currentTarget).parent().addClass('is-active'); } Pixabay 是全球知名的图库网站及充满活力的创意社区,拥有上百万张免费正版高清照片素材,涵盖风景、人物、动态、静物等多种分类,你可以在任何地方使用 Pixabay 图库中的素材… 点击展开代码 >folded<div class="tabs is-toggle"><ul><li class="is-active"><a onclick="onTabClick(event)"><span class="icon is-small"><i class="fas fa-image" aria-hidden="true"></i></span><span>Pictures</span></a></li><li><a onclick="onTabClick(event)"><span class="icon is-small"><i class="fas fa-music" aria-hidden="true"></i></span><span>Music</span></a></li><li><a onclick="onTabClick(event)"><span class="icon is-small"><i class="fas fa-film" aria-hidden="true"></i></span><span>Videos</span></a></li><li><a onclick="onTabClick(event)"><span class="icon is-small"><i class="far fa-file-alt" aria-hidden="true"></i></span><span>Documents</span></a></li></ul></div>{% raw %}<div id="Pictures" class="tab-content" style="display: block;">{% endraw %}[Pixabay](https://pixabay.com/zh/) 是全球知名的图库网站及充满活力的创意社区,拥有上百万张免费正版高清照片素材,涵盖风景、人物、动态、静物等多种分类,你可以在任何地方使用 Pixabay 图库中的素材...{% raw %}</div>{% endraw %}{% raw %}<div id="Music" class="tab-content">{% endraw %}[网易云音乐](https://music.163.com/) 是一款专注于发现与分享的音乐产品,依托专业音乐人、DJ、好友推荐及社交功能,为用户打造全新的音乐生活。{% raw %}</div>{% endraw %}{% raw %}<div id="Videos" class="tab-content">{% endraw %}[哔哩哔哩](https://www.bilibili.com/) 是国内知名的视频弹幕网站,这里有最及时的动漫新番,最棒的ACG氛围,最有创意的Up主。大家可以在这里找到许多欢乐。{% raw %}</div>{% endraw %}{% raw %}<div id="Documents" class="tab-content">{% endraw %}[石墨文档](https://shimo.im/) 是全新一代云 Office 办公软件,支持多人在线协作编辑文档和表格,独有内容级安全,全过程留痕可追溯。PC 端和移动端全覆盖,随时随地远程办公。即写即存...{% raw %}</div>{% endraw %}<style type="text/css">.content .tabs ul { margin: 0; }.tab-content { display: none; }</style><script>function onTabClick (event) { var tabTitle = $(event.currentTarget).children('span:last-child').text(); $('.article .content .tab-content').css('display', 'none'); $('.article .content .tabs li').removeClass('is-active'); $('#' + tabTitle).css('display', 'block'); $(event.currentTarget).parent().addClass('is-active');}</script> 彩色突出 Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<div class="notification is-info">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<div class="notification is-success">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<div class="notification is-warning">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<div class="notification is-danger">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<article class="message is-info"><div class="message-body">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div></article>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<article class="message is-success"><div class="message-body">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div></article>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<article class="message is-warning"><div class="message-body">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div></article>{% endraw %} Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<article class="message is-danger"><div class="message-body">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div></article>{% endraw %} 活用 Bulma 美化 Icarus 文章 Icarus 主题以白色的简洁为主,但有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以在此分享一下我的高级玩法。 点击展开代码 >folded{% raw %}<article class="message is-info"><div class="message-header">{% endraw %}活用 Bulma 美化 Icarus 文章{% raw %}</div><div class="message-body">{% endraw %}[Icarus](https://blog.zhangruipeng.me/hexo-theme-icarus/) 主题以白色的简洁为主,但有时候我们希望在文章中用**特别的样式**注明一些内容,*markdown* 语法就不够用了,所以在此分享一下我的高级玩法。{% raw %}</div></article>{% endraw %} 点击展开代码点击展开代码 >foldedconsole.log('I love Icarus!'); 你知道的太多了 .heimu { color: #000; background-color: #000; } .heimu:hover { color: #fff; } iMaeGoo 出自独立游戏 World of Goo 里小粘球的叫声,读作 /ɪ’mæɡu/ 不是爱妹狗啊,在家里电脑还是个大头(CRT)的时候就在玩了,其实头像也是在当时设定的,一直沿用至今。找不到女朋友誓不改头像 点击展开代码 >folded{% raw %}<style type="text/css">.heimu { color: #000; background-color: #000; }.heimu:hover { color: #fff; }</style>{% endraw %}**iMaeGoo** 出自独立游戏 [World of Goo](https://store.steampowered.com/app/22000/) 里小粘球的叫声,读作 /ɪ'mæɡu/ {% raw %}<span class="heimu">不是爱妹狗啊</span>{% endraw %},在家里电脑还是个大头(CRT)的时候就在玩了,其实头像也是在当时设定的,一直沿用至今。{% raw %}<span class="heimu">找不到女朋友誓不改头像</span>{% endraw %} 让简介不出现在正文我们知道 Hexo 用 <!-- more --> 可以分隔简介和正文部分,但这样简介也会在正文中出现,如果我们不想让简介部分出现在正文呢? 点击展开代码 >folded这里的内容会出现在 **简介和正文**{% raw %}<div class="post-summary">{% endraw %}这里的内容只会出现在 **简介**{% raw %}</div>{% endraw %}<!-- more --><style type="text/css">.post-summary { display: none; }</style>这里的内容只会出现在 **正文** 封面图来源声明 Vector Landscape Vectors by Vecteezy 点击展开代码 >folded<a class="tag is-dark is-medium" href="https://www.vecteezy.com/free-vector/vector-landscape" target="_blank"><span class="icon"><i class="fas fa-camera"></i></span>&nbsp;&nbsp;Vector Landscape Vectors by Vecteezy</a> 另一种标签 从源码安装 使用NPM安装 一个示例 FileName.pyxxiao.org/markdownprint("Hello, world!") # 源码 另一个示例 FileName.pyxxiao.org/markdownprint("Hello, world!") # NPM .content .tabs ul { margin: 0; } .tabcontent { display: none; } function TabClick (event) { var tabTitle = $(event.currentTarget).children('span:last-child').text(); $('.article .content .tabcontent').css('display', 'none'); $('.article .content .tabs li').removeClass('is-active'); $('#' + tabTitle).css('display', 'block'); $(event.currentTarget).parent().addClass('is-active'); } <div class="tabs is-boxed"><ul><li class="is-active"><a><span class="icon is-small"><i class="fas fa-file-code" aria-hidden="true"></i></span><span>从源码安装</span></a></li><li><a><span class="icon is-small"><i class="fas fa-cubes" aria-hidden="true"></i></span><span>使用NPM安装</span></a></li></ul></div> Updated on 2023-07-15 Refer to http://yearito.cn/posts/hexo-writing-skills.html for reference. 代码显示diff_config.ymlhighlight: enable: true line_number: false- auto_detect: false+ auto_detect: true tab_replace: 如果设置语言为 diff,可以在代码前添加 + 和 - 来使用如上所示的高亮增删行提示效果,在展示代码改动痕迹时比较实用。 引用站内链接可以通过如下语法引入站内文章的地址或链接: {% post_path slug %}{% post_link slug [title] %} 其中,slug 表示 _post 目录下的 Markdown 文件名。 post_path 标签将会渲染为文章的地址,即 permalink;而 post_link 标签将会渲染为链接,可以通过 title 指定链接标题。 以下标签则会生成 链接标题 {% post_link markdown 链接标题 %} Post not found: markdown 链接标题 这种站内引用方式比直接使用 url 引用的形式更为可靠,因为即使修改了 permalink 格式,或者修改了文章的路由地址,只要 Markdown 文件名没有发生改变,引用链接都不会失效。 插入 Swig 代码如果需要在页面内插入 Swig 代码,包括原生 HTML 代码,JavaScript 脚本等,可以通过 raw 标签来禁止 Markdown 引擎渲染标签内的内容。语法如下: {% raw %}content{% endraw %} 该标签通常用于在页面内引入三方脚本实现特殊功能,尤其是当该三方脚本尚无相关 hexo 插件支持的时候,可以通过写原生 Web 页面的形式引入脚本并编写实现逻辑。 插入 Gist如果需要在页面内插入 Gist 上的代码片段时,可以使用如下标签: {% gist gist_id [filename] %} 其中,各参数意义如下: gist_id: Gist 仓库页面 url 中最后一段随机字符串 filename: Gist 中的文件名 如果 Gist 中只有一个文件,可以不用指定 filename,也可以通过 JavaScript 脚本的形式直接引入,如: <script src="https://gist.github.com/Coodool/cb4ff46a3523955dd4b918dd775b6774.js"></script> 如果 Gist 中有多个文件,可以在标签内输入 filename 来指定只引入某个文件,如果没有指定 filename,将会引入 Gist 中的所有文件。另外,引用 JavaScript 脚本形式无法精确控制只引入某一个文件,将会同时引入 Gist 中的所有文件。 如果指定了与 Gist 无法匹配的 filename,页面上将不会显示任何标签内容。所以,一般在 Gist 只有一个文件的情况下无需指定 filename。 在页面中引入 Gist 代码段将会同时从 github 服务器上下载脚本与 CSS 样式文件,由于国内访问 github 服务器延迟较高,往往资源文件连接和下载的速度很慢,会阻塞页面的渲染进程导致短时白屏。","link":"/md/"},{"title":"Solutions of Music for Windows and Android Platforms","text":"Music is an integral part of our lives, especially when we are sitting in front of a computer or using our smartphones for other tasks. We always want to have some music playing. However, over the years, I have not been able to find the best solution on either Windows or Android (as these are the platforms I primarily use/own). But today, I can finally say that I have found a more comprehensive solution. This article is also available in 简体中文, Français. Reflecting on my musical journeyLike many users in mainland China, I started my music journey with Qianqian Jingting and KuGou Music (both on Windows and Android), and fell in love with listening to music. Next, QQ Music and NetEase Cloud Music dominated the market. While Tencent and NetEase did develop music software that suited Chinese users, they couldn’t resist the temptation of making their software into comprehensive monsters. Additionally, the pricing was a major deterrent for someone like me, who was not well off financially. So, after enduring the torment of these apps for a few years, I gradually abandoned music. Later, with the improvement of internet capabilities, I developed a habit of playing music on YouTube webpages whenever I opened my computer. However, there was a problem: it only provided audio without lyrics. As someone who enjoys singing along, I always had to return to the playback page to read the subtitles. I endured this situation for about 1 to 2 years. Until one fortunate day, I stumbled upon today’s protagonist - Spotify. Why Spotify?In the words of others, “Spotify, known as Si Bo (思播) or Sheng Tian (声田) in Chinese, is an online music streaming service platform. It is currently one of the largest music streaming service providers globally and holds the most extensive music copyrights in the world, unmatched by any other platform. Whether you are a premium subscriber or a free user, you can access the same songs, unlike many domestic software in China that restricts a significant number of songs to premium members only! Wealthy customers can purchase premium memberships to enjoy additional benefits, including offline downloads, ad-free listening, unlimited song skipping, and supposedly better audio quality. However, for users who cannot afford a premium membership, there’s no need to worry as the content available for listening remains the same. The only limitations are the inability to skip songs and the occasional audio ads during playback.” But as a freeloader like myself, I couldn’t tolerate these limitations. It’s manageable on the desktop version where I can skip songs, and I can block audio ads using Clash rules. However, on the mobile app, I can’t skip songs, and that’s the primary issue that needs to be addressed. Solutions for Android PlatformSpotifySo, I searched for modified versions on GitHub, and as expected, the largest music streaming platform in the world is indeed better than QQ Music and NetEase Cloud Music. I found a modified version that addresses various issues when using Spotify on the Android platform. With this modified installation package, you can enjoy unlimited song skipping and ad-free listening. However, non-premium users cannot download music, and breaking the 14-day global roaming limitation is still not possible. You need to log in again in the network environment of the country where your account was registered every two weeks, which is a bit inconvenient but not a significant issue. Unfortunately, there is no floating lyrics feature, but hopefully, this is something developers will address in the future. Kugou Music Concept EditionThis is the only music platform left in China where you can still get a one-day premium membership by listening to music every day. It offers new features like lyrics in the notification bar. However, based on my observation, once Tencent achieves its goal of gradually eroding the user base of NetEase Cloud Music, they might introduce ads and potentially stop offering free premium memberships. This can only serve as an alternative, albeit an unstable solution. The advantage is that it can be installed and used on both iOS and Android, but the only drawback is the absence of a desktop application. Otherwise, I might have chosen Kugou Music over Spotify. Solutions for Windows PlatformThe biggest issue with Spotify on Windows is not just about whether you have a Premium subscription or not; it’s the lack of advanced lyric display features compared to domestic music software like QQ Music and NetEase Cloud Music. That’s why I haven’t been using Spotify much on the desktop. However, recently I discovered a nearly perfect solution for displaying lyrics called Lyricify. (To be honest, I had discovered it before, but it wasn’t fully developed or maybe I didn’t explore its capabilities enough to realize its power.) Lyricify at least addresses the problem of displaying lyrics on the desktop version of Spotify and offers some new features, including Lingdong Island lyrics. Furthermore, I want to express my gratitude to the developer who provided me with a modified version of Spotify for the Windows platform called SpotX. This modification also takes care of audio ads. With these solutions, I can finally say that I have found music solutions for both Windows and Android platforms. The overall experience has been excellent (except for occasional glitches in lyric switching with Lyricify, which will hopefully be resolved by the developer or through a Premium subscription). I also look forward to the development of Lyricify Mobile to address the issue of lyric display on mobile devices. Otherwise, I will still rely on the Kugou Music Concept Edition on my phone. PremiumAfter experiencing Spotify for a while longer, if I become accustomed to it, I might consider subscribing to Spotify Premium. The process of acquiring a Premium subscription can be quite complex, so I would like to mention a third-party store called xiaomao.de that provides services related to Spotify Premium. TV PlatformBasically, TV also belongs to the Android platform, but the solutions cannot be entirely borrowed from the Android platform. TV is primarily meant for family use, so simplicity and convenience are of utmost importance. Without the Premium version of Spotify, it is not a preferable choice as one might need to log in again every 14 days. Additionally, without the karaoke mode, it lacks the soul of playing music on the TV, where one can enjoy karaoke sessions with relatives and friends in the living room. There used to be dedicated karaoke solutions like Quanming Karaoke, which provided a decent experience on the TV, but unfortunately, the modified version didn’t last long. Therefore, the solution for this aspect is yet to be explored… 说到 TV 端,可能大部分人现在都不怎么看电视台了,家里的电视主要是网络电视,看各大平台的网络直播和剧集。正好去年双 11 给家里搞了一台 Redmi X Pro。当然,除了电视设备的钱,想要看各种直播和剧集还得继续加钱。由于我一般不容易妥协,而且这么多服务一年也挺贵的,烧不起这个钱。于是针对央视卫视直播、各大网络直播平台(虎牙、斗鱼、抖音和快手等)、电视 K 歌和游戏等方面进行了探索。 当然,现在大部分电视都是 Android 系统,所以软件的安装上还是 Android 那一套,只是有些电视品牌在自行安装软件时会设置一些障碍。尽量避坑这些品牌。 📺 直播 & 剧集Tivimate 是 Android 电视极佳的直播神器,能满足基本的直播需求。 我的各大电视直播 IPTV 直播源存档在 https://github.com/LeonoreShaw/IPTV 。 各大网络直播平台(虎牙、斗鱼、抖音和 YY 等)查看 https://live.xxiao.org 。 关于剧集,重要的是资源。一般除了院线电影,绝大部分流媒体资源都能 rip 下来,同步上线网盘,很多人做这个收集分享,主要是阿里网盘。 TVBox 通过爬虫已有资源,可以无缝访问这些资源,加上直播功能,是直播 & 剧集的集成者,按道理只要这一个 APP 就行了。 2023-10-06 更新这个假期主要是解决家里用 IPV6 看直播的问题,使用的是“OTT Navigator”,辅以“Tivimate”。无意发现“影视 TV”已经同时解决了直播、点播的问题,且体验非常不错。 🎤 K 歌如之前所述,to be explored... 最好再配几个麦克风 😃 2023-10-06 更新K 歌可能比较难办,现在将就用“网易云音乐”,至少放歌没有太大问题。 🎮 游戏买电视送了个手柄,可以再买一对几个人一起玩。主要是玩一些红白机游戏。很多类似的 APP。 2023-10-06 更新还是沿用“小鸡模拟器”,唯一问题是游戏像快进了一样。 Listen on Spotify together!Music plays a significant role in my life and brings me joy. If you’d like to get a glimpse into my musical preferences, here’s a Spotify widget showcasing my recent listening habits. Andrew Novacwww.novac.dev Recently played one Recent playlist","link":"/music-en/"},{"title":"Start from GitHub","text":"Why GitHub——GitHub is a gathering place for the world’s top developers, where you can find almost anything you want. There are many excellent and well-known open source projects shared above. You can use and download these open source projects for free under the premise of complying with their licenses. This is also the most attractive part of GitHub. 可选文件名.py >foldedprint("Hello World!") test.pyimport matplotlibprint('Hello World!') SecondGitHub Pages provides a static web hosting service. It obtains HTML, CSS, and JavaScript files directly from the warehouse on GitHub, and then builds and publishes the website. You can view examples of the GitHub Pages site in the GitHub Pages sample collection.GitHub provides a free github.io subdomain and also supports custom domain names.","link":"/github/"},{"title":"Bid Farewell to the Old and Welcome the New","text":"It’s been several years since I last wrote an annual summary, and this year I happen to have the opportunity and time to do so. Let me briefly review and document it… Changed to a new place.From Jiangcheng to Yuhang, I moved down the mountain. The school is brand new, and I have a better living experience here. I’ve made some really good friends. However, there are a lot of pressures in other aspects, and it feels like I brought them upon myself, hhh… In other aspects…I feel that I have entered the ranks of mid-level players, and in the future, I may not have much time to invest in this aspect anymore. I will update as time permits and go with the flow.","link":"/new/"},{"title":"Introducing a Brand New Technology of Building VPS Nodes","text":"Easier More secure ☠️ Nodes set up using the previous method are no longer operational. TLS has been accurately detected, and the IP ports may have been blocked. Due to various reasons, the nodes that were previously set up have been detected and had their ports and IP addresses blocked. In any case, they are no longer usable. This led to the development of improved methods for setting up new nodes. VPS PurchaseProviders like BandwagonHost, Cloudcone, and Recknerd, etc. I am reinstalling the system directly on the existing VPS. Recording VPS InformationIP Address: 1.2.3.4 Port: 22 Username: root Password: *** Logging into VPS using SSH Tool. You can use any SSH tool you prefer, such as XShell, FinalShell, etc. Windows users can also utilize Windows Terminal. If using Windows Terminal, enter the following command in the command line: ssh.sh© xxiao.orgssh root@[IP] -p [Port,ig `22`] Example ssh.sh© xxiao.orgssh root@1.2.3.4 -p 22 Replace 1.2.3.4 with your VPS IP address and enter the password when prompted. Open the firewall for the relevant ports. Installing X-UIAfter successful login, use the following command to install x-ui: x-ui.sh© xxiao.orgbash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/956bf85bbac978d56c0e319c5fac2d6db7df9564/install.sh) 0.3.4.4 The installation process may take some time. After the installation is complete, you will be prompted to set a username and password: Username: admin Password: admin Panel Access Port: 10000 Logging into X-UIAccess [IP Address]:10000 using the provided username and password. After successful login, select Change Version and choose 1.8.3. 👻 The installation of the X-UI panel is complete, and all preliminary preparations are in place. Next, let’s proceed with setting up three different types of nodes. vmess + ws在 x-ui 面板点击 入站列表,并点击 添加入站 备注:vmess+ws 协议:vmess 端口默认,如15241 点击添加用户旁的+,以添加一个用户 网络:ws 路径:/加上 id 部分的前面一小段,如 /ae23a504 最后点击添加,以完成搭建 vless + version在 x-ui 面板点击 入站列表,并点击 添加入站 备注:vless+version 协议:vless 点击添加用户旁的+,以添加一个用户 flow: xtls-rprx-version 启用 tls 域名:将 . 改为 -,并在末尾加上 .nip.io。复制此域名,在申请证书时使用 搭建vision节点申请证书(在 SSH 工具中运行以下命令) 安装证书工具 安装证书工具.sh© xxiao.orgcurl https://get.acme.sh | sh; apt install socat -y || yum install socat -y; ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt 三种方式任选其中一种,申请失败则更换方式 将你的域名更换为复制的.nio.io结尾的域名后再运行命令。 申请证书方式1 申请证书方式1.sh© xxiao.org~/.acme.sh/acme.sh --issue -d 你的域名 --standalone -k ec-256 --force --insecure 申请证书方式2 申请证书方式2.sh© xxiao.org~/.acme.sh/acme.sh --register-account -m "${RANDOM}@chacuo.net" --server buypass --force --insecure && ~/.acme.sh/acme.sh --issue -d 你的域名 --standalone -k ec-256 --force --insecure --server buypass 申请证书方式3 申请证书方式3.sh© xxiao.org~/.acme.sh/acme.sh --register-account -m "${RANDOM}@chacuo.net" --server zerossl --force --insecure && ~/.acme.sh/acme.sh --issue -d 你的域名 --standalone -k ec-256 --force --insecure --server zerossl 安装证书 安装证书.sh© xxiao.org~/.acme.sh/acme.sh --install-cert -d 你的域名 --ecc --key-file /etc/x-ui/server.key --fullchain-file /etc/x-ui/server.crt 公钥/密钥文件路径:安装证书成功后会显示,直接粘贴至 x-ui 面板 最后点击添加,以完成搭建 vless + version + reality在 x-ui 面板点击 入站列表,并点击 添加入站 备注:vless+version+reality 协议:vless 端口:443 点击添加用户旁的+,以添加一个用户 flow: xtls-rprx-version 启用 reality 目标网站:1.1.1.1:443 可选域名:复制 id 部分的前面一小段,结尾加上 .com,如 ae23a504.com 最后点击添加,以完成搭建 导入节点完成任意一种节点搭建后,将其导入至客户端(V2ray、Clash 等) 在 x-ui 面板的任意节点 点击操作 点击二维码 点击复制 在任意客户端 从剪贴板导入节点 🚀 Node setup is completeThe node setup is completed based on the improvement to address the issue of port and IP blocking encountered in previous node setups. Due to its unique nature, there’s a possibility that this approach may become ineffective in the future. However, efforts will continue to be made to improve and update the setup process.","link":"/node/"},{"title":"Solving Nonlinear Schrödinger Equation in Python","text":"The Nonlinear Schrödinger Equation( $\\alpha=0$ ):$$\\frac{\\partial A}{\\partial z}=-\\frac{\\alpha}{2}A-i \\frac{\\beta_2}{2} \\frac{\\partial^2 A}{\\partial T^2}+i\\gamma|A|^2A$$ displays how the envelope and phase of an optical pulse change as it propagates through an optical fiber, taking into account attenuation $\\alpha$ , group velocity dispersion (GVD) $\\beta_2$ and self-phase modulation (SPM) $\\gamma$ caused by nonlinearity. This article will demonstrate the use of the Split-Step Fourier method to solve the Nonlinear Schrödinger Equation in Python. This article is also available in 简体中文, Français. the Basic Idea of Split-Step Fourier methodOptical pulses are generally represented by the envelope $A$ and the carrier wave $E$ . Because the effect of self-phase modulation $\\gamma$ on the pulse only has an analytical solution in the time domain: $$A(t, z+\\Delta z)=A(t, z)e^{i\\gamma \\Delta z|A(t, z)|^2}$$ The effect of group velocity dispersion $\\beta_2$ on the pulse only has an analytical solution in the frequency domain: $$\\tilde{A}(\\omega, z+\\Delta z)=\\tilde{A}(\\omega, z)e^{i\\frac{\\beta_2}{2}(\\omega-\\omega_0)^2\\Delta z}$$ Therefore, it is necessary to first calculate the effect of SPM in the time domain, then Fourier transform to the frequency domain to calculate the effect of GVD and attenuation, and finally use the inverse Fourier transform to return to the time domain. The basic idea can be expressed as: $$A(t, z+\\Delta z)= \\underbrace{iFFT}_4 [\\underbrace{e^{i\\frac{\\beta_2}{2}(\\omega-\\omega_0)^2\\Delta z-\\frac{\\alpha}{2}\\Delta z}}_3 \\underbrace{FFT}_2[\\underbrace{e^{i\\gamma|A(T, z)|^2\\Delta z} A(T, z)}_1]]$$ Results Display (multiple figures warning) The source code could be found in my GitHub repository. Click the moon icon in the upper right corner to turn on dark mode for a better experience. The effects of attenuation, dispersion, and self-phase modulation on the pulse are displayed separately, followed by the results of their combined action. Effects of attenuation onlyThe attenuation of typical optical fibers is 0.2 dB/km@1550nm. The following results show the power change of the output pulse in the time domain when the input Gaussian pulse enters a 1km fiber with only attenuation effects. The following results show the power change of the output pulse in the frequency domain when the input Gaussian pulse enters a 1km fiber with only attenuation effects. From the changes in the input and output pulses, it can be seen that only part of the energy is attenuated in the 1km fiber. Effects of dispersion onlyThe group velocity dispersion parameter $\\beta_2$ is set to $+100*10^3fs^2/m$. The following results show the power change of the output pulse in the time domain when the input Gaussian pulse enters a 1km fiber with only dispersion effects. The following results show the change in the pulse intensity in the time domain as the transmission distance increases after inputting a Gaussian pulse into a 1km optical fiber with only chromatic dispersion effect. The following results show the chirp change of the output pulse in the time domain when the input Gaussian pulse enters a 1km fiber with only dispersion effects. Dispersion causes the pulse to broaden in the time domain, with low-frequency light accumulating at the leading edge of the pulse and high-frequency light accumulating at the trailing edge (the negative time axis corresponds to the leading edge of the pulse, and the positive axis corresponds to the trailing edge of the pulse). This corresponds to negative (red) chirp ( $\\beta_2>0$ ) (normal dispersion). Effects of self-phase modulation only非线性系数 $\\gamma$ 设置为 $10*10^{-3}rad/(W\\cdot m)$ 。以下结果显示了输入高斯脉冲进入只有自相位调制效应的1km光纤后在频域上输出脉冲的变化。 以下结果显示了输入高斯脉冲进入只有自相位调制效应的1km光纤后随着传输距离的增加在频域上脉冲的频率变化。 以下结果显示了输入高斯脉冲进入只有自相位调制效应的1km光纤后随着传输距离的增加在频域上脉冲的频率变化的3D视图。 从以上结果可以看出,自相位调制改变了脉冲的频谱。中心频率功率减小并向两边进行展宽,分别分开成两个对称的峰,随着传输距离的增加,两个峰之间又出现两个对称的小峰值。 综合考虑衰减、色散和自相位调制光纤的参数设置为: 光线长度为 $1000m$ 衰减为 $0.2 dB/km@1550nm$ 群速度色散参量 $\\beta_2$ 为 $+100*10^3fs^2/m$ 非线性系数 $\\gamma$ 设置为 $10*10^{-3}rad/(W\\cdot m)$ 仿真参数设置为: 时域 脉冲宽度[-60, 60]ps 强度截止范围-30dB 频域 频谱范围~[-120, 120]GHz 强度截止范围-30dB 时域的结果 频域的结果 附录附上部分生成综合考虑衰减、色散和自相位调制图片的源代码作为参考。 plot.pySSFM.ipynbimport numpy as npfrom scipy.fftpack import fft, ifft, fftshift, ifftshift, fftfreqimport matplotlibimport matplotlib.pyplot as pltfrom matplotlib import cmglobal pi; pi=np.pi def plotFirstAndLastPulse(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int,**kwargs): t=sim.t[int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]*1e12 plt.figure() plt.title("Initial pulse and final pulse") plt.plot(t,getPower(matrix[0,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]),label="Initial Pulse") plt.plot(t,getPower(matrix[-1,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]),label="Final Pulse") #plt.axis([-duration*5*1e12,duration*5*1e12,0,1.05*amplitude**2]) plt.xlabel("Time [ps]") plt.ylabel("Power [W]") plt.legend() saveplot('first_and_last_pulse',**kwargs) plt.show() def plotPulseMatrix2D(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int, dB_cutoff,**kwargs): #Plot pulse evolution throughout fiber in normalized log scale fig, ax = plt.subplots() ax.set_title('Pulse Evolution (dB scale)') t = sim.t[int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]*1e12 z = fiber.zlocs T, Z = np.meshgrid(t, z) P=getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)] )/np.max(getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)])) P[P<1e-100]=1e-100 P = 10*np.log10(P) P[P<dB_cutoff]=dB_cutoff surf=ax.contourf(T, Z, P,levels=40) ax.set_xlabel('Time [ps]') ax.set_ylabel('Distance [m]') cbar=fig.colorbar(surf, ax=ax) saveplot('pulse_evo_2D',**kwargs) plt.show()def plotPulseMatrix3D(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int, dB_cutoff,**kwargs): #Plot pulse evolution in 3D fig, ax = plt.subplots(1,1, figsize=(10,7),subplot_kw={"projection": "3d"}) plt.title("Pulse Evolution (dB scale)") t = sim.t[int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]*1e12 z = fiber.zlocs T_surf, Z_surf = np.meshgrid(t, z) P_surf=getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)] )/np.max(getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)])) P_surf[P_surf<1e-100]=1e-100 P_surf = 10*np.log10(P_surf) P_surf[P_surf<dB_cutoff]=dB_cutoff # Plot the surface. surf = ax.plot_surface(T_surf, Z_surf, P_surf, cmap=cm.viridis, linewidth=0, antialiased=False) ax.set_xlabel('Time [ps]') ax.set_ylabel('Distance [m]') # Add a color bar which maps values to colors. fig.colorbar(surf, shrink=0.5, aspect=5) saveplot('pulse_evo_3D',**kwargs) plt.show()def plotPulseChirp2D(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int,**kwargs): #Plot pulse evolution throughout fiber in normalized log scale fig, ax = plt.subplots() ax.set_title('Pulse Chirp Evolution') t = sim.t[int(sim_config.number_of_points/2-nrange):int(sim_config.number_of_points/2+nrange)]*1e12 z = fiber.zlocs T, Z = np.meshgrid(t, z) Cmatrix=np.ones( (len(z),len(t)) )*1.0 for i in range(fiber.ntraces): Cmatrix[i,:]=getChirp(t/1e12,matrix[i,int(sim_config.number_of_points/2-nrange):int(sim_config.number_of_points/2+nrange)])/1e9 for kw, value in kwargs.items(): if kw.lower()=='chirpplotrange' and type(value)==tuple: Cmatrix[Cmatrix<value[0]]=value[0] Cmatrix[Cmatrix>value[1]]=value[1] surf=ax.contourf(T, Z, Cmatrix,levels=40,cmap='RdBu') ax.set_xlabel('Time [ps]') ax.set_ylabel('Distance [m]') cbar=fig.colorbar(surf, ax=ax) cbar.set_label('Chirp [GHz]') saveplot('chirp_evo_2D',**kwargs) plt.show()def plotEverythingAboutPulses(pulseMatrix,fiber:Fiber_config, sim:SIM_config, nrange:int, dB_cutoff, **kwargs): print(' ') plotFirstAndLastPulse(pulseMatrix,fiber,sim, nrange,**kwargs) plotPulseMatrix2D(pulseMatrix,fiber,sim,nrange,dB_cutoff,**kwargs) plotPulseChirp2D(pulseMatrix,fiber,sim,nrange,**kwargs) plotPulseMatrix3D(pulseMatrix,fiber,sim,nrange,dB_cutoff,**kwargs) print(' ') def plotFirstAndLastSpectrum(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int,**kwargs): f=sim.f[int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]/1e9 plt.figure() plt.title("Initial spectrum and final spectrum") plt.plot(f,getPower(matrix[0,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)])*1e9,label="Initial Spectrum") plt.plot(f,getPower(matrix[-1,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)])*1e9,label="Final Spectrum") plt.xlabel("Freq. [GHz]") plt.ylabel("PSD [W/GHz]") plt.legend() saveplot('first_and_last_spectrum',**kwargs) plt.show()def plotSpectrumMatrix2D(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int, dB_cutoff,**kwargs): #Plot pulse evolution throughout fiber in normalized log scale fig, ax = plt.subplots() ax.set_title('Spectrum Evolution (dB scale)') f = sim.f[int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]/1e9 z = fiber.zlocs F, Z = np.meshgrid(f, z) Pf=getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)] )/np.max(getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)])) Pf[Pf<1e-100]=1e-100 Pf = 10*np.log10(Pf) Pf[Pf<dB_cutoff]=dB_cutoff surf=ax.contourf(F, Z, Pf,levels=40) ax.set_xlabel('Freq. [GHz]') ax.set_ylabel('Distance [m]') cbar=fig.colorbar(surf, ax=ax) saveplot('spectrum_evo_2D',**kwargs) plt.show()def plotSpectrumMatrix3D(matrix,fiber:Fiber_config,sim:SIM_config, nrange:int, dB_cutoff,**kwargs): #Plot pulse evolution in 3D fig, ax = plt.subplots(1,1, figsize=(10,7),subplot_kw={"projection": "3d"}) plt.title("Spectrum Evolution (dB scale)") f = sim.f[int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)]/1e9 z = fiber.zlocs F_surf, Z_surf = np.meshgrid(f, z) P_surf=getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)] )/np.max(getPower(matrix[:,int(sim.number_of_points/2-nrange):int(sim.number_of_points/2+nrange)])) P_surf[P_surf<1e-100]=1e-100 P_surf = 10*np.log10(P_surf) P_surf[P_surf<dB_cutoff]=dB_cutoff # Plot the surface. surf = ax.plot_surface(F_surf, Z_surf, P_surf, cmap=cm.viridis, linewidth=0, antialiased=False) ax.set_xlabel('Freq. [GHz]') ax.set_ylabel('Distance [m]') # Add a color bar which maps values to colors. fig.colorbar(surf, shrink=0.5, aspect=5) saveplot('spectrum_evo_3D',**kwargs) plt.show()def plotEverythingAboutSpectra(spectrumMatrix, # 光谱矩阵 fiber:Fiber_config, # 光纤属性 sim:SIM_config, # 仿真参数 nrange:int, # 画图范围 dB_cutoff, # 画图范围 **kwargs): print(' ') plotFirstAndLastSpectrum(spectrumMatrix,fiber,sim, nrange,**kwargs) plotSpectrumMatrix2D(spectrumMatrix,fiber,sim,nrange,dB_cutoff,**kwargs) plotSpectrumMatrix3D(spectrumMatrix,fiber,sim,nrange,dB_cutoff,**kwargs) print(' ') #Plot pulsesnrange=600 # 时域的范围 -60,60pscutoff=-30 # 时域强度截止值dBplotEverythingAboutPulses(pulseMatrix,fiber,sim_config,nrange,cutoff,savename='gaussian',chirpPlotRange=(-40,40))#Plot spectranrange=400 # 频域的范围cutoff=-30 # 频域强度截止值dBplotEverythingAboutSpectra(spectrumMatrix,fiber,sim_config,nrange,cutoff,savename='gaussian')","link":"/nlse-en/"},{"title":"Register an OpenAI Account","text":"Visit https://bing.xxiao.org to chat with New Bing for free. Visit https://chat.xxiao.org to chat with ChatGPT for free. To prevent potential misuse, it may be required to contact i@xxiao.org to get access code, or leave a message in the comments section in order to send the access code to your email. OpenAI’s ChatGPT is quite popular. But registering for an OpenAI account in mainland China or Hong Kong can be a bit complicated. Let me briefly summarize the registration process. Preparation before Registration The registration process for OpenAI is not difficult, but there is one minor hurdle if you have access to the OpenAI registration page - receiving a verification code via SMS. Your own email address, popular ones like Gmail or Outlook will work, to register as your login account. A mobile phone number capable of receiving SMS verification codes. This will be used to verify your account during the registration process. In mainland China or Hong Kong, you can use a temporary phone number service like SMS-Activate by topping up one US dollar (minimum) to buy specific numbers (prices may vary depending on the country and service) for 20 minutes to receive SMS verification codes. In mainland China or Hong Kong, as OpenAI services are not available, you’ll need to use a proxy IP for registration. Due to the large number of registrations, OpenAI may have blocked certain VPS nodes, including but not limited to mainstream ones like AWS. At the moment, my ReckNerd proxy still works, but Cloudcone does not. Accessing OpenAI’s Registration PageAssuming you have set up a proper network proxy, you can access the OpenAI registration page, click on SIGN UP at the top right, enter your email address, and proceed with simple information filling until you get to the phone number input page. However, in most cases, your IP will be restricted, and you may see messages like “The service is not available in your country or region.” Apart from checking whether you are indeed using a proxy to access the website (switch the proxy mode to global mode, e.g., in Clash for Windows settings, go to Proxies -> Global), the only option is to change your proxy server or VPS provider. Purchasing a Phone NumberIf all the previous steps go smoothly and you reach the phone number input page, visit the mentioned SMS-Activate website. You can top up $1 (supports Alipay and WeChat Pay) and then search and select OpenAI in the service options. The prices for numbers from different countries may vary, and they tend to increase due to ChatGPT’s popularity. You may choose a cheaper option or be aware that some countries’ numbers might not receive verification codes (don’t worry, if you don’t receive a code during the 20-minute usage period after purchase, you’ll get an automatic refund. So, if you wish, you can try different options at a lower price). Verifying Your Account with the Verification CodeAfter purchasing the phone number, copy it and fill it in on the OpenAI verification page. Make sure to select the corresponding country and remove the redundant international dialing code. If the phone number is working, wait a moment, and the verification code should be displayed on the phone number service website. Enter the code into the OpenAI verification page. Completion of RegistrationCongratulations! The registration process is complete. You can click on LOG IN on OpenAI’s login page and use your email address and password to log in to ChatGPT and enjoy using it~~ It’s worth noting that OpenAI ChatGPT only checks the IP address during the registration/login process. After logging in, the website will save your login status and API Key. From then on, you can open ChatGPT in any network environment, and the experience on mobile devices is also good. You can even share your API Key with other friends or create your own QQ, WeChat (with risks of account suspension, so use with caution), Telegram, and WhatsApp chatbots. OpenAI 的 ChatGPT 热度挺大。 但在中国大陆或者香港等地区注册 OpenAI 账号比较麻烦,简单记录一下注册过程。 注册前准备 OpenAI注册过程不难,如果你已经有可以访问 OpenAI 的注册界面的节点,唯一一个稍微有点门槛的地方是接收短信验证码。 自己的一个邮箱地址,主流的 gmail、outlook 都行。用于注册为登录账户。 一个能接收短信验证码的手机号。用于注册过程中验证账号。在中国大陆或者香港等地区可以使用接码平台如 SMS-Activate,充值一美元(最低)可以购买几个特定的号码(视国家和服务的不同,价格有所差异)20分钟用于接收短信验证码。 在中国大陆或者香港等地区由于 OpenAI 没有开放服务,需要使用代理 IP 注册。由于注册人数巨多,OpenAI 可能屏蔽了某些 VPS 节点,包括但不限于 AWS 等主流 VPS。目前我的 ReckNerd 还能用,但 Cloudcone 不行了。 访问 OpenAI 的注册界面在确认网络代理的情况下,浏览器登录 OpenAI 注册页面,点击右上部的 SIGN UP,输入你的邮箱地址,随后都是简单的信息填写。直到输入电话号码的界面。 但大部分情况是 IP 被限制访问,出现类似“您所在的国家或地区不提供服务”等信息。除了检查是否的确使用代理访问该网站外(代理模式切换为全局模式【例如,在 Clash for Windows 中的设置为 Proxies -> Globle,Windows 推荐使用 TUN 模式】),只能更换机场节点或者 VPS 供应商。 购买电话号码如果以上步骤都没有问题,到了输入电话号码的界面。访问前文提到的 SMS-Activate 网站,可以先充值1美元(支持支付宝和微信支付)。在左侧的服务搜索并选择 OpenAI,不同国家的号码价格不同,并随 ChatGPT 的火爆而在持续涨价。可能选便宜或者某些国家的号码收不到验证码(不过不用担心,要是在购买后20分钟的使用期间未收取验证码,会自动退款。所以如果你愿意,可以按低价一个一个试),不过我买的贵点的,美国的60多卢布的号码。 收取验证码验证账号购买电话号码后复制,将其填入 OpenAI 验证界面,注意选择对应国家并将重复的国际电话区号删除。 如果此号码能用,稍等片刻在购买号码的网站上就能显示出验证码,将其填入即可。 完成注册至此,注册过程完成。你可以在 OpenAI 的登录界面点击 LOG IN 使用你的邮箱地址和密码登录 ChatGPT 并愉快的使用~~ 值得一提的是,OpenAI ChatGPT 只在进行注册/登录操作时检测 IP 地址。登录以后网站会保存下登录状态以及 API Key,所以,以后就可以在任意网络环境下打开 ChatGPT 了,移动端的体验也不错。甚至可以分享 API Key 给其他小伙伴使用,或者创建自己的 QQ、WeChat(有封号风险,慎用)、Telegram 和 WhatsApp 聊天机器人。","link":"/openai/"},{"title":"Optical Soliton","text":"This article contains several large .GIF images(~ 30 MB × 4), which may slow down the webpage loading speed. To be improved… When the group velocity dispersion and the self-phase modulation effect cancel each other out, the pulse maintains its shape during propagation in the optical fiber, forming an optical soliton. This article is also available in 简体中文, Français. Comparison of Group Velocity Dispersion and Self-Phase ModulationThe definition is as follows:$$N^2\\equiv \\frac{L_D}{L_{NL}}=\\frac{\\gamma P_0 T_0^2}{|\\beta_2|}$$ Optical SolitonHyperbolic secant pulses for $\\beta_2<0$ and $\\gamma>0$ . First order Second order Third order Fourth order Dark SolitonHyperbolic tangent pulses for $\\beta_2>0$ and $\\gamma>0$ . First order Second order Third order Optical Wave BreakingGaussian pulses experience optical wave breaking when $\\beta_2>0$ and $\\gamma>0$ . © Marcus R.A. Newman, CC BY-NC-SA.","link":"/soliton-en/"},{"title":"Build Trojan node with Vultr VPS","text":"The current “best” node deployment method: Detailed steps to set up a Trojan node using Vultr’s VPS. VPS服务器 在Vultr官网选择服务器进行部署,操作系统Ubantu22.04 等待部署完成,记下root用户密码,为下面ssh登录 域名DNS解析到服务器IP 连接主机 FinalShell新建连接 输入主机IP和root密码连接 节点搭建FinalShell#在root目录下新建trojan文件夹mkdir trojan#进入trojan目录(后续命令均在root/trojan目录下运行)cd trojan下载[Trojan-Go](https://github.com/p4gefau1t/trojan-go/releases/tag/v0.10.6)wget https://github.com/p4gefau1t/trojan-go/releases/download/v0.10.6/trojan-go-linux-amd64.zip#解压此压缩文件unzip trojan-go-linux-amd64.zip#在root/trojan目录下新建配置文件config.json{ "run_type": "server", "local_addr": "0.0.0.0", "local_port": 443, "remote_addr": "cloudreve.lee2333.com", "remote_port": 443, "password": [ "passwordmichael" ], "ssl": { "cert": "server.crt", "key": "server.key" }}# 申请证书:#安装acmecurl https://get.acme.sh | sh#安装socatapt install socat#添加软链接ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh#注册账号acme.sh --register-account -m leonoreshaw@gmail.com#开放80、443端口ufw allow 80ufw allow 443#申请证书、acme.sh --issue -d ty.leonore.tk --standalone -k ec-256#安装证书acme.sh --installcert -d ty.leonore.tk --ecc --key-file /root/trojan/server.key --fullchain-file /root/trojan/server.crt #设置Trojan-Go后台运行nohup ./trojan-go > trojan.log 2>&1 & 导入节点 将节点导入v2rayN 添加trojan服务器 地址:ty.leonore.tk 端口:443 密码:passwordmichael","link":"/trojan/"},{"title":"Learn Something about Internet","text":"Surfing the Internet World Freely Project V More coming soon ~~ ~~","link":"/v2ray/"},{"title":"关于更换Twikoo评论部署方式","text":"由于腾讯云没有了0元套餐,需要付费购买套餐才能使用。一直没管,直到云环境被隔离了,还得续费才能导出数据:)。出于尽量白嫖的原则,决定更换为Vercel部署。 【今后在中国大陆网络环境下,评论区访问将变得更为困难】 【腾讯云公告】关于云开发计费套餐升级通知:为简化预付费后付费资源包等多种使用概念,云开发将于 2022年8月上线新计费套餐,使用“基础套餐+按量付费”模式,需先购买带有一定配额的基础套餐,超出配额部分按使用量付费,价格文档 正在享受免费版和按量付费的用户,有超过1个月的操作缓冲期去升级切换新计费套餐。 其他预付费用户在原套餐到期前,您的套餐权益将不变,可正常使用直到原套餐到期。 Vercel 部署 注意 Vercel 部署的环境需配合 1.4.0 以上版本的 twikoo.js 使用 申请 MongoDB 账号 创建免费 MongoDB 数据库,区域推荐选择 AWS / N. Virginia (us-east-1) 在 Clusters 页面点击 CONNECT,按步骤设置允许所有 IP 地址的连接(为什么?),创建数据库用户,并记录数据库连接字符串,请将连接字符串中的 <password> 修改为数据库密码 申请 Vercel 账号 点击以下按钮将 Twikoo 一键部署到 Vercel 进入 Settings - Environment Variables,添加环境变量 MONGODB_URI,值为第 3 步的数据库连接字符串 进入 Deployments , 然后在任意一项后面点击更多(三个点) , 然后点击Redeploy , 最后点击下面的Redeploy 进入 Overview,点击 Domains 下方的链接,如果环境配置正确,可以看到 “Twikoo 云函数运行正常” 的提示 Vercel Domains(包含 https:// 前缀,例如 https://xxx.vercel.app)即为您的环境 id 2023-03-31更新今天突然看到有『Twikoo』解决 Vercel.app 在国内被墙导致无法使用的问题,其实早该想到。 遂使用新域名的子域名twikoo.xxiao.org解决了中国大陆网络环境下无法访问评论区的问题。 关于Twikoo更新 前往GitHub项目https://github.com/LeonoreShaw/TwikooComment/blob/main/package.json 修改为指定版本。将 "twikoo-vercel": "x.x.x" 其中的版本号修改为最新版本号。点击 Commit changes。部署会自动触发,可以回到 Vercel 仪表板,查看部署状态。 package.json© xxiao.org"twikoo-vercel": "x.x.x" 本地修改./_config.candy.yml中的jsUrl: https://cdn.staticfile.org/twikoo/1.6.11/twikoo.all.min.js为指定版本。 _config.candy.yml© xxiao.orgjsUrl: https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js 本地修改./themes/candy/layout/comment/twikoo.jsx中的jsUrl: 'https://cdn.staticfile.org/twikoo/1.6.11/twikoo.all.min.js'为指定版本。 twikoo.jsx© xxiao.orgjsUrl: 'https://cdn.staticfile.org/twikoo/1.6.16/twikoo.all.min.js' 执行命令(进入Blog根目录开启PowerShell) PowerShell© xxiao.orghexo clhexo g -d","link":"/twikoo/"},{"title":"Build vmess+ws+tls node with Vultr VPS","text":"A VPS server can host websites, network agents, cloud backups, etc. My website is hosted on Github, so I use VPS to build a vmess node as a proxy server. The VPS provider in this demonstration is Vultr. The operating system is Ubantu22.04, and the type of the node is vmess+ws+tls. Record the operation steps so that the node can be quickly built when needed. 目前最稳定的节点搭建方式:使用Vultr的VPS搭建vmess+ws+tls节点的详细步骤 1、VPS服务器 在Vultr官网选择服务器进行部署,操作系统Ubantu22.04 等待部署完成,记下root用户密码,为下面ssh登录 域名DNS解析到服务器IP 2、连接主机 FinalShell新建连接 输入主机IP和root密码连接 3、节点搭建FinalShell#更新软件源 apt update#启用 BBR TCP 拥塞控制算法echo "net.core.default_qdisc=fq" >> /etc/sysctl.confecho "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.confsysctl -p#安装x-ui: bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)#安装nginx apt install nginx#安装acme: curl https://get.acme.sh | sh#安装socat:(如果要使用独立模式--standalone)apt install socat#添加软链接: ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh#开放端口:ufw allow 80ufw allow 443ufw allow 9999#注册账号: acme.sh --register-account -m leonoreshaw@gmail.com# 等待域名DNS解析完成#申请证书: (改域名)acme.sh --issue -d d.leonore.cf -k ec-256 --webroot /var/www/html#申请证书: acme.sh --issue -d a.leonore.cf --standalone -k ec-256#安装证书: (改域名)acme.sh --install-cert -d d.leonore.cf --ecc --key-file /etc/x-ui/server.key --fullchain-file /etc/x-ui/server.crt --reloadcmd "systemctl force-reload nginx"#安装证书(Trojan: acme.sh --installcert -d 替换为你的域名 --ecc --key-file /root/trojan/server.key --fullchain-file /root/trojan/server.crt #如果默认CA无法颁发,则可以切换下列CA:#切换 Let’s Encrypt:acme.sh --set-default-ca --server letsencrypt#切换 Buypass:acme.sh --set-default-ca --server buypass#切换 ZeroSSL:acme.sh --set-default-ca --server zerossl#切换CA机构: acme.sh --set-default-ca --server letsencrypt 4、寻找伪装网站 http站点优先,个人网盘符合单节点大流量特征。 示例关键字:intext:登录 Cloudreve 5、登录xui 访问网站的9999端口d.leonore.cf:9999 使用xui账户登录 adminroot xxm54michael 切换xray版本为最新版 进入入站列表选项卡 添加入站节点 备注:vmess+ws+tls 监听IP:127.0.0.1 端口:10000 传输:ws id复制到路径 进入面板设置选项卡 面板监听IP:127.0.0.1 面板监听端口:9999 面板url根路径:/id-xui 保存配置 重启面板 6、配置nginx配置文件路径:/etc/nginx/nginx.conf nginx.confuser www-data;worker_processes auto;pid /run/nginx.pid;include /etc/nginx/modules-enabled/*.conf;events { worker_connections 1024;}http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; gzip on; server { listen 443 ssl; server_name d.leonore.cf; #你的域名 $$$$$$$$改$$$$$$$$$$ ssl_certificate /etc/x-ui/server.crt; #证书位置 ssl_certificate_key /etc/x-ui/server.key; #私钥位置 ssl_session_timeout 1d; ssl_session_cache shared:MozSSL:10m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers off; location / { proxy_pass https://cloud.forevers.top; #伪装网址 $$$$$$$$$$$$$$$$$$$$ proxy_redirect off; proxy_ssl_server_name on; sub_filter_once off; sub_filter "cloud.forevers.top" $server_name; # $$$$$$$$$$$$$$$$$$$$$$$$$$ proxy_set_header Host "cloud.forevers.top"; # $$$$$$$$$$$$$$$$$$$$$$$$$$ proxy_set_header Referer $http_referer; proxy_set_header X-Real-IP $remote_addr; proxy_set_header User-Agent $http_user_agent; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Accept-Encoding ""; proxy_set_header Accept-Language "zh-CN"; } location /1a2569a8-eabd-4039-e53f-df76b491745f { #分流路径 替换ray为xray节点里的id $$$$$$$改$$$$$$$$$$$$$$$$$ proxy_redirect off; proxy_pass http://127.0.0.1:10000; #Xray端口 ¥¥¥¥¥¥¥¥ proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /1a2569a8-eabd-4039-e53f-df76b491745f-xui { #xui路径 替换xui为id-xui $$$$$$$$改$$$$$$$$$$$$$$ proxy_redirect off; proxy_pass http://127.0.0.1:9999; #xui监听端口 ¥¥¥¥¥¥¥¥¥ proxy_http_version 1.1; proxy_set_header Host $host; } } server { listen 80; location /.well-known/ { root /var/www/html; } location / { rewrite ^(.*)$ https://$host$1 permanent; } }} 7、重新加载配置文件FinalShell systemctl reload nginx 8、导入节点 登录xui界面d.leonore.cf/id-xui 在入站列表选项卡下点击查看 复制链接 将节点导入v2rayN 修改节点信息 地址:d.leonore.cf 端口:443 vmess加密方式:zero 传输安全:tls 9、测速!!!10、多用户合租(可选) 通过修改nginx的配置文件实现ws path路径分流 nginx.conflocation /ray { #分流路径 proxy_redirect off; proxy_pass http://127.0.0.1:10000; #Xray端口 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}","link":"/vmess/"}],"tags":[{"name":"Others","slug":"Others","link":"/tags/Others/"},{"name":"Optics","slug":"Optics","link":"/tags/Optics/"},{"name":"Hexo","slug":"Hexo","link":"/tags/Hexo/"},{"name":"Clash","slug":"Clash","link":"/tags/Clash/"},{"name":"Icarus","slug":"Icarus","link":"/tags/Icarus/"},{"name":"Music","slug":"Music","link":"/tags/Music/"},{"name":"GitHub","slug":"GitHub","link":"/tags/GitHub/"},{"name":"VPS","slug":"VPS","link":"/tags/VPS/"},{"name":"V2ray","slug":"V2ray","link":"/tags/V2ray/"}],"categories":[{"name":"Others","slug":"Others","link":"/categories/Others/"},{"name":"Optics","slug":"Optics","link":"/categories/Optics/"},{"name":"Blog","slug":"Blog","link":"/categories/Blog/"},{"name":"Technology","slug":"Technology","link":"/categories/Technology/"},{"name":"Music","slug":"Music","link":"/categories/Music/"},{"name":"Internet","slug":"Internet","link":"/categories/Internet/"}]}